4 #####################################################################
6 # Compiles Faust programs to alsa-gtk #
7 # (c) Grame, 2009-2011 #
9 #####################################################################
12 #-------------------------------------------------------------------
13 # Default compilation flags for gcc and icc :
15 MYGCCFLAGS
="-O3 -march=native -mfpmath=sse -msse -msse2 -msse3 -ffast-math -ftree-vectorize"
16 MYICCFLAGS
="-O3 -xHost -ftz -fno-alias -fp-model fast=2"
19 #-------------------------------------------------------------------
20 # Analyze command arguments :
21 # faust options -> OPTIONS
22 # if -omp : -openmp or -fopenmp -> OPENMP
23 # existing *.dsp files -> FILES
26 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
27 # without having to configure CXX and CXXFLAGS
31 if [ "$p" = -icc ]; then
37 #PHASE 2 : dispatch command arguments
39 if [ "$p" = -omp ]; then
40 if [[ $CXX == "icpc" ]]; then
47 if [ "$p" = -icc ]; then
49 elif [ $p = "-osc" ]; then
50 OSCDEFS
="-I/usr/local/lib/faust/osclib -DOSCCTRL -L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
51 elif [ ${p:0:1} = "-" ]; then
53 elif [[ -e "$p" ]]; then
63 #-------------------------------------------------------------------
64 # compile the *.dsp files using ALSA and GTK on linux
68 # compile faust to c++
69 faust
-a alsa-gtk.cpp
$OPTIONS "$f" -o "$f.cpp"
71 # compile c++ to binary
73 $CXX $CXXFLAGS $OMP -I/usr
/local
/lib
/faust
"$f.cpp" `pkg-config --cflags --libs alsa gtk+-2.0` $OSCDEFS -o "${f%.dsp}"
77 # collect binary file name for FaustGIDE
78 BINARIES
="$BINARIES${f%.dsp};"