X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=d31779cc21618e283492220c4733ed516d5eed7e;hb=ce07c136bb10124ebb2029d5275e27ca2a6254af;hp=0df793e8c1b33c1fe422d6e64774a62f6840daee;hpb=d4bea61c8f1e5fb1a68c401610bd424c052ef636;p=picodrive.git diff --git a/Makefile b/Makefile index 0df793e..d31779c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,10 @@ TARGET ?= PicoDrive CFLAGS += -Wall -ggdb -falign-functions=2 CFLAGS += -I. ifndef DEBUG -CFLAGS += -O2 -DNDEBUG +CFLAGS += -O2 -DNDEBUG -ffunction-sections +ifeq ($(findstring clang,$(CC)),) +LDFLAGS += -Wl,--gc-sections +endif endif #CFLAGS += -DEVT_LOG #CFLAGS += -DDRC_CMP