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