aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-08-05 14:39:34 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-08-05 14:40:03 -0400
commit13935e4ac792253000a861f5cea099a4da95276c (patch)
treef71b12c933db56f68f3b0b3dda06c4479a84f748 /Makefile
parent51699a1991b76fe232e2ff63992e49a973e8ff70 (diff)
Makefile: Don't assume Cortex M3.
Instead, derive -march and -mcpu from the target MCU in target-config.mk. Also (on STM32F4) add the necessary floating point flags. The CodeSourcery toolchains don't support these, so we'll need to prepare alternative toolchains when F4 support is official. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b1f970c..6a76000 100644
--- a/Makefile
+++ b/Makefile
@@ -52,12 +52,11 @@ include $(MAKEDIR)/build-templates.mk
# It slows compilation noticeably; remove after 1 release.
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 \
+GLOBAL_CFLAGS := -Os -g3 -gdwarf-2 -nostdlib \
+ -ffunction-sections -fdata-sections \
-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 $(TARGET_FLAGS)
+GLOBAL_ASFLAGS := -x assembler-with-cpp $(TARGET_FLAGS)
LDFLAGS = $(TARGET_LDFLAGS) $(TOOLCHAIN_LDFLAGS) -mcpu=cortex-m3 -mthumb \
-Xlinker --gc-sections \
-Xassembler --march=armv7-m -Wall