]> git.gag.com Git - fw/altos/blob - src/telemega-v0.1/Makefile
altos/easymini-v2.0: Add EasyMini v2.0
[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_quaternion.h \
29         math.h \
30         ao_mpu.h \
31         stm32l.h \
32         Makefile
33
34 #
35 # Common AltOS sources
36 #
37 #       ao_hmc5883.c
38
39 #PROFILE=ao_profile.c
40 #PROFILE_DEF=-DAO_PROFILE=1
41
42 #SAMPLE_PROFILE=ao_sample_profile.c \
43 #       ao_sample_profile_timer.c
44 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
45
46 #STACK_GUARD=ao_mpu_stm.c
47 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
48
49 MATH_SRC=\
50         ef_acos.c \
51         ef_sqrt.c \
52         ef_rem_pio2.c \
53         kf_cos.c \
54         kf_sin.c \
55         kf_rem_pio2.c \
56         sf_copysign.c \
57         sf_cos.c \
58         sf_sin.c \
59         sf_fabs.c \
60         sf_floor.c \
61         sf_scalbn.c \
62         ef_log.c
63
64 ALTOS_SRC = \
65         ao_boot_chain.c \
66         ao_interrupt.c \
67         ao_product.c \
68         ao_romconfig.c \
69         ao_cmd.c \
70         ao_config.c \
71         ao_task.c \
72         ao_led.c \
73         ao_stdio.c \
74         ao_panic.c \
75         ao_timer.c \
76         ao_mutex.c \
77         ao_serial_stm.c \
78         ao_gps_skytraq.c \
79         ao_gps_show.c \
80         ao_gps_report_mega.c \
81         ao_ignite.c \
82         ao_freq.c \
83         ao_dma_stm.c \
84         ao_spi_stm.c \
85         ao_cc1120.c \
86         ao_fec_tx.c \
87         ao_fec_rx.c \
88         ao_data.c \
89         ao_ms5607.c \
90         ao_mma655x.c \
91         ao_hmc5883.c \
92         ao_adc_stm.c \
93         ao_beep_stm.c \
94         ao_eeprom_stm.c \
95         ao_storage.c \
96         ao_m25.c \
97         ao_usb_stm.c \
98         ao_exti_stm.c \
99         ao_report.c \
100         ao_i2c_stm.c \
101         ao_mpu6000.c \
102         ao_convert_pa.c \
103         ao_convert_volt.c \
104         ao_log.c \
105         ao_log_mega.c \
106         ao_sample.c \
107         ao_kalman.c \
108         ao_flight.c \
109         ao_telemetry.c \
110         ao_packet_slave.c \
111         ao_packet.c \
112         ao_companion.c \
113         ao_pyro.c \
114         ao_aprs.c \
115         $(MATH_SRC) \
116         $(PROFILE) \
117         $(SAMPLE_PROFILE) \
118         $(STACK_GUARD)
119
120 PRODUCT=TeleMega-v0.1
121 PRODUCT_DEF=-DTELEMEGA
122 IDPRODUCT=0x0023
123
124 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
125
126 PROGNAME=telemega-v0.1
127 PROG=$(PROGNAME)-$(VERSION).elf
128 HEX=$(PROGNAME)-$(VERSION).ihx
129
130 SRC=$(ALTOS_SRC) ao_telemega.c
131 OBJ=$(SRC:.c=.o)
132
133 all: $(PROG) $(HEX)
134
135 $(PROG): Makefile $(OBJ) altos.ld
136         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
137
138 ../altitude-pa.h: make-altitude-pa
139         nickle $< > $@
140
141 $(OBJ): $(INC)
142
143 ao_product.h: ao-make-product.5c ../Version
144         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
145
146 distclean:      clean
147
148 clean:
149         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
150         rm -f ao_product.h
151
152 install:
153
154 uninstall: