4 #####################################################################
6 # Compiles Faust programs to ladspa plugins #
9 #####################################################################
11 #-------------------------------------------------------------------
12 # Check darwin specifics
14 if [[ $
(uname
) == Darwin
]]; then
22 #-------------------------------------------------------------------
23 # Analyze command arguments :
24 # faust options -> OPTIONS
25 # if -omp : -openmp or -fopenmp -> OPENMP
26 # existing *.dsp files -> FILES
29 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
30 # without having to configure CXX and CXXFLAGS
32 CXXFLAGS
='-O3 $MARCH -mfpmath=sse -msse -msse2 -msse3 -ffast-math'
35 if [ "$p" = -icc ]; then
37 CXXFLAGS
='-O3 -xT -ftz -fno-alias -fp-model fast=2'
41 #PHASE 2 : dispatch command arguments
43 if [ "$p" = -omp ]; then
44 if [[ $CXX == "icpc" ]]; then
51 if [ "$p" = -icc ]; then
53 elif [ $p = "-osc" ]; then
54 #option ignored for plugins
55 OSCDEFS
="-I/usr/local/lib/faust/osclib -DOSCCTRL -L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
56 elif [ ${p:0:1} = "-" ]; then
58 elif [[ -e "$p" ]]; then
67 #-------------------------------------------------------------------
68 # Check darwin specifics
70 if [[ $
(uname
) == Darwin
]]; then
80 #-------------------------------------------------------------------
81 # compile the *.dsp files as ladspa plugins
86 module
=`basename $f .dsp`
88 # compile faust to c++
89 faust
-a ladspa.cpp
$OPTIONS "$f" -o "$f.cpp"
91 # compile c++ to binary
93 ${CXX=g++} $CXXFLAGS $SPEC -Dmydsp=$module -I/usr
/local
/lib
/faust
"$f.cpp" -o $dst
97 # collect binary file name for FaustGIDE
98 BINARIES
="$BINARIES$dst;"