Skip to content

Commit 1855dc9

Browse files
committed
nxtool: initial commit
0 parents  commit 1855dc9

File tree

189 files changed

+101052
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+101052
-0
lines changed

.gitignore

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# User-specific files
2+
*.suo
3+
*.user
4+
*.userosscache
5+
*.sln.docstates
6+
*.vcxproj.filters
7+
8+
# Build results
9+
[Dd]ebug/
10+
[Dd]ebugPublic/
11+
[Rr]elease/
12+
[Rr]eleases/
13+
x64/
14+
x86/
15+
bld/
16+
[Bb]in/
17+
[Oo]bj/
18+
[Ll]og/
19+
20+
# Visual Studio 2015 cache/options directory
21+
.vs/
22+
23+
# MSTest test Results
24+
[Tt]est[Rr]esult*/
25+
[Bb]uild[Ll]og.*
26+
27+
*_i.c
28+
*_p.c
29+
*_i.h
30+
*.ilk
31+
*.meta
32+
*.obj
33+
*.pch
34+
*.pdb
35+
*.pgc
36+
*.pgd
37+
*.rsp
38+
*.sbr
39+
*.tlb
40+
*.tli
41+
*.tlh
42+
*.tmp
43+
*.tmp_proj
44+
*.log
45+
*.vspscc
46+
*.vssscc
47+
.builds
48+
*.pidb
49+
*.svclog
50+
*.scc
51+
52+
# Visual C++ cache files
53+
ipch/
54+
*.aps
55+
*.ncb
56+
*.opendb
57+
*.opensdf
58+
*.sdf
59+
*.cachefile
60+
*.VC.db
61+
*.VC.VC.opendb
62+
63+
# Prerequisites
64+
*.d
65+
66+
# Object files
67+
*.o
68+
*.ko
69+
*.obj
70+
*.elf
71+
72+
# Linker output
73+
*.ilk
74+
*.map
75+
*.exp
76+
77+
# Libraries
78+
*.lib
79+
*.a
80+
*.la
81+
*.lo
82+
83+
# Shared objects (inc. Windows DLLs)
84+
*.dll
85+
*.so
86+
*.so.*
87+
*.dylib
88+
89+
# Executables
90+
*.exe
91+
*.out
92+
*.app
93+
94+
# Debug files
95+
*.idb
96+
97+
# Project-specific files
98+
nxtool

LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MIT License
2+
3+
Copyright (c) 2012 neimod
4+
Copyright (c) 2014 3DSGuy
5+
Copyright (c) 2016-2017 Dazzozo
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Sources
2+
SRC_DIR = . mbedtls tinyxml
3+
OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) $(foreach dir,$(SRC_DIR),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp)))
4+
5+
# Compiler Settings
6+
OUTPUT = nxtool
7+
CXXFLAGS = -I.
8+
CFLAGS = -O2 -flto -Wall -Wno-unused-variable -Wno-unused-result -Wno-unused-local-typedefs -I. -std=c99
9+
CC = gcc
10+
CXX = g++
11+
ifeq ($(OS),Windows_NT)
12+
#Windows Build CFG
13+
CFLAGS += -Wno-unused-but-set-variable
14+
LIBS += -static-libgcc -static-libstdc++
15+
else
16+
UNAME_S := $(shell uname -s)
17+
ifeq ($(UNAME_S),Darwin)
18+
# OS X
19+
CFLAGS +=
20+
LIBS += -liconv
21+
else
22+
# Linux
23+
CFLAGS += -Wno-unused-but-set-variable
24+
LIBS +=
25+
endif
26+
endif
27+
28+
main: $(OBJS)
29+
$(CXX) -o $(OUTPUT) $(LIBS) $(OBJS)
30+
31+
clean:
32+
rm -rf $(OUTPUT) $(OUTPUT).exe $(OBJS)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TW: bad code
2+
============

0 commit comments

Comments
 (0)