Remove stale stm test apps from regular build
[fw/altos] / src / Makefile
index ee76c32579af451cd4d0ebd33e40fde6876315b8..0ca101c07c526a3457fcfa9d0e0171d1eff621f2 100644 (file)
@@ -13,6 +13,7 @@ vpath load_csv.5c kalman
 vpath matrix.5c kalman
 
 include Version
+include Makedefs
 
 SDCCDIRS=\
        telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \
@@ -20,40 +21,50 @@ SDCCDIRS=\
        telemini-v1.0 \
        telebt-v1.0 \
        teleterra-v0.2 teleshield-v0.1 \
-       telefire-v0.1 telefire-v0.2
+       telefire-v0.1 telefire-v0.2 \
+       telemini-v2.0
 
-AVRDIRS=\
-       telescience-v0.1 telescience-pwm micropeak
-
-ARMDIRS=\
+ARMM3DIRS=\
        telemega-v0.1 telemega-v0.1/flash-loader \
-       telemega-v0.3 telemega-v0.3/flash-loader \
+       telemega-v1.0 telemega-v1.0/flash-loader \
+       telemetrum-v2.0 telemetrum-v2.0/flash-loader \
        megadongle-v0.1 megadongle-v0.1/flash-loader \
-       telegps-v0.1 telegps-v0.1/flash-loader \
-       stm-bringup stm-demo \
+       telegps-v0.3 telegps-v0.3/flash-loader \
        telelco-v0.2 telelco-v0.2/flash-loader \
        telescience-v0.2 telescience-v0.2/flash-loader
 
 ARMM0DIRS=\
-       easymini-v0.1
+       easymini-v1.0 easymini-v1.0/flash-loader
+
+AVRDIRS=\
+       telescience-v0.1 telescience-pwm micropeak nanopeak-v0.1
+
+SUBDIRS=
 
-ifneq ($(shell which sdcc),)
-       SUBDIRS += $(SDCCDIRS)
+ifeq ($(strip $(HAVE_PDCLIB)),yes)
+PDCLIB=pdclib
+CLEAN_PDCLIB=clean-pdclib
 endif
 
-ifneq ($(shell which avr-gcc),)
-       SUBDIRS += $(AVRDIRS)
+ifeq ($(strip $(HAVE_SDCC)),yes)
+SUBDIRS+=$(SDCCDIRS)
 endif
 
-ifneq ($(shell which /opt/cortex/bin/arm-none-eabi-gcc),)
-       SUBDIRS += $(ARMDIRS)
+ifeq ($(strip $(HAVE_ARM_M3_CC)),yes)
+SUBDIRS+=$(ARMM3DIRS)
+foo=bar
 endif
 
-ifneq ($(shell which /usr/bin/arm-none-eabi-gcc),)
-       SUBDIRS += $(ARMM0DIRS)
+ifeq ($(strip $(HAVE_ARM_M0_CC)),yes)
+SUBDIRS+=$(ARMM0DIRS)
+baz=bletch
 endif
 
-ALLDIRS=$(SDCCDIRS) $(AVRDIRS) $(ARMDIRS)
+ifeq ($(strip $(HAVE_AVR_CC)),yes)
+SUBDIRS += $(AVRDIRS)
+endif
+
+ALLDIRS=$(SDCCDIRS) $(ARMM3DIRS) $(ARMM0DIRS) $(AVRDIRS)
 
 all: all-local all-recursive
 
@@ -85,7 +96,7 @@ uninstall:
 
 all-recursive: all-local
 
-all-local: altitude.h altitude-pa.h ao_kalman.h ao_whiten.h
+all-local: altitude.h altitude-pa.h ao_kalman.h ao_whiten.h $(PDCLIB)
 
 altitude.h: make-altitude
        nickle $< > $@
@@ -99,5 +110,11 @@ ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
 ao_whiten.h: make-whiten
        nickle $< > $@
 
-clean-local:
+clean-local: $(CLEAN_PDCLIB)
        rm -f altitude.h ao_kalman.h
+
+pdclib:
+       cd ../pdclib && mkdir -p opt/include opt/lib && make && make prefix=`pwd`/opt install
+
+clean-pdclib:
+       cd ../pdclib && make clean && rm -rf opt
\ No newline at end of file