-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
121 lines (86 loc) · 2.46 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
default: sporth
MASTER_MAKEFILE=1
CFLAGS += -O3 -fPIC -I/usr/local/include -Wall -ansi
include config.mk
ifdef DEBUG_MODE
CFLAGS += -DDEBUG_MODE -DPOLY_DEBUG
endif
ifdef LIVE_CODING
CFLAGS += -DLIVE_CODING
OBJ += util/listener.o
LIBS += -lpthread
endif
ifdef BUILD_JACK
CFLAGS += -DBUILD_JACK -DLIVE_CODING
OBJ += util/sp_jack.o
LIBS += -ljack
endif
ifdef NO_LIBDL
CFLAGS += -DNO_LIBDL
else
LIBS += -ldl
endif
include ugens/cdb/Makefile
ifdef BUILD_POLYSPORTH
include ugens/polysporth/Makefile
else
CFLAGS += -DNO_POLYSPORTH
endif
BIN += util/val util/float2bin util/sporthdot util/lsys util/ugen_dump \
util/sporth_tex
OBJ += $(addprefix ugens/, $(addsuffix .o, $(UGENS)))
OBJ += func.o plumber.o stack.o parse.o hash.o ftmap.o
SPORTHLIBS = libsporth.a
LIBS += -lsoundpipe -lsndfile -lm
config.mk: config.def.mk
cp config.def.mk config.mk
%.o: %.c h/ugens.h
$(CC) $(CFLAGS) -g -c -Ih -I. $< -o $@
ugens/%.o: ugens/%.c
$(CC) $(CFLAGS) -g -Ih -I. -c $< -o $@
util/jack_wrapper: util/jack_wrapper.c
$(CC) $< -ljack $(LIBS) -o jack_wrapper -lm
val: util/val
util/val: util/val.c
$(CC) $< -o $@
ugen_dump: util/ugen_dump
util/ugen_dump: util/ugen_dump.c
$(CC) $(CFLAGS) -Ih $< -o $@
float2bin: util/float2bin
util/float2bin: util/float2bin.c
$(CC) $< -o $@
jacksporth: util/jacksporth
util/jacksporth: util/jacksporth.c libsporth.a
$(CC) $< -L. -lsporth $(LIBS) -lm -ljack -llo -o $@
sporthdot: util/sporthdot
util/sporthdot: util/sporthdot.c libsporth.a
$(CC) $< $(CFLAGS) -Ih libsporth.a $(LIBS) -lm -ljack -o $@
lsys: util/lsys
util/lsys: ugens/lsys.c
$(CC) -DLSYS_STANDALONE $< -o $@
sporth_tex: util/sporth_tex
util/sporth_tex: util/sporth_tex.c libsporth.a
$(CC) -Ih $(CFLAGS) $< -o $@ libsporth.a $(LIBS)
sporth: sporth.c $(OBJ) h/ugens.h
$(CC) sporth.c -L/usr/local/lib $(CFLAGS) -g -Ih -o $@ $(OBJ) $(KOBJ) $(LIBS)
libsporth.a: $(OBJ) sporth.h
$(AR) rcs libsporth.a $(KOBJ) $(OBJ)
sporth.h: $(OBJ)
sh util/header_gen.sh
install: $(SPORTHLIBS) sporth sporth.h
install sporth /usr/local/bin
install sporth.h /usr/local/include/sporth.h
install ugens/cdb/cdb.h /usr/local/include/cdb.h
install $(SPORTHLIBS) /usr/local/lib
mkdir -p /usr/local/share/sporth
install ugen_reference.txt /usr/local/share/sporth
install util/ugen_lookup /usr/local/bin
install util/spparse /usr/local/bin
./util/installer.sh $(BIN)
./ugens/polysporth/install.sh
clean:
rm -rf $(OBJ)
rm -rf $(BIN)
rm -rf sporth.h
rm -rf libsporth.a libsporth_dyn.so
rm -rf sporth