altos: Add telefire-v0.1
[fw/altos] / src / Makefile
1 #
2 # AltOS build
3 #
4
5 vpath make-altitude util
6 vpath make-altitude-pa util
7 vpath make-kalman util
8 vpath make-whiten util
9 vpath kalman.5c kalman
10 vpath kalman_filter.5c kalman
11 vpath load_csv.5c kalman
12 vpath matrix.5c kalman
13
14 include Version
15
16 ifneq ($(shell which sdcc),)
17         SUBDIRS+=\
18         telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \
19         teledongle-v0.2 teledongle-v0.1 \
20         telemini-v1.0 telenano-v0.1 \
21         telebt-v0.0 telebt-v0.1 \
22         telemetrum-v0.1-sky telemetrum-v0.1-sirf \
23         telelaunch-v0.1 tidongle test \
24         teleterra-v0.2 teleshield-v0.1 \
25         telefire-v0.1
26 endif
27
28 ifneq ($(shell which avr-gcc),)
29         SUBDIRS += telescience-v0.1 telepyro-v0.1
30 endif
31
32 ifneq ($(shell which arm-none-eabi-gcc),)
33         SUBDIRS += megametrum-v0.1 stm-bringup stm-demo 
34 endif
35
36 all: all-local all-recursive
37
38 RECURSIVE_TARGETS = all-recursive clean-recursive install-recursive
39
40 $(RECURSIVE_TARGETS):
41         @target=`echo $@ | sed 's/-recursive//'`; \
42         for subdir in $(SUBDIRS); do \
43                 echo "Making $$target in $$subdir"; \
44                 (cd $$subdir && $(MAKE) $$target) || exit 1; \
45         done
46
47 distclean:      clean
48
49 clean: clean-local clean-recursive
50
51 install: install-recursive
52
53 uninstall:
54
55 all-recursive: all-local
56
57 all-local: altitude.h altitude-pa.h ao_kalman.h ao_whiten.h
58
59 altitude.h: make-altitude
60         nickle $< > $@
61
62 altitude-pa.h: make-altitude-pa
63         nickle $< > $@
64
65 ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
66         bash $< kalman > $@
67
68 ao_whiten.h: make-whiten
69         nickle $< > $@
70
71 clean-local:
72         rm -f altitude.h ao_kalman.h