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