Mex options

From LIBISIS
Revision as of 08:56, 22 February 2008 by Dickon Champion (talk | contribs)
Jump to navigation Jump to search

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