summaryrefslogtreecommitdiff
path: root/src/stm/Makefile.defs
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-08 09:22:03 -0700
committerKeith Packard <keithp@keithp.com>2013-10-08 09:22:03 -0700
commit6a1e398e590121458176758858bb4210f3eb5a55 (patch)
tree15f90c050ad470528af9f7d00ad2a7e2bb7fd47c /src/stm/Makefile.defs
parent16965716c02eb79b449d9d3b264814d775660134 (diff)
Add --with parameters to configure for compiler selectionnew-state
This allows the user to specify which compiler to use for each target CPU. Also checks to make sure the arm compiler supports -m0 and -m3 cpu type flags. The build now actually uses the specified compilers too. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/Makefile.defs')
-rw-r--r--src/stm/Makefile.defs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs
index 8ef30521..ede75f80 100644
--- a/src/stm/Makefile.defs
+++ b/src/stm/Makefile.defs
@@ -12,14 +12,19 @@ vpath ao-make-product.5c ../util
.elf.ihx:
objcopy -O ihex $*.elf $@
-SAT=/opt/cortex
-CC=$(SAT)/bin/arm-none-eabi-gcc
-SAT_CLIB=$(SAT)/lib/pdclib-cortex-m3.a
-SAT_CFLAGS=-I$(SAT)/include
+ifndef TOPDIR
+TOPDIR=..
+endif
ifndef VERSION
-include ../Version
+include $(TOPDIR)/Version
endif
+include $(TOPDIR)/Makedefs
+
+CC=$(ARM_CC)
+SAT=/opt/cortex
+SAT_CLIB=$(SAT)/lib/pdclib-cortex-m3.a
+SAT_CFLAGS=-I$(SAT)/include
AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I..
STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) $(SAT_CFLAGS)