2
###--------------------------------------------
3
### adjust flags to the system
6
system := $(shell uname -s)
8
ifeq ($(system), Darwin)
9
LIB := -I/Library/Frameworks/CsoundLib.framework/Headers -I/usr/local/include -framework CsoundLib -L/usr/local/lib -dynamiclib -arch i386
11
#LIB := -I/usr/local/include -lsndfile -lcsound -shared
12
LIB := -I/usr/include/csound -shared -fPIC
15
###For Windows with gcc/mingw:(if headers in /usr/local/include and libs in /usr/local/lib)
16
###g++ -O2 -shared -o myopcode.dylib myopcode.cpp -DOPCODE_NAME=myopcode -I/usr/local/include -lsndfile -lcsound32
19
###--------------------------------------------
20
### Build csound opcodes on Darwin or Linux (fx.dsp -> fx.cpp -> fx.dylib)
23
dspsrc := $(wildcard *.dsp)
24
##cppsrc := $(addprefix $(DEST), $(dspsrc:.dsp=.cpp))
25
opcodes := $(addprefix $(DEST), $(dspsrc:.dsp=.dylib))
32
$(DEST)%.dylib : %.dsp
33
faust $(VEC) -uim -a csound.cpp $< -o $@.cpp
34
$(CXX) -O3 $(CXXFLAGS) $(LIB) -DOPCODE_NAME=$(notdir $(@:.dylib=)) $@.cpp -o $@