diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-11-21 17:12:45 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-04-11 16:56:52 -0400 |
commit | 35d55def21b78dc9f1416a19edd98b48c53754ee (patch) | |
tree | 7a8cf63294ce6801897480a2c308252d6606963c /Makefile | |
parent | df223dde202f340f3885dafe60d1de22a13b27d9 (diff) | |
download | librambutan-35d55def21b78dc9f1416a19edd98b48c53754ee.tar.gz librambutan-35d55def21b78dc9f1416a19edd98b48c53754ee.zip |
Rename GLOBAL_FLAGS to TARGET_FLAGS, remove from Makefile.
Move into target-config.mk. Build it up bit-by-bit as the build goes
on. Repeat the DENSITY defines once per board in target-config.mk,
since they don't make sense on STM32F2.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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 |