c14ebafd2a3f8ba3d298ae2927864814b67f658a
3 #####################################################################
5 # Compiles Faust programs to jack-qt #
8 #####################################################################
9 PATH
=$PATH:/usr
/local
/bin
17 #-------------------------------------------------------------------
18 # Analyze command arguments :
19 # faust options -> OPTIONS
20 # if -omp : -openmp or -fopenmp -> OPENMP
21 # existing *.dsp files -> FILES
24 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
25 # without having to configure CXX and CXXFLAGS
27 if [ "$p" = "-icc" ]; then
29 CXXFLAGS
='-O3 -xT -ftz -fno-alias -fp-model fast=2'
33 #PHASE 2 : dispatch command arguments
35 if [ "$p" = -omp ]; then
36 if [[ $CXX == "icpc" ]]; then
41 elif [ "$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
62 SPEC
="-spec macx-g++ -Wnone"
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 ca-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+=-framework CoreAudio -framework AudioUnit -framework CoreServices $OSCLIB" "HEADERS+=/usr/local/lib/faust/gui/faustqt.h" "$QTDEFS"
89 ) > /dev
/null
#2>/dev/null
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;"