3 #####################################################################
5 # Compiles Faust programs to plotters #
8 #####################################################################
10 #-------------------------------------------------------------------
11 # Check darwin specifics
13 if [[ $
(uname
) == Darwin
]]; then
19 #-------------------------------------------------------------------
20 # Default compilation flags for gcc and icc :
22 MYGCCFLAGS
="-O3 $MARCH -mfpmath=sse -msse -msse2 -msse3 -ffast-math -ftree-vectorize"
23 MYICCFLAGS
="-O3 -xHost -ftz -fno-alias -fp-model fast=2"
25 #-------------------------------------------------------------------
26 # Analyze command arguments :
27 # faust options -> OPTIONS
28 # if -omp : -openmp or -fopenmp -> OPENMP
29 # existing *.dsp files -> FILES
32 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
33 # without having to configure CXX and CXXFLAGS
37 if [ "$p" = -icc ]; then
43 #PHASE 2 : dispatch command arguments
45 if [ "$p" = -omp ]; then
46 if [[ $CXX == "icpc" ]]; then
53 if [ "$p" = -icc ]; then
55 elif [ ${p:0:1} = "-" ]; then
57 elif [[ -e "$p" ]]; then
64 #-------------------------------------------------------------------
65 # compile the *.dsp files
69 # compile faust to c++
70 faust
-a matlabplot.cpp
$OPTIONS "$f" -o "$f.cpp"
72 # compile c++ to binary
74 ${CXX=g++} ${CXXFLAGS=-O3} $OMP "$f.cpp" -o "${f%.dsp}"
78 # collect binary file name for FaustWorks
79 BINARIES="$BINARIES${f%.dsp};"