altos: Provide build hooks for sampling profiler in telegps
[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 ALTOS_SRC = \
36         ao_interrupt.c \
37         ao_product.c \
38         ao_romconfig.c \
39         ao_cmd.c \
40         ao_config.c \
41         ao_task.c \
42         ao_led.c \
43         ao_stdio.c \
44         ao_panic.c \
45         ao_timer.c \
46         ao_mutex.c \
47         ao_freq.c \
48         ao_dma_stm.c \
49         ao_spi_stm.c \
50         ao_usb_stm.c \
51         ao_exti_stm.c \
52         ao_serial_stm.c \
53         ao_gps_skytraq.c \
54         ao_cc115l.c \
55         ao_fec_tx.c \
56         ao_rfpa0133.c \
57         ao_aprs.c \
58         ao_storage.c \
59         ao_eeprom_stm.c \
60         ao_sdcard.c \
61         ao_bufio.c \
62         ao_fat.c \
63         ao_log_fat.c \
64         ao_gps_report_mega.c \
65         ao_telemetry.c \
66         $(SAMPLE_PROFILE)
67
68 PRODUCT=TeleGPS-v0.1
69 PRODUCT_DEF=-DTELEGPS
70 IDPRODUCT=0x0024
71
72 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
73
74 PROGNAME=telegps-v0.1
75 PROG=$(PROGNAME)-$(VERSION).elf
76
77 SRC=$(ALTOS_SRC) ao_telegps.c
78 OBJ=$(SRC:.c=.o)
79
80 all: $(PROG)
81
82 $(PROG): Makefile $(OBJ) altos.ld
83         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
84
85 $(OBJ): $(INC)
86
87 ao_product.h: ao-make-product.5c ../Version
88         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
89
90 distclean:      clean
91
92 clean:
93         rm -f *.o $(PROGNAME)-*.elf
94         rm -f ao_product.h
95
96 install:
97
98 uninstall: