6bb87ad94a0cc55932d3fed70cab81a5a56d51df
4 #####################################################################
6 # Compiles Faust programs to dssi plugins #
9 #####################################################################
12 #-------------------------------------------------------------------
13 # Analyze command arguments :
14 # faust options -> OPTIONS
15 # if -omp : -openmp or -fopenmp -> OPENMP
16 # existing *.dsp files -> FILES
19 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
20 # without having to configure CXX and CXXFLAGS
22 if [ "$p" = -icc ]; then
24 CXXFLAGS
='-O3 -xT -ftz -fno-alias -fp-model fast=2'
28 #PHASE 2 : dispatch command arguments
30 if [ "$p" = -omp ]; then
31 if [[ $CXX == "icpc" ]]; then
38 if [ "$p" = -icc ]; then
40 elif [ $p = "-osc" ]; then
41 #option ignored for dssi plugins
42 OSCDEFS
="-I/usr/local/lib/faust/osclib -DOSCCTRL -L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
43 elif [ ${p:0:1} = "-" ]; then
45 elif [[ -e "$p" ]]; then
54 #-------------------------------------------------------------------
55 # Check darwin specifics
57 if [[ $
(uname
) == Darwin
]]; then
67 #-------------------------------------------------------------------
68 # compile the *.dsp files as dssi plugins
74 # compile faust to c++
75 faust
-a dssi.cpp
$OPTIONS "$f" -o "$f.cpp"
77 # compile c++ to binary
79 ${CXX=g++} -I.
-Wall -O2 -fPIC -DPIC $SPEC $CXXFLAGS "$f.cpp" -o $dst
83 # collect binary file name for FaustGIDE
84 BINARIES
="$BINARIES$dst;"