Merge remote-tracking branch 'origin/master'
[fw/altos] / src / lpc / Makefile.defs
1 vpath % ../lpc:../product:../drivers:../core:../util:../kalman:../aes:..
2 vpath make-altitude ../util
3 vpath make-kalman ../util
4 vpath kalman.5c ../kalman
5 vpath kalman_filter.5c ../kalman
6 vpath load_csv.5c ../kalman
7 vpath matrix.5c ../kalman
8 vpath ao-make-product.5c ../util
9
10 ifndef TOPDIR
11 TOPDIR=..
12 endif
13
14 ifndef VERSION
15 include $(TOPDIR)/Version
16 endif
17 include $(TOPDIR)/Makedefs
18
19 CC=$(ARM_CC)
20 SAT=/opt/cortex
21 SAT_CLIB=$(SAT)/lib/pdclib-cortex-m0.a
22 SAT_CFLAGS=-I$(SAT)/include
23
24 AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)
25 LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) $(SAT_CFLAGS)
26
27 LDFLAGS=$(LPC_CFLAGS) -L$(TOPDIR)/stm -Wl,-Taltos.ld
28
29 NICKLE=nickle
30
31 V=0
32 # The user has explicitly enabled quiet compilation.
33 ifeq ($(V),0)
34 quiet = @printf "  $1 $2 $@\n"; $($1)
35 endif
36 # Otherwise, print the full command line.
37 quiet ?= $($1)
38
39 .c.o:
40         $(call quiet,CC) -c $(CFLAGS) $<
41
42 ao_serial_lpc.h: $(TOPDIR)/lpc/baud_rate ao_pins.h
43         nickle $(TOPDIR)/lpc/baud_rate `awk '/AO_LPC_CLKOUT/{print $$3}' ao_pins.h` > $@
44
45 ao_serial_lpc.o: ao_serial_lpc.h
46
47 .DEFAULT_GOAL=all