altos/telemetrum-v4.0: Almost building
[fw/altos] / src / telemetrum-v4.0 / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 include ../samd21/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_adxl375.h \
22         ao_cc1200_CC1200.h \
23         ao_task.h \
24         ao_whiten.h \
25         samd21.h \
26         Makefile
27
28 # SAMD21G17D
29
30 SAMD21_ROM=128
31 SAMD21_RAM=16
32
33 #PROFILE=ao_profile.c
34 #PROFILE_DEF=-DAO_PROFILE=1
35
36 #SAMPLE_PROFILE=ao_sample_profile.c \
37 #       ao_sample_profile_timer.c
38 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
39
40 #STACK_GUARD=ao_mpu_stm.c
41 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
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_samd21.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_samd21.c \
63         ao_spi_samd21.c \
64         ao_cc1200.c \
65         ao_fec_tx.c \
66         ao_fec_rx.c \
67         ao_data.c \
68         ao_ms5607.c \
69         ao_adxl375.c \
70         ao_adc_samd21.c \
71         ao_beep_stm.c \
72         ao_storage.c \
73         ao_m25.c \
74         ao_usb_samd21.c \
75         ao_exti_samd21.c \
76         ao_report.c \
77         ao_convert_pa.c \
78         ao_convert_volt.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         $(PROFILE) \
90         $(SAMPLE_PROFILE) \
91         $(STACK_GUARD)
92
93 PRODUCT=TeleMetrum-v4.0
94 PRODUCT_DEF=-DTELEMETRUM_V_4_0
95 IDPRODUCT=0x000b
96
97 CFLAGS = $(PRODUCT_DEF) $(SAMD21_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF)
98
99 PROGNAME=telemetrum-v4.0
100 PROG=$(PROGNAME)-$(VERSION).elf
101 HEX=$(PROGNAME)-$(VERSION).ihx
102
103 SRC=$(ALTOS_SRC) ao_telemetrum.c
104 OBJ=$(SRC:.c=.o)
105
106 all: $(PROG) $(HEX)
107
108 $(PROG): Makefile $(OBJ)
109         $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
110
111 $(OBJ): $(INC)
112
113 load: $(PROG)
114         stm-load $(PROG)
115
116 distclean:      clean
117
118 clean:
119         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx $(PROGNAME)-*.map
120         rm -f ao_product.h
121
122 install:
123
124 uninstall: