857667b04192b2c62510fab760f3712f72525e6d
[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_arch_funcs.h \
12         ao_data.h \
13         ao_sample.h \
14         ao_pins.h \
15         altitude.h \
16         ao_kalman.h \
17         ao_product.h \
18         ao_ms5607.h \
19         ao_hmc5883.h \
20         ao_mpu6000.h \
21         ao_cc1120_CC1120.h \
22         ao_whiten.h \
23         stm32l.h
24
25 #
26 # Common AltOS sources
27 #
28
29 #       ao_packet.c \
30 #       ao_packet_slave.c \
31
32 ALTOS_SRC = \
33         ao_interrupt.c \
34         ao_product.c \
35         ao_romconfig.c \
36         ao_cmd.c \
37         ao_config.c \
38         ao_task.c \
39         ao_led.c \
40         ao_stdio.c \
41         ao_panic.c \
42         ao_timer.c \
43         ao_mutex.c \
44         ao_serial_stm.c \
45         ao_gps_skytraq.c \
46         ao_freq.c \
47         ao_dma_stm.c \
48         ao_spi_stm.c \
49         ao_cc1120.c \
50         ao_fec_tx.c \
51         ao_viterbi.c \
52         ao_ms5607.c \
53         ao_adc_stm.c \
54         ao_beep_stm.c \
55         ao_storage.c \
56         ao_m25.c \
57         ao_usb_stm.c \
58         ao_exti_stm.c \
59         ao_report.c \
60         ao_i2c_stm.c \
61         ao_hmc5883.c \
62         ao_mpu6000.c \
63         ao_convert_pa.c \
64         ao_log.c \
65         ao_log_mega.c \
66         ao_sample_mm.c \
67         ao_kalman.c \
68         ao_flight_mm.c \
69         ao_telemetry.c
70
71
72 PRODUCT=MegaMetrum-v0.1
73 PRODUCT_DEF=-DMEGAMETRUM
74 IDPRODUCT=0x0023
75
76 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -Os -g
77
78 PROG=megametrum-v0.1-$(VERSION).elf
79
80 SRC=$(ALTOS_SRC) ao_megametrum.c
81 OBJ=$(SRC:.c=.o)
82
83 all: $(PROG)
84
85 $(PROG): Makefile $(OBJ)
86         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
87
88 ../altitude.h: make-altitude
89         nickle $< > $@
90
91 $(OBJ): $(INC)
92
93 ao_product.h: ao-make-product.5c ../Version
94         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
95
96 distclean:      clean
97
98 clean:
99         rm -f $(OBJ)
100         rm -f ao_product.h
101
102 install:
103
104 uninstall: