~pbatch/patchwerk

ref: 5d5b944f3b7e10e4df9cfdaab7d023cb5bee314a patchwerk/runt/Makefile -rw-r--r-- 2.0 KiB
5d5b944f — paul added oscmorph 11 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
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
LIBS = -lsoundpipe -lsndfile -lm -lrunt -lpthread -ldl
CFLAGS = -fPIC -O3 -Wall -ansi -g -pedantic

# Local Runt
LIBS += -L$(HOME)/.runt/lib

# NOTE: it is important to include ../ before runt include

CFLAGS += -I$(HOME)/.runt/include # include this AFTER -I.
CFLAGS += -DNO_LIBSNDFILE

CONFIG?=config.mk
include $(CONFIG)

CFLAGS += -I../ -I.
NODEPATH=../dsp
CFLAGS += -I$(NODEPATH)

include $(NODEPATH)/config.mk

NODE_OBJ = $(addprefix $(NODEPATH)/, $(NODES))

OBJ += runt_patchwerk.o ../patchwerk.o nodes.o $(NODE_OBJ)

OBJ += $(addprefix nodes/r_, $(NODES) out.o)

OBJ += nodes/r_gain.o
# OBJ += nodes/r_diskin.o
OBJ += nodes/r_plotter.o
OBJ += nodes/r_rex.o
OBJ += nodes/r_ampdb.o
OBJ += nodes/r_const.o

# F-table operations
OBJ += ftbl/ftnew.o
OBJ += ftbl/gen_sine.o
OBJ += ftbl/gen_vals.o
OBJ += ftbl/loadwav.o
OBJ += ftbl/padsynth.o
OBJ += ftbl/ftbl.o
OBJ += ftbl/gen_sinesum.o
OBJ += ftbl/tblsize.o
OBJ += ftbl/tbldur.o
OBJ += ftbl/gen_composite.o
OBJ += ftbl/gen_triangle.o

# Buffer Stack Operations
OBJ += bstack/bdup.o
OBJ += bstack/bswap.o
OBJ += bstack/bhold.o
OBJ += bstack/bunhold.o
OBJ += bstack/bdrop.o

# cable operation
OBJ += cable.o

NAME = patchwerk

default: librunt_$(NAME).a rnt$(NAME)

librunt_$(NAME).a: $(OBJ)
	@echo "AR $@"
	@$(AR) rcs $@ $(OBJ)

rnt$(NAME): parse.c $(OBJ)
	@echo "Building rnt$(NAME)"
	@$(CC) $(CFLAGS) $< $(OBJ) -o $@ $(LIBS)

../patchwerk.c:
	@echo "Tangling Patchwerk"
	@cd ../; make patchwerk.c

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

nodes.o: nodes.c $(NODE_OBJ)
	@echo "CC $<"
	@$(CC) $(CFLAGS) -c $< -o $@

install: librunt_$(NAME).a rnt$(NAME)
	mkdir -p ~/.runt/lib
	mkdir -p ~/.runt/bin
	mkdir -p ~/.runt/include
	mkdir -p ~/.runt/plugins
	cp librunt_$(NAME).a ~/.runt/lib
	cp rnt$(NAME) ~/.runt/bin
	cp runt_patchwerk.h ~/.runt/include
	cp runt_ftbl.h ~/.runt/include
	cp ../patchwerk.h ~/.runt/include

config.mk: config.def.mk
	cp config.def.mk config.mk

clean:
	@echo "Cleaning"
	@rm -rf librunt_$(NAME).a $(OBJ)
	@rm -rf rnt$(NAME)
	@rm -rf test.wav