b1358b7c48a3673683029d0bba1f99bb260c2032
4 #####################################################################
6 # Compiles Faust programs to jack-gtk #
7 # (c) Grame, 2009-2011 #
9 #####################################################################
11 #-------------------------------------------------------------------
12 # Check darwin specifics
14 if [[ $
(uname
) == Darwin
]]; then
20 #-------------------------------------------------------------------
21 # Default compilation flags for gcc and icc :
23 MYGCCFLAGS
="-O3 $MARCH -mfpmath=sse -msse -msse2 -msse3 -ffast-math -ftree-vectorize"
24 MYICCFLAGS
="-O3 -xHost -ftz -fno-alias -fp-model fast=2"
27 #-------------------------------------------------------------------
28 # Analyze command arguments :
29 # faust options -> OPTIONS
30 # if -omp : -openmp or -fopenmp -> OPENMP
31 # existing *.dsp files -> FILES
34 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
35 # without having to configure CXX and CXXFLAGS
39 if [ "$p" = -icc ]; then
46 #PHASE 2 : dispatch command arguments
48 if [ "$p" = -omp ]; then
49 if [[ $CXX == "icpc" ]]; then
56 if [ "$p" = -icc ]; then
58 elif [ $p = "-osc" ]; then
59 OSCDEFS
="-I/usr/local/lib/faust/osclib -DOSCCTRL -L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
60 elif [ ${p:0:1} = "-" ]; then
62 elif [[ -e "$p" ]]; then
72 #-------------------------------------------------------------------
73 # compile the *.dsp files using JACK-GTK on linux
77 # compile faust to c++
78 faust
-a jack-gtk.cpp
$OPTIONS "$f" -o "$f.cpp"
80 # compile c++ to binary
82 $CXX $CXXFLAGS $OMP -I/usr
/local
/lib
/faust
"$f.cpp" `pkg-config --cflags --libs jack gtk+-2.0` $OSCDEFS -o "${f%.dsp}"
86 # collect binary file name for FaustWorks
87 BINARIES
="$BINARIES${f%.dsp};"