make memcpy32/memset32 take void *
[picodrive.git] / Makefile
index 0df793e..d31779c 100644 (file)
--- 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