altos: Add DMA, SPI and MS5607 drivers
[fw/altos] / src / megametrum-v0.1 / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 include ../stm/Makefile.defs
7
8 INC = \
9         ao.h \
10         ao_arch.h \
11         ao_pins.h \
12         altitude.h \
13         ao_kalman.h \
14         ao_product.h
15
16 #
17 # Common AltOS sources
18 #
19 ALTOS_SRC = \
20         ao_interrupt.c \
21         ao_product.c \
22         ao_romconfig.c \
23         ao_cmd.c \
24         ao_config.c \
25         ao_task.c \
26         ao_led.c \
27         ao_stdio.c \
28         ao_panic.c \
29         ao_timer.c \
30         ao_mutex.c \
31         ao_serial_stm.c \
32         ao_gps_skytraq.c \
33         ao_cc1120.c \
34         ao_freq.c \
35         ao_dma_stm.c \
36         ao_spi_stm.c \
37         ao_ms5607.c
38
39 PRODUCT=MegaMetrum-v0.1
40 PRODUCT_DEF=-DMEGAMETRUM
41 IDPRODUCT=0x000a
42
43 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -O0 -g
44
45 PROG=megametrum-v0.1-$(VERSION).elf
46
47 SRC=$(ALTOS_SRC) ao_megametrum.c
48 OBJ=$(SRC:.c=.o)
49
50 all: $(PROG)
51
52 $(PROG): Makefile $(OBJ)
53         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
54
55 ../altitude.h: make-altitude
56         nickle $< > $@
57
58 $(OBJ): $(INC)
59
60 ao_product.h: ao-make-product.5c ../Version
61         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
62
63 ao_product.rel: ao_product.c ao_product.h
64         $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
65
66 distclean:      clean
67
68 clean:
69         rm -f $(OBJ)
70         rm -f ao_product.h
71
72 install:
73
74 uninstall: