diff options
author | Keith Packard <keithp@keithp.com> | 2013-10-08 09:22:03 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-10-08 09:22:03 -0700 |
commit | 6a1e398e590121458176758858bb4210f3eb5a55 (patch) | |
tree | 15f90c050ad470528af9f7d00ad2a7e2bb7fd47c /src/lpc/Makefile.defs | |
parent | 16965716c02eb79b449d9d3b264814d775660134 (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/lpc/Makefile.defs')
-rw-r--r-- | src/lpc/Makefile.defs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/lpc/Makefile.defs b/src/lpc/Makefile.defs index 2873d5e8..d541230a 100644 --- a/src/lpc/Makefile.defs +++ b/src/lpc/Makefile.defs @@ -7,19 +7,24 @@ vpath load_csv.5c ../kalman vpath matrix.5c ../kalman vpath ao-make-product.5c ../util -CC=arm-none-eabi-gcc -SAT=/opt/cortex -SAT_CLIB=$(SAT)/lib/pdclib-cortex-m0.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-m0.a +SAT_CFLAGS=-I$(SAT)/include -AO_CFLAGS=-I. -I../lpc -I../core -I../drivers -I.. +AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR) LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) $(SAT_CFLAGS) -LDFLAGS=$(LPC_CFLAGS) -L../stm -Wl,-Taltos.ld +LDFLAGS=$(LPC_CFLAGS) -L$(TOPDIR)/stm -Wl,-Taltos.ld NICKLE=nickle @@ -34,8 +39,8 @@ quiet ?= $($1) .c.o: $(call quiet,CC) -c $(CFLAGS) $< -ao_serial_lpc.h: ../lpc/baud_rate ao_pins.h - nickle ../lpc/baud_rate `awk '/AO_LPC_CLKOUT/{print $$3}' ao_pins.h` > $@ +ao_serial_lpc.h: $(TOPDIR)/lpc/baud_rate ao_pins.h + nickle $(TOPDIR)/lpc/baud_rate `awk '/AO_LPC_CLKOUT/{print $$3}' ao_pins.h` > $@ ao_serial_lpc.o: ao_serial_lpc.h |