-# Building archives and the test0 app
+# Building archives and the test? apps
-PACKNL = ${HOME}/src/borta/packnl/packnl
+default: .archives
+
+####################
+SUBDIR = $(dir $(wildcard */Makefile))
-LSPSRC = lsp-dbus-test.lsp
-ARCHIVES = lsp-misc.a lsp-dbus.a
-DOCS = lsp-dbus.a.8 lsp-misc.a.8
+.PHONY: .archives
+.archives:
+ for D in ${SUBDIR} ; do $(MAKE) -C $$D ; done
-default: test0 docs
+.PHONY: .clean
+.clean:
+ for D in ${SUBDIR} ; do $(MAKE) -C $$D clean ; done
-include manpage.mk
-include lsplib.mk
+####################
+PACKNL = ${HOME}/src/borta/packnl/packnl
+define PACKNLACTION
+${PACKNL} -w $@ $< $(addprefix -A ,$(wordlist 2,1000,$^))
+endef
-.PHONY: docs
-docs: ${DOCS}
+test0: lsp-dbus-test.lsp
+test0: lsp-misc/lsp-misc.a lsp-dbus/lsp-dbus.a
+ ${PACKNLACTION}
-test0: lsp-dbus-test.lsp ${ARCHIVES}
- ${PACKNL} -w $@ $< $(addprefix -A ,${ARCHIVES})
+test1: lsp-alsa-test.lsp
+test1: lsp-alsa/pcm-dispatch.a lsp-alsa/libasound.a lsp-alsa/lib-utils.a
+ ${PACKNLACTION}
-clean:
- rm -f test0 ${CLEAN}
+clean: .clean
+ rm -f test0 test1