aboutsummaryrefslogtreecommitdiff
path: root/dynamic.mk
blob: 07ab401df64d31482f9c701761b1dc5630634464 (about) (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.POSIX:


.SUFFIXES:
.SUFFIXES: .md .env .html .ly .flac .midi .ogg .pdf .flac

.md.env:
	sh src/development/frontmatter-env.sh < $< > $@

.md.html:
	sh src/development/genhtml.sh $< > $@

.ly.midi:
	lilypond -o $* $<

.midi.ogg:
	timidity -Ov $<

.flac.ogg:
	ffmpeg -y -i $< -ar 48000 -vn -c:a libvorbis -b:a 320k $@

default: all

include generated.mk


pastebins.env = $(pastebins.md:.md=.env)
pastebins.html = $(pastebins.md:.md=.html)
pastebins = $(pastebins.env) $(pastebins.html)

lilypond.pdf  = $(lilypond.ly:.ly=.pdf)
lilypond.midi = $(lilypond.ly:.ly=.midi)
lilypond.ogg  = $(lilypond.ly:.ly=.ogg)
lilypond = $(lilypond.pdf) $(lilypond.midi) $(lilypond.ogg)

podcasts.ogg = $(podcasts.flac:.flac=.ogg)
podcasts = $(podcasts.ogg)

ALL = \
	$(pastebins)     \
	$(lilypond)      \
	$(torrent-files) \
	$(podcasts)

all: $(ALL)

$(torrent-files):
	mktorrent -f -v -d -n $@ -o $@ -c '' "$(@D)/`basename $@ .torrent`"

clean:
	rm -f \
		$(ALL)