3 #####################################################################
5 # Compiles Faust programs to jack-qt #
8 #####################################################################
15 #-------------------------------------------------------------------
16 # Analyze command arguments :
17 # faust options -> OPTIONS
18 # if -omp : -openmp or -fopenmp -> OPENMP
19 # existing *.dsp files -> FILES
22 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
23 # without having to configure CXX and CXXFLAGS
25 if [ "$p" = -icc ]; then
27 CXXFLAGS
='-O3 -xHost -ftz -fno-alias -fp-model fast=2'
31 #PHASE 2 : dispatch command arguments
33 if [ "$p" = -omp ]; then
34 if [[ $CXX == "icpc" ]]; then
41 if [ "$p" = -icc ]; then
43 elif [ $p = "-osc" ]; then
44 OSCINC
="INCLUDEPATH+=/usr/local/lib/faust/osclib"
45 QTDEFS
="DEFINES += OSCCTRL"
46 OSCLIB
="-L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
47 elif [ ${p:0:1} = "-" ]; then
49 elif [[ -e "$p" ]]; then
58 #-------------------------------------------------------------------
59 # Check darwin specifics
61 if [[ $
(uname
) == Darwin
]]; then
66 #-------------------------------------------------------------------
67 # compile the *.dsp files
73 SRCDIR
=$
(dirname "$p")
75 # creates a temporary dir
76 TDR
=$
(mktemp
-d faust.XXX
)
80 # compile faust to c++
81 faust
-a alsa-qt.cpp
$OPTIONS "$SRCDIR/$f" -o "$TMP/${f%.dsp}.cpp"
83 # compile c++ to binary
86 qmake
-project "INCLUDEPATH+=$CUR" "INCLUDEPATH+=/usr/local/lib/faust/" "$OSCINC" "LIBS+=-lasound $OSCLIB" "HEADERS+=/usr/local/lib/faust/gui/faustqt.h" "$QTDEFS"
91 rm -rf "$SRCDIR/${f%.dsp}$EXT"
92 cp -r "$TMP/${f%.dsp}$EXT" "$SRCDIR/${f%.dsp}$EXT"
95 # collect binary file name for FaustGIDE
96 BINARIES
="$BINARIES$SRCDIR/${f%.dsp}$EXT;"