altos: Restructure altos build to prepare for multi-arch support
[fw/altos] / src / Makefile
1 #
2 # AltOS build
3 #
4 #
5
6 vpath make-altitude util
7 vpath make-kalman util
8 vpath kalman.5c kalman
9 vpath kalman_filter.5c kalman
10 vpath load_csv.5c kalman
11 vpath matrix.5c kalman
12
13 include Version
14
15 SUBDIRS=\
16         telemetrum-v1.1 telemetrum-v1.0 \
17         teledongle-v0.2 teledongle-v0.1 \
18         telemini-v1.0 telenano-v0.1 \
19         telebt-v0.0 telebt-v0.1 \
20         telemetrum-v0.1-sky telemetrum-v0.1-sirf \
21         tidongle test
22
23 all: all-local all-recursive
24
25 RECURSIVE_TARGETS = all-recursive clean-recursive install-recursive
26
27 $(RECURSIVE_TARGETS):
28         @target=`echo $@ | sed 's/-recursive//'`; \
29         for subdir in $(SUBDIRS); do \
30                 echo "Making $$target in $$subdir"; \
31                 (cd $$subdir && $(MAKE) $$target) || exit 1; \
32         done
33
34 distclean:      clean
35
36 clean: clean-local clean-recursive
37
38 install: install-recursive
39
40 uninstall:
41
42 all-recursive: all-local
43
44 all-local: altitude.h ao_kalman.h
45
46 altitude.h: make-altitude
47         nickle $< > $@
48
49 ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
50         sh $< kalman > $@
51
52 clean-local:
53         rm -f altitude.h ao_kalman.h