]> git.gag.com Git - fw/altos/blob - src/micropeak-v2.0/Makefile
altos/fox: Enable system timer in flash loader and prod watchdog with it
[fw/altos] / src / micropeak-v2.0 / Makefile
1 #
2 # Tiny AltOS build
3 #
4 #
5
6 include ../stmf0/Makefile.defs
7
8 PUBLISH_DIR=$(HOME)/altusmetrumllc/Binaries
9 PUBLISH_HEX=$(PUBLISH_DIR)/$(HEX)
10
11 MICRO_SRC=\
12         ao_report_micro.c \
13         ao_log_micro.c \
14         ao_microflight.c \
15         ao_microkalman.c
16
17 ALTOS_SRC = \
18         ao_micropeak.c \
19         ao_spi_stm.c \
20         ao_dma_stm.c \
21         ao_led.c \
22         ao_timer.c \
23         ao_ms5607.c \
24         ao_exti_stm.c \
25         ao_convert_pa.c \
26         ao_romconfig.c \
27         ao_product.c \
28         ao_panic.c \
29         ao_stdio.c \
30         ao_serial_stm.c \
31         ao_usb_stm.c \
32         ao_mutex.c \
33         ao_interrupt.c \
34         ao_cmd.c \
35         ao_task.c \
36         ao_data.c \
37         ao_boot_chain.c \
38         ao_microflight.c \
39         ao_report_micro.c \
40         ao_storage_stm.c \
41         ao_storage.c \
42         ao_log_micro.c \
43         ao_microkalman.c
44
45 INC=\
46         ao.h \
47         ao_pins.h \
48         ao_arch.h \
49         ao_arch_funcs.h \
50         ao_exti.h \
51         ao_ms5607.h \
52         ao_log_micro.h \
53         ao_micropeak.h \
54         altitude-pa.h \
55         stm32f0.h
56
57 IDPRODUCT=0x14
58 PRODUCT=MicroPeak-v2.0
59 PRODUCT_DEF=-DMICROPEAK
60
61 CFLAGS = $(PRODUCT_DEF) $(STMF0_CFLAGS) -g -Os
62
63 PROGNAME=micropeak-v2.0
64 PROG=$(PROGNAME)-$(VERSION).elf
65 HEX=$(PROGNAME)-$(VERSION).ihx
66
67 SRC=$(ALTOS_SRC)
68 OBJ=$(SRC:.c=.o)
69
70 all: $(PROG) $(HEX)
71
72 LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stmf0 -Wl,-Tmicropeak.ld -n
73
74 $(PROG): Makefile $(OBJ) micropeak.ld
75         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
76
77 ao_product.h: ao-make-product.5c ../Version
78         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
79
80 ao_product.o: ao_product.c ao_product.h
81
82 distclean:      clean
83
84 clean:
85         rm -f *.o *.elf *.ihx
86         rm -f ao_product.h
87
88 publish: $(PUBLISH_HEX)
89
90 $(PUBLISH_HEX): $(HEX)
91         cp -a $(HEX) $@
92
93 ../altitude-pa.h: make-altitude-pa
94         nickle $< > $@
95
96 install:
97
98 uninstall:
99
100 $(OBJ): ao_product.h $(INC)