SUBDIRS=
+ifeq ($(strip $(HAVE_PDCLIB)),yes)
+PDCLIB=pdclib
+CLEAN_PDCLIB=clean-pdclib
+endif
+
ifeq ($(strip $(HAVE_SDCC)),yes)
SUBDIRS+=$(SDCCDIRS)
endif
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 $< > $@
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