diff --git a/ctrtool/Makefile b/ctrtool/Makefile index f1a4e60..599ec8b 100644 --- a/ctrtool/Makefile +++ b/ctrtool/Makefile @@ -1,9 +1,9 @@ OBJS = keyset.o main.o ctr.o ncsd.o cia.o tik.o tmd.o filepath.o lzss.o exheader.o exefs.o ncch.o utils.o settings.o firm.o cwav.o stream.o romfs.o ivfc.o POLAR_OBJS = polarssl/aes.o polarssl/bignum.o polarssl/rsa.o polarssl/sha2.o TINYXML_OBJS = tinyxml/tinystr.o tinyxml/tinyxml.o tinyxml/tinyxmlerror.o tinyxml/tinyxmlparser.o -LIBS = -static-libstdc++ +LIBS = -static-libgcc -static-libstdc++ CXXFLAGS = -I. -CFLAGS = -Wall -Wno-unused-variable -Wno-unused-but-set-variable -I. +CFLAGS = -Wall -O2 -flto -static -Wno-unused-variable -Wno-unused-but-set-variable -I. OUTPUT = ctrtool CC = gcc diff --git a/makerom/Makefile b/makerom/Makefile index ef47794..741a3f1 100644 --- a/makerom/Makefile +++ b/makerom/Makefile @@ -5,7 +5,7 @@ OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) # Compiler Settings LIBS = -static-libgcc CXXFLAGS = -I. -CFLAGS = --std=c99 -Wall -Wno-unused-but-set-variable -Wno-unused-value -I. -DMAKEROM_VER_MAJOR=$(VER_MAJOR) -DMAKEROM_VER_MINOR=$(VER_MINOR) $(MAKEROM_BUILD_FLAGS) -m64 +CFLAGS = --std=c99 -Wall -O2 -flto -static -Wno-unused-but-set-variable -Wno-unused-value -I. -DMAKEROM_VER_MAJOR=$(VER_MAJOR) -DMAKEROM_VER_MINOR=$(VER_MINOR) $(MAKEROM_BUILD_FLAGS) -m64 CC = gcc # MAKEROM Build Settings @@ -22,4 +22,4 @@ build: $(OBJS) g++ -o $(OUTPUT) $(LIBS) $(OBJS) -m64 clean: - rm -rf $(OUTPUT) $(OBJS) *.cci *.cia *.cxi *.cfa \ No newline at end of file + rm -rf $(OUTPUT) $(OBJS) *.cci *.cia *.cxi *.cfa