~pbatch/patchwerk

patchwerk/examples/Makefile -rw-r--r-- 1.1 KiB
9c265356 — paul plan9 additions from Sigrid 4 months ago
                                                                                
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
NODEPATH=../dsp

CFLAGS += -I../ -DBLKSIZE=64 -g -O3 -I../dsp -Wall
LDFLAGS += ../libpatchwerk.a -lsoundpipe -lsndfile -lm

OBJ += sinosc.o scaler.o noisy.o adder.o

EXAMPLES=test_1 test_2 test_3 test_4 evn_sine \
	siren evn_test stress

default: $(EXAMPLES)

%.o: %.c
	$(CC) $(CFLAGS) -c $<  -o $@

test_1: test_1.c $(OBJ)
	$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LDFLAGS)

test_2: test_2.c $(OBJ)
	$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LDFLAGS)

test_3: test_3.c $(OBJ)
	$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LDFLAGS)

test_4: test_4.c $(OBJ)
	$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LDFLAGS)

evn_test: evn_test.c
	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

evn_sine: evn_sine.c
	$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LDFLAGS)

stress: stress.c
	$(CC) $(CFLAGS) $< -o $@ ../libpatchwerk.a

DSP_OBJ=$(addprefix ../dsp/,\
	sine.o \
	wavout.o \
	biscale.o \
	scale.o \
	blsaw.o \
	butlp.o \
	revsc.o \
	mul.o \
	dcblock.o \
	add.o \
)

siren: siren.c $(DSP_OBJ)
	$(CC) $(CFLAGS) $< $(DSP_OBJ) -o $@ $(LDFLAGS)

clean:
	rm -rf $(OBJ)
	rm -rf test_1
	rm -rf test_2
	rm -rf test_3
	rm -rf evn_test
	rm -rf evn_sine
	rm -rf test.wav
	rm -rf siren
	rm -rf $(DSP_OBJ)