Fun with makefiles.
authorrekado <rekado@elephly.net>
Sun, 15 Nov 2015 21:22:55 +0000 (22:22 +0100)
committerrekado <rekado@elephly.net>
Sun, 15 Nov 2015 21:22:55 +0000 (22:22 +0100)
02-song2/Makefile
03-circus/Makefile
04-white-noise/Makefile
Makefile [new file with mode: 0644]
targets.mk [new file with mode: 0644]

index a48ddb0335751bd0643e34cf553fd41a310375cd..322c0239a70dccc5ec0f8d03c9ae3ea4a0600718 100644 (file)
@@ -1,10 +1,2 @@
-SOUNDFONT = $(HOME)/FluidR3GM.sf2
-
-%.midi: %.ly parts/*.ly
-       lilypond $<
-
-%.wav: %.midi
-       fluidsynth -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<
-
-%.ogg: %.wav
-       oggenc $<
+NAME = 02-song2
+include ../targets.mk
index a48ddb0335751bd0643e34cf553fd41a310375cd..904233cb5c6310bf06e28a58733f2e57a6a703b8 100644 (file)
@@ -1,10 +1,2 @@
-SOUNDFONT = $(HOME)/FluidR3GM.sf2
-
-%.midi: %.ly parts/*.ly
-       lilypond $<
-
-%.wav: %.midi
-       fluidsynth -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<
-
-%.ogg: %.wav
-       oggenc $<
+NAME = 03-circus
+include ../targets.mk
index a48ddb0335751bd0643e34cf553fd41a310375cd..499bc02de7ee5ba717c943ea2a0e6e440e0d1793 100644 (file)
@@ -1,10 +1,2 @@
-SOUNDFONT = $(HOME)/FluidR3GM.sf2
-
-%.midi: %.ly parts/*.ly
-       lilypond $<
-
-%.wav: %.midi
-       fluidsynth -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<
-
-%.ogg: %.wav
-       oggenc $<
+NAME = 04-white-noise
+include ../targets.mk
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8f97c64
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+SUBDIRS := $(wildcard */.)
+
+all : $(SUBDIRS)
+
+$(SUBDIRS) :
+       $(MAKE) -C $@
+
+.PHONY : all $(SUBDIRS)
diff --git a/targets.mk b/targets.mk
new file mode 100644 (file)
index 0000000..f20026c
--- /dev/null
@@ -0,0 +1,13 @@
+SOUNDFONT = $(HOME)/FluidR3GM.sf2
+
+%.midi: %.ly parts/*.ly
+       lilypond $<
+
+%.wav: %.midi
+       fluidsynth -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<
+
+%.ogg: %.wav
+       oggenc $<
+
+wav: $(NAME).wav
+ogg: $(NAME).ogg