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