altos/fox: update product name to show v2, enable watchdog by default
[fw/altos] / src / fox1ihu / 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_watchdog.h \
15         ao_storage.h \
16         ao_task.h \
17         stm32l.h \
18         ao_sdcard.h \
19         ao_bufio.h \
20         ao_fat.h \
21         Makefile
22
23 #PROFILE=ao_profile.c
24 #PROFILE_DEF=-DAO_PROFILE=1
25
26 #SAMPLE_PROFILE=ao_sample_profile.c \
27 #       ao_sample_profile_timer.c
28 #SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
29
30 #STACK_GUARD=ao_mpu_stm.c
31 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
32
33 ALTOS_SRC = \
34         ao_interrupt.c \
35         ao_product.c \
36         ao_romconfig.c \
37         ao_cmd.c \
38         ao_task.c \
39         ao_led.c \
40         ao_stdio.c \
41         ao_panic.c \
42         ao_timer.c \
43         ao_mutex.c \
44         ao_dma_stm.c \
45         ao_spi_stm.c \
46         ao_usb_stm.c \
47         ao_exti_stm.c \
48         ao_adc_stm.c \
49         ao_data.c \
50         ao_storage.c \
51         ao_mr25.c \
52         ao_sdcard.c \
53         ao_bufio.c \
54         ao_fat.c \
55         ao_watchdog.c
56
57 PRODUCT=Fox1IHU-v2
58 PRODUCT_DEF=-DFOX
59 IDPRODUCT=0x0024
60
61 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
62
63 PROGNAME=fox1ihu-v0.1
64 PROG=$(PROGNAME)-$(VERSION).elf
65
66 SRC=$(ALTOS_SRC) ao_fox1ihu.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) $(SAT_CLIB) -lgcc
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: