recovered
[rrq/lsp-utils.git] / Makefile
index a6575e261ee72839242a631d0386d419daf78897..1b32ebc1f59a2c274061e4c67ae8a88d656db3a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,36 @@
+# Building archives and the test? apps
 
-LSPLIB = -A lsp-misc/lsp-misc.a -A lsp-dbus/lsp-dbus.a
+default: .archives
 
-LSPSRC = lsp-dbus-test.lsp
+####################
+SUBDIR = $(dir $(wildcard */Makefile))
+
+.PHONY: .archives
+.archives:
+       @for D in ${SUBDIR} ; do $(MAKE) -C $$D ; done
+
+.PHONY: .clean
+.clean:
+       for D in ${SUBDIR} ; do $(MAKE) -C $$D clean ; done
+
+%.8: %.8.adoc
+       asciidoctor -b manpage $<
+
+####################
+PACKNL = ${HOME}/src/borta/packnl/packnl
+define PACKNLACTION
+${PACKNL} -w $@ $< ${EXTRA} $(addprefix -A ,$(wordlist 2,1000,$^))
+endef
+
+test0: lsp-misc/lsp-misc.a lsp-dbus/lsp-dbus.a
+test0: lsp-dbus-test.lsp
+       ${PACKNLACTION}
+
+test1: EXTRA = ex2.conf
+test1: lsp-alsa/lsp-pcm-dispatch.a lsp-alsa/lsp-libasound.a
+test1: lsp-alsa-test.lsp lsp-misc/lsp-misc.a
+       ${PACKNLACTION}
+
+clean: .clean
+       rm -f test0 test1
 
-test0: ${LSPSRC}
-        ${HOME}/src/borta/packnl/packnl -w $@ $^ ${LSPLIB}