f633d12e3a719be94b56d74dd813101b98177a4c
3 #####################################################################
5 # Compiles Faust programs to plotters #
8 #####################################################################
11 #-------------------------------------------------------------------
12 # Analyze command arguments :
13 # faust options -> OPTIONS
14 # if -omp : -openmp or -fopenmp -> OPENMP
15 # existing *.dsp files -> FILES
18 # PHASE 1 : Look for -icc option to force use of intel icc (actually icpc)
19 # without having to configure CXX and CXXFLAGS
21 if [ "$p" = -icc ]; then
23 CXXFLAGS
='-O3 -xT -ftz -fno-alias -fp-model fast=2'
27 #PHASE 2 : dispatch command arguments
29 if [ "$p" = -omp ]; then
30 if [[ $CXX == "icpc" ]]; then
37 if [ "$p" = -icc ]; then
39 elif [ ${p:0:1} = "-" ]; then
41 elif [[ -e "$p" ]]; then
49 #-------------------------------------------------------------------
50 # compile the *.dsp files
54 # compile faust to c++
55 faust
-a matlabplot.cpp
$OPTIONS "$f" -o "$f.cpp"
57 # compile c++ to binary
59 ${CXX=g++} ${CXXFLAGS=-O3} $OMP "$f.cpp" -o "${f%.dsp}"
62 # run binary to generate data file
63 ./"${f%.dsp}" -n 60000 > "${f%.dsp}.m
"
66 octave --persist ${f%.dsp}.m
69 # collect binary file name for FaustWorks
70 BINARIES="$BINARIES${f%.dsp};"