~ubuntu-branches/ubuntu/saucy/faust/saucy

« back to all changes in this revision

Viewing changes to examples/faust-stk/Makefile.csound

  • Committer: Package Import Robot
  • Author(s): Mario Lang
  • Date: 2012-04-04 13:52:01 UTC
  • mfrom: (1.1.6) (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120404135201-hpsrk87x3hga94tc
Tags: 0.9.46-2
* Fix "ftbfs with GCC-4.7":
  - debian/patches/unistd: Include <unistd.h> where necessary.
    (Closes: #667163)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
###--------------------------------------------
 
3
### adjust flags to the system
 
4
###
 
5
 
 
6
system                  := $(shell uname -s)
 
7
 
 
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
 
10
else
 
11
#LIB := -I/usr/local/include -lsndfile -lcsound -shared
 
12
LIB := -I/usr/include/csound -shared -fPIC
 
13
endif
 
14
 
 
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
 
17
 
 
18
 
 
19
###--------------------------------------------
 
20
### Build csound opcodes on Darwin or Linux (fx.dsp -> fx.cpp -> fx.dylib)
 
21
###
 
22
 
 
23
dspsrc  := $(wildcard *.dsp)
 
24
##cppsrc  := $(addprefix $(DEST), $(dspsrc:.dsp=.cpp))
 
25
opcodes := $(addprefix $(DEST), $(dspsrc:.dsp=.dylib))
 
26
 
 
27
 
 
28
 
 
29
all :  $(opcodes)
 
30
 
 
31
 
 
32
$(DEST)%.dylib : %.dsp
 
33
        faust $(VEC) -uim -a csound.cpp $< -o $@.cpp
 
34
        $(CXX) -O3 $(CXXFLAGS) $(LIB) -DOPCODE_NAME=$(notdir $(@:.dylib=)) $@.cpp -o $@
 
35
        
 
36
 
 
37
clean :
 
38
        rm -f $(DEST)