990968c2f48ca1b5d77229220384f8ebf63a631b
[fw/altos] / src / stm-demo / 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_product.c \
22         ao_romconfig.c \
23         ao_cmd.c \
24         ao_task.c \
25         ao_led.c \
26         ao_stdio.c \
27         ao_panic.c \
28         ao_timer.c \
29         ao_serial_stm.c \
30         ao_lcd_stm.c \
31         ao_lcd_font.c \
32         ao_mutex.c \
33         ao_dma_stm.c \
34         ao_spi_stm.c \
35         ao_adc_stm.c \
36         ao_data.c \
37         ao_i2c_stm.c \
38         ao_usb_stm.c \
39         ao_exti_stm.c
40
41 PRODUCT=StmDemo-v0.0
42 PRODUCT_DEF=-DSTM_DEMO
43 IDPRODUCT=0x000a
44
45 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os
46
47 PROG=stm-demo-$(VERSION)
48 ELF=$(PROG).elf
49 IHX=$(PROG).ihx
50
51 SRC=$(ALTOS_SRC) ao_demo.c
52 OBJ=$(SRC:.c=.o)
53
54 all: $(ELF) $(IHX)
55
56 LDFLAGS=-L../stm -Wl,-Taltos.ld
57
58 $(ELF): Makefile $(OBJ)
59         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
60
61 ao_product.h: ao-make-product.5c ../Version
62         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
63
64 $(OBJ): $(INC)
65
66 distclean:      clean
67
68 clean:
69         rm -f *.o $(PROG)
70         rm -f ao_product.h
71
72 install:
73
74 uninstall: