File: Makefile.csound

package info (click to toggle)
faust 0.9.46-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 15,256 kB
  • ctags: 9,961
  • sloc: cpp: 47,746; sh: 2,254; ansic: 1,503; makefile: 1,211; ruby: 950; yacc: 468; objc: 459; lex: 200; xml: 177
file content (38 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
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

###--------------------------------------------
### adjust flags to the system
###

system			:= $(shell uname -s)

ifeq ($(system), Darwin)
LIB := -I/Library/Frameworks/CsoundLib.framework/Headers -I/usr/local/include -framework CsoundLib -L/usr/local/lib -dynamiclib -arch i386
else
#LIB := -I/usr/local/include -lsndfile -lcsound -shared
LIB := -I/usr/include/csound -shared -fPIC
endif

###For Windows with gcc/mingw:(if headers in /usr/local/include and libs in /usr/local/lib)
###g++ -O2  -shared -o myopcode.dylib myopcode.cpp -DOPCODE_NAME=myopcode -I/usr/local/include -lsndfile -lcsound32


###--------------------------------------------
### Build csound opcodes on Darwin or Linux (fx.dsp -> fx.cpp -> fx.dylib)
###

dspsrc  := $(wildcard *.dsp)
##cppsrc  := $(addprefix $(DEST), $(dspsrc:.dsp=.cpp))
opcodes := $(addprefix $(DEST), $(dspsrc:.dsp=.dylib))



all :  $(opcodes)


$(DEST)%.dylib : %.dsp
	faust $(VEC) -uim -a csound.cpp $< -o $@.cpp
	$(CXX) -O3 $(CXXFLAGS) $(LIB) -DOPCODE_NAME=$(notdir $(@:.dylib=)) $@.cpp -o $@
	

clean :
	rm -f $(DEST)