26d9eaa06b5ae8c97579eb8b766e30978c869186
[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         Makefile
20
21 #PROFILE=ao_profile.c
22 #PROFILE_DEF=-DAO_PROFILE=1
23
24 #SAMPLE_PROFILE=ao_sample_profile.c \
25 #       ao_sample_profile_timer.c
26 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
27
28 #STACK_GUARD=ao_mpu_stm.c
29 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
30
31 ALTOS_SRC = \
32         ao_interrupt.c \
33         ao_product.c \
34         ao_romconfig.c \
35         ao_cmd.c \
36         ao_config.c \
37         ao_task.c \
38         ao_led.c \
39         ao_stdio.c \
40         ao_panic.c \
41         ao_timer.c \
42         ao_mutex.c \
43         ao_freq.c \
44         ao_dma_stm.c \
45         ao_spi_stm.c \
46         ao_usb_stm.c \
47         ao_exti_stm.c \
48         ao_serial_stm.c \
49         ao_gps_skytraq.c \
50         ao_cc115l.c \
51         ao_fec_tx.c
52
53 PRODUCT=TeleGPS-v0.1
54 PRODUCT_DEF=-DTELEGPS
55 IDPRODUCT=0x0024
56
57 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
58
59 PROGNAME=telegps-v0.1
60 PROG=$(PROGNAME)-$(VERSION).elf
61
62 SRC=$(ALTOS_SRC) ao_telegps.c
63 OBJ=$(SRC:.c=.o)
64
65 all: $(PROG)
66
67 $(PROG): Makefile $(OBJ) altos.ld
68         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
69
70 $(OBJ): $(INC)
71
72 ao_product.h: ao-make-product.5c ../Version
73         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
74
75 distclean:      clean
76
77 clean:
78         rm -f *.o $(PROGNAME)-*.elf
79         rm -f ao_product.h
80
81 install:
82
83 uninstall: