aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 4 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index c2a60dd..2525c2e 100644
--- a/Makefile
+++ b/Makefile
@@ -41,24 +41,19 @@ include $(MAKEDIR)/target-config.mk
## Compilation flags
##
-GLOBAL_FLAGS := -D$(VECT_BASE_ADDR) \
- -DBOARD_$(BOARD) -DMCU_$(MCU) \
- -DERROR_LED_PORT=$(ERROR_LED_PORT) \
- -DERROR_LED_PIN=$(ERROR_LED_PIN) \
- -D$(DENSITY)
# FIXME: the following allows for deprecated include style, e.g.:
# #include "libmaple.h"
# or
# #include "wirish.h"
# It slows compilation noticeably; remove after 1 release.
-GLOBAL_FLAGS += -I$(LIBMAPLE_PATH)/include/libmaple \
+TARGET_FLAGS += -I$(LIBMAPLE_PATH)/include/libmaple \
-I$(WIRISH_PATH)/include/wirish
GLOBAL_CFLAGS := -Os -g3 -gdwarf-2 -mcpu=cortex-m3 -mthumb -march=armv7-m \
-nostdlib -ffunction-sections -fdata-sections \
- -Wl,--gc-sections $(GLOBAL_FLAGS)
-GLOBAL_CXXFLAGS := -fno-rtti -fno-exceptions -Wall $(GLOBAL_FLAGS)
+ -Wl,--gc-sections $(TARGET_FLAGS)
+GLOBAL_CXXFLAGS := -fno-rtti -fno-exceptions -Wall $(TARGET_FLAGS)
GLOBAL_ASFLAGS := -mcpu=cortex-m3 -march=armv7-m -mthumb \
- -x assembler-with-cpp $(GLOBAL_FLAGS)
+ -x assembler-with-cpp $(TARGET_FLAGS)
LDFLAGS = -T$(LDDIR)/$(LDSCRIPT) -L$(LDDIR) \
-mcpu=cortex-m3 -mthumb -Xlinker -L $(LD_FAMILY_PATH) \
--gc-sections --print-gc-sections --march=armv7-m -Wall