altos: Use flash loader on all STM products
[fw/altos] / src / telemega-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_companion.h \
13         ao_data.h \
14         ao_sample.h \
15         ao_pins.h \
16         altitude-pa.h \
17         ao_kalman.h \
18         ao_product.h \
19         ao_ms5607.h \
20         ao_hmc5883.h \
21         ao_mpu6000.h \
22         ao_mma655x.h \
23         ao_cc1120_CC1120.h \
24         ao_profile.h \
25         ao_task.h \
26         ao_whiten.h \
27         ao_sample_profile.h \
28         ao_mpu.h \
29         stm32l.h \
30         Makefile
31
32 #
33 # Common AltOS sources
34 #
35 #       ao_hmc5883.c
36
37 #PROFILE=ao_profile.c
38 #PROFILE_DEF=-DAO_PROFILE=1
39
40 #SAMPLE_PROFILE=ao_sample_profile.c \
41 #       ao_sample_profile_timer.c
42 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
43
44 #STACK_GUARD=ao_mpu_stm.c
45 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
46
47 ALTOS_SRC = \
48         ao_boot_chain.c \
49         ao_interrupt.c \
50         ao_product.c \
51         ao_romconfig.c \
52         ao_cmd.c \
53         ao_config.c \
54         ao_task.c \
55         ao_led.c \
56         ao_stdio.c \
57         ao_panic.c \
58         ao_timer.c \
59         ao_mutex.c \
60         ao_serial_stm.c \
61         ao_gps_skytraq.c \
62         ao_gps_report_mega.c \
63         ao_ignite.c \
64         ao_freq.c \
65         ao_dma_stm.c \
66         ao_spi_stm.c \
67         ao_cc1120.c \
68         ao_fec_tx.c \
69         ao_fec_rx.c \
70         ao_data.c \
71         ao_ms5607.c \
72         ao_mma655x.c \
73         ao_hmc5883.c \
74         ao_adc_stm.c \
75         ao_beep_stm.c \
76         ao_storage.c \
77         ao_m25.c \
78         ao_usb_stm.c \
79         ao_exti_stm.c \
80         ao_report.c \
81         ao_i2c_stm.c \
82         ao_mpu6000.c \
83         ao_convert_pa.c \
84         ao_log.c \
85         ao_log_mega.c \
86         ao_sample.c \
87         ao_kalman.c \
88         ao_flight.c \
89         ao_telemetry.c \
90         ao_packet_slave.c \
91         ao_packet.c \
92         ao_companion.c \
93         ao_pyro.c \
94         ao_aprs.c \
95         $(PROFILE) \
96         $(SAMPLE_PROFILE) \
97         $(STACK_GUARD)
98
99 PRODUCT=TeleMega-v0.1
100 PRODUCT_DEF=-DTELEMEGA
101 IDPRODUCT=0x0023
102
103 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
104
105 PROGNAME=telemega-v0.1
106 PROG=$(PROGNAME)-$(VERSION).elf
107
108 SRC=$(ALTOS_SRC) ao_telemega.c
109 OBJ=$(SRC:.c=.o)
110
111 all: $(PROG)
112
113 $(PROG): Makefile $(OBJ) altos.ld
114         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
115
116 ../altitude-pa.h: make-altitude-pa
117         nickle $< > $@
118
119 $(OBJ): $(INC)
120
121 ao_product.h: ao-make-product.5c ../Version
122         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
123
124 distclean:      clean
125
126 clean:
127         rm -f *.o $(PROGNAME)-*.elf
128         rm -f ao_product.h
129
130 install:
131
132 uninstall: