77ef9c4a8e9c6a394f7f85be0cde32325260e8a5
[fw/altos] / src / telegps-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_pins.h \
13         ao_product.h \
14         ao_task.h \
15         ao_whiten.h \
16         ao_cc115l.h \
17         ao_fec.h \
18         stm32l.h \
19         ao_sdcard.h \
20         ao_bufio.h \
21         ao_fat.h \
22         Makefile
23
24
25 #PROFILE=ao_profile.c
26 #PROFILE_DEF=-DAO_PROFILE=1
27
28 #SAMPLE_PROFILE=ao_sample_profile.c \
29 #       ao_sample_profile_timer.c
30 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
31
32 #STACK_GUARD=ao_mpu_stm.c
33 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
34
35 MATH_SRC=\
36         ef_log.c
37
38 ALTOS_SRC = \
39         ao_boot_chain.c \
40         ao_interrupt.c \
41         ao_product.c \
42         ao_romconfig.c \
43         ao_cmd.c \
44         ao_config.c \
45         ao_task.c \
46         ao_led.c \
47         ao_stdio.c \
48         ao_panic.c \
49         ao_timer.c \
50         ao_mutex.c \
51         ao_freq.c \
52         ao_dma_stm.c \
53         ao_spi_stm.c \
54         ao_usb_stm.c \
55         ao_exti_stm.c \
56         ao_serial_stm.c \
57         ao_gps_skytraq.c \
58         ao_gps_show.c \
59         ao_cc115l.c \
60         ao_fec_tx.c \
61         ao_rfpa0133.c \
62         ao_aprs.c \
63         ao_eeprom_stm.c \
64         ao_sdcard.c \
65         ao_bufio.c \
66         ao_fat.c \
67         ao_log_fat.c \
68         ao_gps_report_mega.c \
69         ao_telemetry.c \
70         $(SAMPLE_PROFILE) \
71         $(MATH_SRC)
72
73 PRODUCT=TeleGPS-v0.1
74 PRODUCT_DEF=-DTELEGPS
75 IDPRODUCT=0x0025
76
77 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
78
79 PROGNAME=telegps-v0.1
80 PROG=$(PROGNAME)-$(VERSION).elf
81 HEX=$(PROGNAME)-$(VERSION).ihx
82
83 SRC=$(ALTOS_SRC) ao_telegps.c
84 OBJ=$(SRC:.c=.o)
85
86 all: $(PROG) $(HEX)
87
88 $(PROG): Makefile $(OBJ) altos.ld
89         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
90
91 $(OBJ): $(INC)
92
93 ao_product.h: ao-make-product.5c ../Version
94         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
95
96 distclean:      clean
97
98 clean:
99         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
100         rm -f ao_product.h
101
102 install:
103
104 uninstall: