This repository has been archived by the owner on Jul 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
89 lines (63 loc) · 1.52 KB
/
Makefile
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.PHONY: pdf
CFLAGS=-fPIC -Wall -ansi -g -pedantic -O3
SP_LDFLAGS = -lsoundpipe -lsndfile -lm
LDFLAGS=-lsporth $(SP_LDFLAGS) -lpthread -ldl
# for more readable C output:
#CTANGLE=ctanglex +c -l
SPORTH_FILES= sp/test.tex sp/chant.tex sp/unya.tex sp/rant.tex
PLOTS=plots/tract.eps plots/nose.eps \
plots/tongueshape1.eps\
plots/tongueshape2.eps\
plots/tongueshape3.eps\
plots/tongueshape4.eps\
WEB=data.w top.w ugen.w glottis.w header.w debug.w tract.w sp.w
CONFIG?=
include $(CONFIG)
default: libvoc.a
pdf: voc.pdf
plugin: voc.so
library: libvoc.a
version:
git rev-parse HEAD > version
voc.tex: voc.w macros.tex $(WEB) $(PLOTS) $(SPORTH_FILES) version
$(CWEAVE) -x voc.w
voc.dvi: voc.tex
tex "\let\pdf+ \input voc"
bibtex voc
voc.pdf: voc.dvi
dvipdfm $<
voc.c: voc.w $(WEB)
$(CTANGLE) $<
debug.c: voc.c
plot.c: voc.c
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
sp/%.tex: sp/%.sp
sporth_tex $< > $@
voc.so: ugen.c voc.o
$(CC) $(CFLAGS) -DBUILD_SPORTH_PLUGIN -shared voc.o $< -o $@ $(LDFLAGS)
debug: debug.o voc.c
$(CC) $(CFLAGS) debug.o voc.c -o $@
plot: plot.o voc.c
$(CC) $(CFLAGS) plot.o voc.c -o $@ $(SP_LDFLAGS)
plots/%.dat: plot
./plot $@ > $@
plots/%.eps: plots/%.plt plots/%.dat
gnuplot $<
libvoc.a: voc.o
$(AR) rcs $@ voc.o
clean:
rm -rf voc.tex *.dvi *.idx *.log *.pdf *.sc *.toc *.scn
rm -rf *.c
rm -rf $(SP)
rm -rf voc.so
rm -rf *.aux *.bbl *.blg
rm -rf voc.h
rm -rf debug
rm -rf *.o
rm -rf plot
rm -rf plots/*.eps
rm -rf plots/*.dat
rm -rf version
rm -rf sp/*.tex
rm -rf libvoc.a