aboutsummaryrefslogtreecommitdiff
path: root/transverb/makefile
blob: be155ce8c0e6df7bf13a5db90866920e23d6606e (plain)
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
# change this!!!
CXX=g++
CFLAGS=-O6 -mcpu=pentiumpro -g -ggdb
FLAGS=-DPD

FLEXTPATH=/usr/local/lib/pd/externs/flext
DFXINC=../dfx-library

INCLUDES=/usr/local/lib/pd/include $(FLEXTPATH) $(DFXINC)
FLEXTLIB=$(FLEXTPATH)/flext.a

LIBS=m

PDEXTRA=/usr/local/lib/pd/extra

TARGET=transverb~.pd_linux

SRCS=transverb.cpp $(DFXINC)/IIRfilter.cpp $(DFXINC)/FIRfilter.cpp

all: $(TARGET)

%.o : %.cpp %.h
	$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES)) $< -o $@

$(DFXINC)/%.o : $(DFXINC)/%.cpp
	$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES)) $< -o $@

$(TARGET) : $(patsubst %.cpp,%.o,$(SRCS)) $(FLEXTLIB) 
	$(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -o $@ 
	strip --strip-unneeded $@
	chmod 755 $@

install: $(TARGET)
	chown root.root $^ 
	cp $^ $(PDEXTRA)

.PHONY: clean
clean:
	rm -f *.o $(TARGET)