summaryrefslogtreecommitdiff
path: root/targets.mk
blob: c4e7fe9c8437ac0764a919aff04ad9365b0e66ba (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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 -ddelete-intermediate-files -drelative-includes -djob-count=$(CPU_CORES)

parts/%.pdf: parts/%.ly music/%.ly
	$(LILY_CMD) $<

%.pdf: %.ly music/*.ly
	$(LILY_CMD) $<

%.midi: %.ly music/*.ly
	$(LILY_CMD) $<

%.wav: %.midi
	fluidsynth -r 48000 -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<

%.ogg: %.wav
	oggenc $<

wav: $(NAME).wav
ogg: $(NAME).ogg

upload-ogg: ogg
	scp $(NAME).ogg elephly.net:~/elephly.net/secret/band/$(NAME)/$(NAME).ogg

upload-wav: wav
	scp $(NAME).wav elephly.net:~/elephly.net/secret/band/$(NAME)/$(NAME).wav