[ctrtool] Fix compile errors

And comparisons which would have always returned false.
This commit is contained in:
jakcron
2016-01-08 20:45:14 +08:00
parent b1725fda79
commit 9b4415a7a0
3 changed files with 23 additions and 6 deletions
+18 -3
View File
@@ -3,12 +3,27 @@ SRC_DIR = . polarssl tinyxml
OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) $(foreach dir,$(SRC_DIR),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp)))
# Compiler Settings
LIBS = -static-libgcc -static-libstdc++
CXXFLAGS = -I.
CFLAGS = -O2 -flto -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-result -I.
OUTPUT = ctrtool
CXXFLAGS = -I.
CFLAGS = -O2 -flto -Wall -Wno-unused-variable -Wno-unused-result -I.
CC = gcc
CXX = g++
ifeq ($(OS),Windows_NT)
#Windows Build CFG
CFLAGS += -Wno-unused-but-set-variable
LIBS += -static-libgcc -static-libstdc++
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
# OS X
CFLAGS += -Wno-unused-local-typedef
LIBS += -liconv
else
# Linux
CFLAGS += -Wno-unused-but-set-variable
LIBS +=
endif
endif
main: $(OBJS)
$(CXX) -o $(OUTPUT) $(LIBS) $(OBJS)