|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# mexopts.sh Shell script for configuring MEX-file creation script,
|
|
kusano |
7d535a |
# mex.
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# usage: Do not call this file directly; it is sourced by the
|
|
kusano |
7d535a |
# mex shell script. Modify only if you don't like the
|
|
kusano |
7d535a |
# defaults after running mex. No spaces are allowed
|
|
kusano |
7d535a |
# around the '=' in the variable assignment.
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# SELECTION_TAGs occur in template option files and are used by MATLAB
|
|
kusano |
7d535a |
# tools, such as mex and mbuild, to determine the purpose of the contents
|
|
kusano |
7d535a |
# of an option file. These tags are only interpreted when preceded by '#'
|
|
kusano |
7d535a |
# and followed by ':'.
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
#SELECTION_TAG_MEX_OPT: Template Options file for building MEXfiles using the native compiler
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Copyright (c) 1984-1998 by The MathWorks, Inc.
|
|
kusano |
7d535a |
# All Rights Reserved.
|
|
kusano |
7d535a |
# $Revision: 1.40 $ $Date: 1997/12/05 20:18:39 $
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
case "$Arch" in
|
|
kusano |
7d535a |
Undetermined)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
# Change this line if you need to specify the location of the MATLAB
|
|
kusano |
7d535a |
# root directory. The cmex script needs to know where to find utility
|
|
kusano |
7d535a |
# routines so that it can determine the architecture; therefore, this
|
|
kusano |
7d535a |
# assignment needs to be done while the architecture is still
|
|
kusano |
7d535a |
# undetermined.
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
MATLAB="$MATLAB"
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
alpha)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='-ieee -std1'
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O2 -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS='-shared'
|
|
kusano |
7d535a |
FLIBS='-lUfor -lfor -lFutil'
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O2'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='ld'
|
|
kusano |
7d535a |
LDFLAGS="-expect_unresolved '*' -shared -hidden -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
hp700)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='+z -D_HPUX_SOURCE -Aa +DA1.1'
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS='+z +DA1.1'
|
|
kusano |
7d535a |
FLIBS=''
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='ld'
|
|
kusano |
7d535a |
LDFLAGS="-b +e $ENTRYPOINT +e mexVersion"
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
ibm_rs)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='-qlanglvl=ansi'
|
|
kusano |
7d535a |
CLIBS='-lm'
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS=''
|
|
kusano |
7d535a |
FLIBS="$MATLAB/extern/lib/ibm_rs/fmex1.o -lm"
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='cc'
|
|
kusano |
7d535a |
LDFLAGS="-bI:$MATLAB/extern/lib/ibm_rs/exp.ibm_rs -bE:$MATLAB/extern/lib/ibm_rs/$MAPFILE -bM:SRE -e $ENTRYPOINT"
|
|
kusano |
7d535a |
LDOPTIMFLAGS='-s'
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
lnx86)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='gcc'
|
|
kusano |
7d535a |
CFLAGS=''
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Use these flags for using f2c and gcc for Fortan MEX-Files
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f2c'
|
|
kusano |
7d535a |
FOPTIMFLAGS=''
|
|
kusano |
7d535a |
FFLAGS=''
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
FLIBS='-lf2c -Wl,--defsym,MAIN__=mexfunction_'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Use these flags for using the Absoft F77 Fortran Compiler
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# FC='f77'
|
|
kusano |
7d535a |
# FOPTIMFLAGS=''
|
|
kusano |
7d535a |
# FFLAGS='-f -N1 -N9 -N70'
|
|
kusano |
7d535a |
# FDEBUGFLAGS='-gg'
|
|
kusano |
7d535a |
# FLIBS='-lf77'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='gcc'
|
|
kusano |
7d535a |
LDFLAGS='-shared -rdynamic'
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
sgi)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='-ansi -mips2'
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS=''
|
|
kusano |
7d535a |
FLIBS=''
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='ld'
|
|
kusano |
7d535a |
LDFLAGS="-shared -U -Bsymbolic -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
sgi64)
|
|
kusano |
7d535a |
# R8000 only: The default action of mex is to generate full MIPS IV
|
|
kusano |
7d535a |
# (R8000) instruction set.
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='-ansi -mips4 -64'
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS='-mips4 -64'
|
|
kusano |
7d535a |
FLIBS=''
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='ld'
|
|
kusano |
7d535a |
LDFLAGS="-mips4 -64 -shared -U -Bsymbolic -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
sol2)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='cc'
|
|
kusano |
7d535a |
CFLAGS='-dalign'
|
|
kusano |
7d535a |
CLIBS=''
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS='-dalign'
|
|
kusano |
7d535a |
FLIBS=''
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='/usr/ccs/bin/ld'
|
|
kusano |
7d535a |
LDFLAGS="-G -M $MATLAB/extern/lib/sol2/$MAPFILE"
|
|
kusano |
7d535a |
LDOPTIMFLAGS=''
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
sun4)
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
# A dry run of the appropriate compiler is done in the mex script to
|
|
kusano |
7d535a |
# generate the correct library list. Use -v option to see what
|
|
kusano |
7d535a |
# libraries are actually being linked in.
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
CC='acc'
|
|
kusano |
7d535a |
CFLAGS='-DMEXSUN4'
|
|
kusano |
7d535a |
CLIBS="$MATLAB/extern/lib/sun4/libmex.a -lm"
|
|
kusano |
7d535a |
COPTIMFLAGS='-O -DNDEBUG'
|
|
kusano |
7d535a |
CDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
FC='f77'
|
|
kusano |
7d535a |
FFLAGS=''
|
|
kusano |
7d535a |
FLIBS="$MATLAB/extern/lib/sun4/libmex.a -lm"
|
|
kusano |
7d535a |
FOPTIMFLAGS='-O'
|
|
kusano |
7d535a |
FDEBUGFLAGS='-g'
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
LD='ld'
|
|
kusano |
7d535a |
LDFLAGS='-d -r -u _mex_entry_pt -u _mexFunction'
|
|
kusano |
7d535a |
LDOPTIMFLAGS='-x'
|
|
kusano |
7d535a |
LDDEBUGFLAGS=''
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
;;
|
|
kusano |
7d535a |
esac
|
|
kusano |
7d535a |
#############################################################################
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Architecture independent lines:
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Set and uncomment any lines which will apply to all architectures.
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
# CC="$CC"
|
|
kusano |
7d535a |
# CFLAGS="$CFLAGS"
|
|
kusano |
7d535a |
# COPTIMFLAGS="$COPTIMFLAGS"
|
|
kusano |
7d535a |
# CDEBUGFLAGS="$CDEBUGFLAGS"
|
|
kusano |
7d535a |
# CLIBS="$CLIBS"
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# FC="$FC"
|
|
kusano |
7d535a |
# FFLAGS="$FFLAGS"
|
|
kusano |
7d535a |
# FOPTIMFLAGS="$FOPTIMFLAGS"
|
|
kusano |
7d535a |
# FDEBUGFLAGS="$FDEBUGFLAGS"
|
|
kusano |
7d535a |
# FLIBS="$FLIBS"
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# LD="$LD"
|
|
kusano |
7d535a |
# LDFLAGS="$LDFLAGS"
|
|
kusano |
7d535a |
# LDOPTIMFLAGS="$LDOPTIMFLAGS"
|
|
kusano |
7d535a |
# LDDEBUGFLAGS="$LDDEBUGFLAGS"
|
|
kusano |
7d535a |
#----------------------------------------------------------------------------
|
|
kusano |
7d535a |
#############################################################################
|