white noise: change tempo earlier.
[music/pretentious.git] / Makefile
index e3e76a0a2c65826b4392c2828f0b8ae78abe7e3e..b8392f7f7b4323acc679d6edf4e23c50305c4353 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,38 @@
-SUBDIRS := $(wildcard 0*/)
+# What soundfont to use to generate the MIDI file
+SOUNDFONT = $(HOME)/soundfonts/FluidR3GM.sf2
+# Determine how many processors are present
+CPU_CORES=`grep -m1 "cpu cores" /proc/cpuinfo | tr -cd '[:digit:]'`
+# The command to run lilypond
+LILY_CMD = LILYPOND_USE_CHORDS=$(LILYPOND_USE_CHORDS) lilypond -dinclude-settings=settings.ly -ddelete-intermediate-files -drelative-includes -djob-count=$(CPU_CORES)
 
-all : $(SUBDIRS)
+# Append "-chords" to guide tracks when $(LILYPOND_USE_CHORDS) is set
+ifeq ($(LILYPOND_USE_CHORDS),1)
+  GUIDE_SUFFIX=-chords
+else
+  GUIDE_SUFFIX=-full
+endif
 
-guide: guide.wav
-guide.wav: $(addsuffix guide.wav,$(SUBDIRS)) | all
-       sox --combine concatenate $(sort $^) $@
+SUBDIRS := 01-song1 02-song2 03-circus 04-white-noise
 
-$(SUBDIRS) :
-       $(MAKE) -C $@
+all: $(SUBDIRS)
 
-%/guide.wav:
-       $(MAKE) -C $* guide
+clean:
+       - rm $(wildcard */guide.wav) $(wildcard $(addsuffix /*.wav,$(SUBDIRS)))
+       - rm $(wildcard */*.ogg)
 
-.PHONY : all $(SUBDIRS)
+NAME := 01-song1
+include rules.mk
+NAME := 02-song2
+include rules.mk
+NAME := 03-circus
+include rules.mk
+NAME := 04-white-noise
+include rules.mk
+
+upload: $(addsuffix /upload-ogg, $(SUBDIRS))
+
+.PHONY: $(SUBDIRS) \
+       $(addsuffix /upload-ogg, $(SUBDIRS)) \
+       $(addsuffix /upload-wav, $(SUBDIRS)) \
+       clean \
+       upload