3 #####################################################################
5 # Compiles a Faust program into a csound opcode #
8 #####################################################################
11 #-------------------------------------------------------------------
12 # Analyze command arguments :
13 # faust options -> OPTIONS
14 # if -omp : -openmp or -fopenmp -> OPENMP
15 # existing *.dsp files -> FILES
18 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
19 # without having to configure CXX and CXXFLAGS
21 if [ "$p" = -icc ]; then
23 CXXFLAGS
='-O3 -xT -ftz -fno-alias -fp-model fast=2'
27 #PHASE 2 : dispatch command arguments
29 if [ "$p" = -omp ]; then
30 if [[ $CXX == "icpc" ]]; then
37 if [ "$p" = -icc ]; then
39 elif [ ${p:0:1} = "-" ]; then
41 elif [[ -e "$p" ]]; then
49 #-------------------------------------------------------------------
50 # compile the *.dsp files
53 opname
=`basename ${SRC%.dsp}`
54 faust
-uim -double -a csound.cpp
$OPTIONS "$SRC" -o "$SRC.cpp"
55 ${CXX=g++} ${CXXFLAGS=-O3} $OMP -I/usr/include/csound -shared -fPIC -DOPCODE_NAME=$opname "$SRC.cpp" -o "${SRC%.dsp}.dylib
"
57 BINARIES="$BINARIES${SRC%.dsp}.dylib
;"
60 # return the binaries names