forked from luiseduardohdbackup/Sporth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
92 lines (61 loc) · 2.08 KB
/
Makefile
File metadata and controls
92 lines (61 loc) · 2.08 KB
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
#default: hash stacks func
#default: func
default: sporth
MASTER_MAKEFILE=1
CFLAGS += -O3 -fPIC -L./ -I ./ -Wall
ifdef DEBUG_MODE
CFLAGS += -DDEBUG_MODE
endif
UGENS = basic metro tenv fm revsc gen_sine osc gen_vals tseq in port \
nsmp prop noise dcblock butlp buthp maygate randi rpt reverse \
samphold delay switch mode clip p count f gen_sinesum gen_line \
dmetro gbuzz jitter diskin pluck tin jcrev scale tenv2 moogladder \
vdelay t line expon ling mincer loadfile poly saw square bitcrush \
dist tenvx pan randh
include ugens/ling/Makefile
include ugens/poly/Makefile
BIN += sporth examples/parse examples/user_function util/jack_wrapper util/val \
util/float2bin
OBJ += $(addprefix ugens/, $(addsuffix .o, $(UGENS)))
OBJ += func.o plumber.o stack.o parse.o hash.o
SPORTHLIBS = libsporth.a
ifndef NO_DYNAMIC
SPORTHLIBS += libsporth_dyn.so
endif
%.o: %.c h/ugens.h
gcc $(CFLAGS) -g -c -Ih $< -o $@
ugens/%.o: ugens/%.c
gcc $(CFLAGS) -g -Ih -c $< -o $@
util/jack_wrapper: util/jack_wrapper.c
gcc $< -ljack -lsoundpipe -lsndfile -o jack_wrapper -lm
val: util/val
util/val: util/val.c
gcc $< -o $@
float2bin: util/float2bin
util/float2bin: util/float2bin.c
gcc $< -o $@
sporth: sporth.c $(OBJ) h/ugens.h
gcc sporth.c $(CFLAGS) -g -Ih -o $@ $(OBJ) -lsoundpipe -lsndfile -lm
libsporth_dyn.so: $(OBJ)
ld -shared -fPIC -o $@ $(OBJ)
libsporth.a: $(OBJ) tmp.h
ar rcs libsporth.a $(OBJ)
tmp.h: $(OBJ)
sh util/header_gen.sh
examples/parse: examples/parse.c libsporth.a h/ugens.h
gcc $< $(CFLAGS) -g -Ih -o $@ libsporth.a -lsoundpipe -lsndfile -lm
examples/user_function: examples/user_function.c libsporth.a h/ugens.h
gcc $< $(CFLAGS) -g -Ih -o $@ libsporth.a -lsoundpipe -lsndfile -lm
include util/luasporth/Makefile
install: $(SPORTHLIBS) sporth tmp.h
install sporth /usr/local/bin
install tmp.h /usr/local/include/sporth.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
clean:
rm -rf $(OBJ)
rm -rf $(BIN)
rm -rf tmp.h
rm -rf libsporth.a libsporth.so