Difference between revisions of "Mex options"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
== gfortran == | == gfortran == | ||
<pre> | <pre> | ||
− | + | FC='gfortran | |
− | + | FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form' | |
− | + | FLIBS="$RPATH $MLIBS -lm" | |
− | + | FOPTIMFLAGS='-O' | |
− | + | FDEBUGFLAGS='-g' | |
</pre> | </pre> | ||
== g95 == | == g95 == | ||
<pre> | <pre> | ||
− | + | FC='g95' | |
− | + | FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form' | |
− | + | FLIBS="$RPATH $MLIBS -lm" | |
− | + | FOPTIMFLAGS='-O' | |
− | + | FDEBUGFLAGS='-g' | |
</pre> | </pre> | ||
== Intel Fortran == | == Intel Fortran == | ||
− | the directory path defined here in <tt>FLIBS</tt> is of course specific to your own intel fortran distribution and release number | + | the directory path defined here in <tt>FLIBS</tt> is of course '''specific''' to your own intel fortran distribution and release number |
<pre> | <pre> | ||
− | + | FC='ifort' | |
− | + | FFLAGS='-fPIC -u -w95 -free -warn all' | |
− | + | FLIBS='$RPATH $MLIBS -L/opt/intel/fce/9.1.045/lib -lm' | |
− | + | FOPTIMFLAGS='-O2' | |
− | + | FDEBUGFLAGS='-g' | |
</pre> | </pre> | ||
Latest revision as of 08:57, 22 February 2008
LINUX
gfortran
FC='gfortran FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form' FLIBS="$RPATH $MLIBS -lm" FOPTIMFLAGS='-O' FDEBUGFLAGS='-g'
g95
FC='g95' FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form' FLIBS="$RPATH $MLIBS -lm" FOPTIMFLAGS='-O' FDEBUGFLAGS='-g'
Intel Fortran
the directory path defined here in FLIBS is of course specific to your own intel fortran distribution and release number
FC='ifort' FFLAGS='-fPIC -u -w95 -free -warn all' FLIBS='$RPATH $MLIBS -L/opt/intel/fce/9.1.045/lib -lm' FOPTIMFLAGS='-O2' FDEBUGFLAGS='-g'
WINDOWS
Intel Fortran
The standard mexopts.bat file also needs to be slightly altered to compile the mex files on windows, /free must be added to the COMPFLAGS group
rem ******************************************************************** rem Compiler parameters rem ******************************************************************** set COMPILER=ifort set COMPFLAGS=/fpp /Qprec "/I%MATLAB%/extern/include" -c -nologo -DMATLAB_MEX_FILE /free set OPTIMFLAGS=/MD -Ox -DNDEBUG set DEBUGFLAGS=/MD -Zi /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb" set NAME_OBJECT=/Fo