ao-tools/ao-eeprom: Add support for TeleMega v5.0
[fw/altos] / src / easymini-v1.0 / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 include ../lpc/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         lpc.h
15
16 #
17 # Common AltOS sources
18 #
19 ALTOS_SRC = \
20         ao_interrupt.c \
21         ao_boot_chain.c \
22         ao_romconfig.c \
23         ao_product.c \
24         ao_mutex.c \
25         ao_panic.c \
26         ao_stdio.c \
27         ao_storage.c \
28         ao_report.c \
29         ao_ignite.c \
30         ao_flight.c \
31         ao_kalman.c \
32         ao_sample.c \
33         ao_data.c \
34         ao_convert_pa.c \
35         ao_convert_volt.c \
36         ao_task.c \
37         ao_log.c \
38         ao_log_mini.c \
39         ao_cmd.c \
40         ao_config.c \
41         ao_timer_lpc.c \
42         ao_exti_lpc.c \
43         ao_usb_lpc.c \
44         ao_spi_lpc.c \
45         ao_adc_lpc.c \
46         ao_beep_lpc.c \
47         ao_m25.c \
48         ao_ms5607.c
49
50 PRODUCT=EasyMini-v1.0
51 PRODUCT_DEF=-DEASYMINI_V_1_0
52 IDPRODUCT=0x0026
53
54 CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS)
55
56 PROGNAME=easymini-v1.0
57 PROG=$(PROGNAME)-$(VERSION).elf
58 HEX=$(PROGNAME)-$(VERSION).ihx
59 FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf
60 BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx
61
62 SRC=$(ALTOS_SRC) ao_easymini.c
63 OBJ=$(SRC:.c=.o)
64
65 all: $(PROG) $(HEX) $(BOTH_HEX)
66
67 $(PROG): Makefile $(OBJ) altos.ld
68         $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
69
70 $(BOTH_HEX): $(PROG) $(FLASH_PROG)
71         ../../ao-tools/ao-elftohex/ao-elftohex -n --output=$@ $(FLASH_PROG) $(PROG)
72
73 $(FLASH_PROG): FRC
74         +cd flash-loader && make
75
76 FRC:
77
78 $(OBJ): $(INC)
79
80 load: $(PROG)
81         lpc-load $(PROG)
82
83 distclean:      clean
84
85 clean:
86         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx $(PROGNAME)-*.map
87         rm -f ao_product.h
88
89 install:
90
91 uninstall: