]> git.gag.com Git - fw/altos/blob - src/lpc/Makefile-lpc.defs
fixup for interleave
[fw/altos] / src / lpc / Makefile-lpc.defs
1 ifndef TOPDIR
2 TOPDIR=..
3 endif
4
5 include $(TOPDIR)/Makedefs
6
7 vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/kernel:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR/aes):$(TOPDIR):$(TOPDIR)/math
8 vpath make-altitude $(TOPDIR)/util
9 vpath make-kalman $(TOPDIR)/util
10 vpath kalman.5c $(TOPDIR)/kalman
11 vpath kalman_filter.5c $(TOPDIR)/kalman
12 vpath load_csv.5c $(TOPDIR)/kalman
13 vpath matrix.5c $(TOPDIR)/kalman
14 vpath ao-make-product.5c $(TOPDIR)/util
15
16 .SUFFIXES: .elf .ihx
17
18 .elf.ihx:
19         $(ELFTOHEX) --output=$@ $*.elf
20
21
22 ifndef VERSION
23 include $(TOPDIR)/Version
24 endif
25
26 ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex
27 CC=$(ARM_CC)
28
29 WARN_FLAGS=-Wall -Wextra -Werror
30
31 AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math -I$(TOPDIR) $(PDCLIB_INCLUDES) 
32 LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\
33         -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS)
34
35 NICKLE=nickle
36
37 LIBS=$(PDCLIB_LIBS_M0) -lgcc
38
39 V=0
40 # The user has explicitly enabled quiet compilation.
41 ifeq ($(V),0)
42 quiet = @printf "  $1 $2 $@\n"; $($1)
43 endif
44 # Otherwise, print the full command line.
45 quiet ?= $($1)
46
47 .c.o:
48         $(call quiet,CC) -c $(CFLAGS) -o $@ $<