New directory tree, with preprocessor/ inside interpretor/.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / tools / faust2appls / faust2jackserver
diff --git a/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2appls/faust2jackserver b/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2appls/faust2jackserver
new file mode 100755 (executable)
index 0000000..fdf1fdd
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [[ $(uname) == Darwin ]]; then
+       #On Darwin build a Jack QT4 application using xcode
+       for f in $@; do
+       
+               CUR=$(pwd)
+               TMP=/var/tmp/${f%.dsp}
+       
+               rm -rf $TMP
+               install -d $TMP
+               
+               faust -a jack-qt.cpp $f -o $TMP/${f%.dsp}.cpp
+               
+               cd $TMP; qmake -project "INCLUDEPATH+=$CUR" "INCLUDEPATH+=/usr/local/lib/faust/" "LIBS+=-ljackserver" "HEADERS+=/usr/local/lib/faust/gui/faustqt.h" 
+               cd $TMP; qmake
+               echo toto
+               cd $TMP; xcodebuild -project ${f%.dsp}.xcodeproj
+               echo titi
+               cd $CUR; rm -rf ${f%.dsp}.app
+               cd $CUR; mv $TMP/build/Default/${f%.dsp}.app ${f%.dsp}.app
+               rm -rf $TMP
+               
+       done
+
+
+else
+       #On Linux (default) build a jack gtk application
+       for f in $@; do
+               faust -a jack-gtk.cpp $f -o $f.cpp
+               ${CXX=g++} ${CXXFLAGS=-O3} `pkg-config --cflags --libs jack gtk+-2.0` $f.cpp -o ${f%.dsp}
+       done
+
+fi