]> git.gag.com Git - fw/altos/blob - src/stm-flash/Makefile
altosdroid: Can only use message once
[fw/altos] / src / stm-flash / 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
16 #
17 # Common AltOS sources
18 #
19 ALTOS_SRC = \
20         ao_interrupt.c \
21         ao_boot_chain.c \
22         ao_boot_pin.c \
23         ao_product.c \
24         ao_notask.c \
25         ao_timer.c \
26         ao_usb_stm.c \
27         ao_flash_stm.c
28
29 PRODUCT=AltosFlash-$(VERSION)
30 PRODUCT_DEF=-DALTOS_FLASH
31 IDPRODUCT=0x000a
32
33 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os
34
35 PROG=altos-flash-$(VERSION).elf
36
37 SRC=$(ALTOS_SRC) ao_stm_flash.c
38 OBJ=$(SRC:.c=.o)
39
40 all: $(PROG)
41
42 LDFLAGS=-L../stm -Wl,-Taltos-loader.ld
43
44 $(PROG): Makefile $(OBJ)
45         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
46
47 ao_product.h: ao-make-product.5c ../Version
48         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
49
50 $(OBJ): $(INC)
51
52 distclean:      clean
53
54 clean:
55         rm -f *.o $(PROG)
56         rm -f ao_product.h
57
58 install:
59
60 uninstall: