diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-18 10:01:29 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-18 10:01:29 -0800 |
commit | 9c200c3bc742b4dd1a7e28bfce9d5b27e833aae5 (patch) | |
tree | e623e349673fc78f2ada6d3b49108f93fcac2731 /src | |
parent | fbde0c3e4bdb419d6bd4dbcc96b0e01c59e9fa13 (diff) |
altos: Build pdclib locally if necessary
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makedefs.in | 4 | ||||
-rw-r--r-- | src/Makefile | 9 | ||||
-rw-r--r-- | src/lpc/Makefile-lpc.defs | 4 | ||||
-rw-r--r-- | src/stm/Makefile.defs | 4 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/Makedefs.in b/src/Makedefs.in index 6dc9ab0f..d4ef28be 100644 --- a/src/Makedefs.in +++ b/src/Makedefs.in @@ -1,6 +1,10 @@ ARM_CC=@ARM_CC@ HAVE_ARM_M3_CC=@HAVE_ARM_M3_CC@ HAVE_ARM_M0_CC=@HAVE_ARM_M0_CC@ +PDCLIB_INCLUDES=@PDCLIB_INCLUDES@ +PDCLIB_LIBS_M0=@PDCLIB_LIBS_M0@ +PDCLIB_LIBS_M3=@PDCLIB_LIBS_M3@ +HAVE_PDCLIB=@HAVE_PDCLIB@ SDCC=@SDCC@ HAVE_SDCC=@HAVE_SDCC@ diff --git a/src/Makefile b/src/Makefile index bdd3307a..2ba59d94 100644 --- a/src/Makefile +++ b/src/Makefile @@ -42,6 +42,10 @@ AVRDIRS=\ SUBDIRS= +ifeq ($(strip $(HAVE_PDCLIB)),yes) +PDCLIB=pdclib +endif + ifeq ($(strip $(HAVE_SDCC)),yes) SUBDIRS+=$(SDCCDIRS) endif @@ -92,7 +96,7 @@ uninstall: all-recursive: all-local -all-local: altitude.h altitude-pa.h ao_kalman.h ao_whiten.h +all-local: altitude.h altitude-pa.h ao_kalman.h ao_whiten.h $(PDCLIB) altitude.h: make-altitude nickle $< > $@ @@ -108,3 +112,6 @@ ao_whiten.h: make-whiten clean-local: rm -f altitude.h ao_kalman.h + +pdclib: + cd ../pdclib && make && make prefix=`pwd`/opt install diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs index fbd413b0..3d55cf67 100644 --- a/src/lpc/Makefile-lpc.defs +++ b/src/lpc/Makefile-lpc.defs @@ -26,12 +26,12 @@ endif ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex CC=$(ARM_CC) -AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) +AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) NICKLE=nickle -LIBS=-lpdclib-cortex-m0 -lgcc +LIBS=$(PDCLIB_LIBS_M0) -lgcc V=0 # The user has explicitly enabled quiet compilation. diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index b1998f93..9adcfeb3 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -22,9 +22,9 @@ endif include $(TOPDIR)/Makedefs CC=$(ARM_CC) -LIBS=-lpdclib-cortex-m3 -lgcc +LIBS=$(PDCLIB_LIBS_M3) -lgcc -AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I../math -I.. +AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I../math -I.. $(PDCLIB_INCLUDES) STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) LDFLAGS=-L../stm -Wl,-Taltos.ld |