cortexelf-v1: doodling with 1802 bits
[fw/altos] / src / cortexelf-v1 / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 include ../stm/Makefile.defs
7 LDFLAGS=-L../stm -Wl,-Tcortexelf.ld
8
9 INC = \
10         ao.h \
11         ao_arch.h \
12         ao_arch_funcs.h \
13         ao_boot.h \
14         ao_pins.h \
15         ao_kalman.h \
16         ao_product.h \
17         ao_profile.h \
18         ao_task.h \
19         math.h \
20         ao_mpu.h \
21         stm32l.h \
22         math.h \
23         ao_vga.h \
24         ao_draw.h \
25         ao_draw_int.h \
26         ao_font.h \
27         ao_ps2.h \
28         ao_lisp.h \
29         ao_lisp_const.h \
30         ao_lisp_os.h \
31         ao_flip_bits.h \
32         Makefile
33
34 #PROFILE=ao_profile.c
35 #PROFILE_DEF=-DAO_PROFILE=1
36
37 #STACK_GUARD=ao_mpu_stm.c
38 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
39
40
41 ALTOS_SRC = \
42         ao_boot_chain.c \
43         ao_interrupt.c \
44         ao_product.c \
45         ao_romconfig.c \
46         ao_cmd.c \
47         ao_config.c \
48         ao_task.c \
49         ao_stdio.c \
50         ao_panic.c \
51         ao_timer.c \
52         ao_mutex.c \
53         ao_serial_stm.c \
54         ao_dma_stm.c \
55         ao_spi_stm.c \
56         ao_usb_stm.c \
57         ao_exti_stm.c \
58         ao_i2c_stm.c \
59         ao_as1107.c \
60         ao_matrix.c \
61         ao_vga.c \
62         ao_blt.c \
63         ao_copy.c \
64         ao_rect.c \
65         ao_text.c \
66         ao_line.c \
67         ao_ps2.c \
68         ao_console.c \
69         ao_sdcard.c \
70         ao_bufio.c \
71         ao_fat.c \
72         ao_flash_stm.c \
73         ao_button.c \
74         ao_event.c \
75         ao_1802.c \
76         ao_lisp_lex.c \
77         ao_lisp_mem.c \
78         ao_lisp_cons.c \
79         ao_lisp_eval.c \
80         ao_lisp_string.c \
81         ao_lisp_atom.c \
82         ao_lisp_int.c \
83         ao_lisp_poly.c \
84         ao_lisp_builtin.c \
85         ao_lisp_read.c \
86         ao_lisp_rep.c \
87         ao_lisp_frame.c \
88         ao_lisp_error.c \
89         ao_lisp_lambda.c \
90         ao_lisp_save.c \
91         ao_lisp_stack.c \
92         ao_lisp_os_save.c \
93         $(PROFILE) \
94         $(SAMPLE_PROFILE) \
95         $(STACK_GUARD)
96
97 PRODUCT=CortexELF-v1
98 PRODUCT_DEF=-DCORTEXELF
99 IDPRODUCT=0x000a
100
101 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
102
103 PROGNAME=cortexelf-v1
104 PROG=$(PROGNAME)-$(VERSION).elf
105 HEX=$(PROGNAME)-$(VERSION).ihx
106
107 SRC=$(ALTOS_SRC) ao_cortexelf.c
108 OBJ=$(SRC:.c=.o)
109
110 all:: $(PROG) $(HEX)
111
112 $(PROG): Makefile $(OBJ) cortexelf.ld
113         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
114
115 ../altitude-pa.h: make-altitude-pa
116         nickle $< > $@
117
118 $(OBJ): $(INC)
119
120 ao_product.h: ao-make-product.5c ../Version
121         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
122
123 distclean:      clean
124
125 clean::
126         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
127         rm -f ao_product.h ao_flip_bits.h
128
129 ao_flip_bits.h: ao_flip_bits.5c
130         nickle ao_flip_bits.5c > $@
131
132 include ../lisp/Makefile-lisp
133
134 install:
135
136 uninstall: