altos: Switch APRS to compressed position format
[fw/altos] / src / telemetrum-v2.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_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_mma655x.h \
21         ao_cc1120_CC1120.h \
22         ao_profile.h \
23         ao_task.h \
24         ao_whiten.h \
25         ao_sample_profile.h \
26         ao_mpu.h \
27         stm32l.h \
28         Makefile
29
30 #PROFILE=ao_profile.c
31 #PROFILE_DEF=-DAO_PROFILE=1
32
33 #SAMPLE_PROFILE=ao_sample_profile.c \
34 #       ao_sample_profile_timer.c
35 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
36
37 #STACK_GUARD=ao_mpu_stm.c
38 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
39
40 MATH_SRC=\
41         ef_log.c
42
43 ALTOS_SRC = \
44         ao_boot_chain.c \
45         ao_interrupt.c \
46         ao_product.c \
47         ao_romconfig.c \
48         ao_cmd.c \
49         ao_config.c \
50         ao_task.c \
51         ao_led.c \
52         ao_stdio.c \
53         ao_panic.c \
54         ao_timer.c \
55         ao_mutex.c \
56         ao_serial_stm.c \
57         ao_gps_ublox.c \
58         ao_gps_show.c \
59         ao_gps_report_metrum.c \
60         ao_ignite.c \
61         ao_freq.c \
62         ao_dma_stm.c \
63         ao_spi_stm.c \
64         ao_cc1120.c \
65         ao_fec_tx.c \
66         ao_fec_rx.c \
67         ao_data.c \
68         ao_ms5607.c \
69         ao_mma655x.c \
70         ao_adc_stm.c \
71         ao_beep_stm.c \
72         ao_storage.c \
73         ao_m25.c \
74         ao_usb_stm.c \
75         ao_exti_stm.c \
76         ao_eeprom_stm.c \
77         ao_report.c \
78         ao_convert_pa.c \
79         ao_log.c \
80         ao_log_metrum.c \
81         ao_sample.c \
82         ao_kalman.c \
83         ao_flight.c \
84         ao_telemetry.c \
85         ao_packet_slave.c \
86         ao_packet.c \
87         ao_companion.c \
88         ao_aprs.c \
89         $(MATH_SRC) \
90         $(PROFILE) \
91         $(SAMPLE_PROFILE) \
92         $(STACK_GUARD)
93
94 PRODUCT=TeleMetrum-v2.0
95 PRODUCT_DEF=-DTELEMETRUM_V_2_0
96 IDPRODUCT=0x000b
97
98 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
99
100 PROGNAME=telemetrum-v2.0
101 PROG=$(PROGNAME)-$(VERSION).elf
102 HEX=$(PROGNAME)-$(VERSION).ihx
103
104 SRC=$(ALTOS_SRC) ao_telemetrum.c
105 OBJ=$(SRC:.c=.o)
106
107 all: $(PROG) $(HEX)
108
109 $(PROG): Makefile $(OBJ) altos.ld
110         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
111
112 ../altitude-pa.h: make-altitude-pa
113         nickle $< > $@
114
115 $(OBJ): $(INC)
116
117 ao_product.h: ao-make-product.5c ../Version
118         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
119
120 distclean:      clean
121
122 clean:
123         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
124         rm -f ao_product.h
125
126 install:
127
128 uninstall: