CHG: Added the parameters -fdata-sections -ffunction-sections to common/Makefile.common for making the .elf filesize smaller.

REF: https://github.com/Proxmark/proxmark3/issues/83
This commit is contained in:
iceman1001 2015-03-30 16:27:07 +02:00
parent aa60d1560e
commit 7c99b4f782

View file

@ -66,7 +66,9 @@ VPATH = . ../common/ ../fpga/
INCLUDES = ../include/proxmark3.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/usb_cmd.h $(APP_INCLUDES)
CFLAGS = -c $(INCLUDE) -Wall -Werror -pedantic -std=c99 -Os $(APP_CFLAGS)
# compile hint: -flto to minimise size.
CFLAGS = -c $(INCLUDE) -Wall -Werror -fdata-sections -ffunction-sections -pedantic -std=c99 -Os $(APP_CFLAGS)
#CFLAGS = -c $(INCLUDE) -Wall -Werror -pedantic -std=c99 -Os $(APP_CFLAGS)
LDFLAGS = -nostartfiles -nodefaultlibs -Wl,-gc-sections -n
LIBS = -lgcc