summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--02-song2/Makefile12
-rw-r--r--03-circus/Makefile12
-rw-r--r--04-white-noise/Makefile12
-rw-r--r--Makefile8
-rw-r--r--targets.mk13
5 files changed, 27 insertions, 30 deletions
diff --git a/02-song2/Makefile b/02-song2/Makefile
index a48ddb0..322c023 100644
--- a/02-song2/Makefile
+++ b/02-song2/Makefile
@@ -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
diff --git a/03-circus/Makefile b/03-circus/Makefile
index a48ddb0..904233c 100644
--- a/03-circus/Makefile
+++ b/03-circus/Makefile
@@ -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
diff --git a/04-white-noise/Makefile b/04-white-noise/Makefile
index a48ddb0..499bc02 100644
--- a/04-white-noise/Makefile
+++ b/04-white-noise/Makefile
@@ -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
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
index 0000000..f20026c
--- /dev/null
+++ b/targets.mk
@@ -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