[build] add boards specific flags when needed

and activate LTO compilation to reduce code size on small board naze32
This commit is contained in:
Gautier Hattenberger
2016-04-30 23:16:07 +02:00
parent 56f3d44809
commit 45b305ab10
7 changed files with 18 additions and 10 deletions
+3 -2
View File
@@ -50,14 +50,15 @@ INCLUDES += -I $(shell $(OCAMLC) -where)
CFLAGS = -W -Wall
CFLAGS += $(INCLUDES)
CFLAGS += $($(TARGET).CFLAGS)
CFLAGS += $(USER_CFLAGS)
CFLAGS += $(USER_CFLAGS) $(BOARD_CFLAGS)
CFLAGS += -fPIC
CFLAGS += -O$(OPT)
CFLAGS += -g
CFLAGS += -std=gnu99
CFLAGS += $(shell pkg-config --cflags-only-I ivy-glib)
LDFLAGS = -lm
LDFLAGS = -lm
LDFLAGS += $(BOARD_LDFLAGS)
LIBFLAGS = -shared