]> git.gag.com Git - fw/altos/blob - src/lambdakey-v1.0/Makefile
telemetrum-v4.0: MS5607 doesn't share SPI controller
[fw/altos] / src / lambdakey-v1.0 / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 include ../stmf0/Makefile.defs
7
8 aoschemelib=$(shell pkg-config --variable=aoschemelib ao-scheme)
9
10 include $(aoschemelib)/Makefile-scheme
11
12 INC = \
13         ao.h \
14         ao_arch.h \
15         ao_arch_funcs.h \
16         ao_boot.h \
17         ao_pins.h \
18         ao_product.h \
19         ao_task.h \
20         $(SCHEME_HDRS) \
21         ao_scheme_const.h \
22         stm32f0.h \
23         Makefile
24
25 ALTOS_SRC = \
26         ao_boot_chain.c \
27         ao_interrupt.c \
28         ao_product.c \
29         ao_cmd.c \
30         ao_led_stmf0.c \
31         ao_notask.c \
32         ao_stdio.c \
33         ao_panic.c \
34         ao_timer.c \
35         ao_usb_stm.c \
36         ao_romconfig.c \
37         $(SCHEME_SRCS)
38
39 PRODUCT=LambdaKey-v1.0
40 PRODUCT_DEF=-DLAMBDAKEY
41 IDPRODUCT=0x000a
42
43 CFLAGS = $(PRODUCT_DEF) -I. -I$(aoschemelib) $(STMF0_CFLAGS)
44
45 PROGNAME=lambdakey-v1.0
46 PROG=$(PROGNAME)-$(VERSION).elf
47 HEX=$(PROGNAME)-$(VERSION).ihx
48
49 SRC=$(ALTOS_SRC) ao_lambdakey.c
50 OBJ=$(SRC:.c=.o)
51
52 bletch:
53         echo lib is $(aoschemelib)
54
55 all: $(PROG) $(HEX)
56
57 $(PROG): Makefile $(OBJ)
58         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) -Wl,-M=$(PROGNAME).map
59
60 $(OBJ): $(INC)
61
62 ao_scheme_const.h: ao-scheme-make-const ao_scheme_basic_syntax.scheme
63         $^ -o $@ -d FLOAT,VECTOR,QUASI,BIGINT,POSIX,PORT,SAVE,UNDEF
64
65 load: $(PROG)
66         stm-load $(PROG)
67
68 distclean:      clean
69
70 clean:
71         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx ao_scheme_const.h
72         rm -f ao_product.h
73
74 install:
75
76 uninstall: