Oops, forgot the TeleBT-v3.0 Makefile
[fw/altos] / src / telebt-v3.0 / 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_boot.h \
13         ao_pins.h \
14         ao_product.h \
15         ao_cc1200_CC1200.h \
16         ao_profile.h \
17         ao_task.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_boot_chain.c \
33         ao_interrupt.c \
34         ao_product.c \
35         ao_romconfig.c \
36         ao_cmd.c \
37         ao_config.c \
38         ao_data.c \
39         ao_task.c \
40         ao_led.c \
41         ao_stdio.c \
42         ao_panic.c \
43         ao_timer.c \
44         ao_mutex.c \
45         ao_serial_stm.c \
46         ao_freq.c \
47         ao_dma_stm.c \
48         ao_spi_stm.c \
49         ao_cc1200.c \
50         ao_adc_stm.c \
51         ao_btm.c \
52         ao_usb_stm.c \
53         ao_exti_stm.c \
54         ao_eeprom_stm.c \
55         ao_convert_volt.c \
56         ao_packet_master.c \
57         ao_packet.c \
58         $(PROFILE) \
59         $(SAMPLE_PROFILE) \
60         $(STACK_GUARD)
61
62 PRODUCT=TeleBT-v3.0
63 PRODUCT_DEF=-DTELEBT_V_3_0
64 IDPRODUCT=0x000e
65
66 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
67
68 PROGNAME=telebt-v3.0
69 PROG=$(PROGNAME)-$(VERSION).elf
70 HEX=$(PROGNAME)-$(VERSION).ihx
71
72 SRC=$(ALTOS_SRC) ao_telebt.c
73 OBJ=$(SRC:.c=.o)
74
75 all: $(PROG) $(HEX)
76
77 $(PROG): Makefile $(OBJ) altos.ld
78         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
79
80 $(OBJ): $(INC)
81
82 ao_product.h: ao-make-product.5c ../Version
83         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
84
85 distclean:      clean
86
87 clean:
88         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
89         rm -f ao_product.h
90
91 install:
92
93 uninstall: