268f186f831c4ff202f511912483e3c663a2bc81
[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_boot_chain.c \
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_cc1120.c \
47         ao_fec_tx.c \
48         ao_fec_rx.c \
49         ao_usb_stm.c \
50         ao_exti_stm.c \
51         ao_monitor.c \
52         ao_rssi.c \
53         ao_send_packet.c \
54         ao_packet_master.c \
55         ao_packet.c
56
57 PRODUCT=MegaDongle-v0.1
58 PRODUCT_DEF=-DMEGADONGLE
59 IDPRODUCT=0x0024
60
61 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
62
63 PROGNAME=megadongle-v0.1
64 PROG=$(PROGNAME)-$(VERSION).elf
65
66 SRC=$(ALTOS_SRC) ao_megadongle.c
67 OBJ=$(SRC:.c=.o)
68
69 all: $(PROG)
70
71 $(PROG): Makefile $(OBJ) altos.ld
72         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
73
74 $(OBJ): $(INC)
75
76 ao_product.h: ao-make-product.5c ../Version
77         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
78
79 distclean:      clean
80
81 clean:
82         rm -f *.o $(PROGNAME)-*.elf
83         rm -f ao_product.h
84
85 install:
86
87 uninstall: