altos: Move common build definitions to src/Makefile.defs
[fw/altos] / src / telemega-v3.0 / 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_boot.h \
13         ao_companion.h \
14         ao_data.h \
15         ao_sample.h \
16         ao_pins.h \
17         altitude-pa.h \
18         ao_kalman.h \
19         ao_product.h \
20         ao_ms5607.h \
21         ao_mpu9250.h \
22         ao_mma655x.h \
23         ao_cc1200_CC1200.h \
24         ao_profile.h \
25         ao_task.h \
26         ao_whiten.h \
27         ao_sample_profile.h \
28         ao_quaternion.h \
29         ao_mpu.h \
30         stm32l.h \
31         ao_ms5607_convert.c \
32         Makefile
33
34 #
35 # Common AltOS sources
36 #
37
38 #PROFILE=ao_profile.c
39 #PROFILE_DEF=-DAO_PROFILE=1
40
41 #SAMPLE_PROFILE=ao_sample_profile.c \
42 #       ao_sample_profile_timer.c
43 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
44
45 #STACK_GUARD=ao_mpu_stm.c
46 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
47
48 ALTOS_SRC = \
49         ao_boot_chain.c \
50         ao_interrupt.c \
51         ao_product.c \
52         ao_romconfig.c \
53         ao_cmd.c \
54         ao_config.c \
55         ao_task.c \
56         ao_led_stm.c \
57         ao_stdio.c \
58         ao_panic.c \
59         ao_timer.c \
60         ao_mutex.c \
61         ao_serial_stm.c \
62         ao_gps_ublox.c \
63         ao_gps_show.c \
64         ao_gps_report_mega.c \
65         ao_ignite.c \
66         ao_freq.c \
67         ao_dma_stm.c \
68         ao_spi_stm.c \
69         ao_cc1200.c \
70         ao_data.c \
71         ao_ms5607.c \
72         ao_mma655x.c \
73         ao_adc_stm.c \
74         ao_beep_stm.c \
75         ao_eeprom_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_mpu9250.c \
83         ao_convert_pa.c \
84         ao_convert_volt.c \
85         ao_log.c \
86         ao_log_mega.c \
87         ao_sample.c \
88         ao_kalman.c \
89         ao_flight.c \
90         ao_telemetry.c \
91         ao_packet_slave.c \
92         ao_packet.c \
93         ao_companion.c \
94         ao_pyro.c \
95         ao_aprs.c \
96         ao_pwm_stm.c \
97         $(PROFILE) \
98         $(SAMPLE_PROFILE) \
99         $(STACK_GUARD)
100
101 PRODUCT=TeleMega-v3.0
102 PRODUCT_DEF=-DTELEMEGA
103 IDPRODUCT=0x0023
104
105 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF)
106
107 PROGNAME=telemega-v3.0
108 PROG=$(PROGNAME)-$(VERSION).elf
109 HEX=$(PROGNAME)-$(VERSION).ihx
110
111 SRC=$(ALTOS_SRC) ao_telemega.c
112 OBJ=$(SRC:.c=.o)
113
114 all: $(PROG) $(HEX)
115
116 $(PROG): Makefile $(OBJ) altos.ld
117         $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
118
119 $(OBJ): $(INC)
120
121 distclean:      clean
122
123 clean:
124         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
125         rm -f ao_product.h
126
127 install:
128
129 uninstall: