In /usr/share/local/matlab42/bin

README.mex
Release Notes for MEX-Files for Matlab 4.2

cmex
Name: cmex compilation program for MATLAB C language MEX files

Usage:
cmex [ -Dname[=def] -flibs -g -Ipathname -llibrary -Ldir
-O[level] -Uname -v3.5 -v name=[def] CASE=value ]
sourcefile ... [ objectfile ] ... [ library ] ...

Description:
"cmex" will compile and link MEX source files into a relocatable
executable image. This image is only executable from within
MATLAB. The resulting file will have a ".mex###" extension, where
### will be one of of the following to reflect the architecture of the
machine:

sun4, SunOS 4.x - 4
sun4, SunOS 5.x - sol
hp700 - hp7
ibm_rs - rs6
sgi - sg
dec_risc - ds
hp300 - hp3
vax_unix - vx
alpha - axp

The first file name given (less any file name extension) will be the
name of the resulting MEX file. Additional source, object, or
library files can be given to satisfy external references. Both C
and Fortran source files can be specified when building a MEX file.

The behavior of this script is affected in two ways: a startup script
called .mexrc.sh which is sourced if it exists and command line options.

The template startup script can be found in matlab/bin/.mexrc.sh. The
first occurrence of the file .mexrc.sh is sourced from the following
directory list: . (current), $HOME (home), matlab/bin. For more
details see the README.mex file in the matlab/bin directory.

The default values assigned in the body of this script for the
documented variables that can be changed in .mexrc.sh can be viewed
by typing cmex or fmex without ANY arguments.

The options are passed on to the C/Fortran compiler and linker.
Note, the default options do not include the optimizer flag. The -O
option must be specified to generate optimized code. Different compilers
interpret the -O[level] option differently. See the man page for
the compiler for the definition of "level" if any.

If MATLAB detects a file with a ".mex" extension in the search path
it will load it before a corresponding M-file in the same directory.
Therefore it is recommended that MEX-files be installed in the same
directory that the M-file is (or would be if it existed).

Further evaluation is done to most of the options below. This means
that if the argument part of the option is placed in single quotes,
variable evaluation is postponed until after all options are considered.
For example, if the option -L'$MATLAB/extern/lib/sun4' is used,
$MATLAB will be evaluated inside this script at the appropriate time.
The user does not need to know the value of $MATLAB.

Options:

-Dname=[def]
Define a symbol name to the C preprocessor "cpp(1)". Equivalent
to a #define directive in the source. If no "def" is given,
"name" is defined as `1'.
-flibs
Include the standard system Fortran libraries when linking
the MEX file. This is useful when some of the object files
needed to satisfy external references for the MEX image (i.e.
Fortran subroutines) were previously compiled.
-Ipathname
Add "pathname" to the list of directories in which to search for
#include files with relative filenames (not beginning with slash
/). The preprocessor first searches for #include files in the
directory containing "sourcefile", then in directories named
with -I options (if any), and finally, in /usr/include.
-llibrary
Link with object library "library" (for "ld(1)").
-Ldirectory
Add "directory" to the list of directories containing
object-library routines (for linking using "ld(1)").
-O[level]
Optimize the object code. See the man page for the compiler
for the definition of "level" if any.
-Uname
Remove any initial definition of the "cpp(1)" symbol "name".
(Inverse of the -D option.)
-v3.5
Compile MEX files developed under version 3.5 or earlier.
Use fmex if any Fortran source or object files were developed
under version 3.5 or earlier.
-v
Prints the values for important internal variables AFTER
.mexrc.sh is sourced and ALL arguments are considered. Prints
each compile step and final link step fully evaluated
to see which options and files were used. Very useful for
debugging.
name=[def]
Define a variable. The variable can be a string enclosed in
quotes. Be careful that the string cannot contain any interior
DOUBLE quotes. It overrides any variable already defined in
the script either by a default value, being set in the
.mexrc.sh file, or passed through the environment.

Note: If you need to fine tune the order of the libraries use
the LIBS variable. This can be tricky.
CASE=value
Used to select which case to take in .mexrc.sh for complicated
mex file applications and bugs.

Examples:
The following command will compile "vdpol.c" into "vdpol.mex4" (when
run on a Sun-4) using the optimizer option.

cmex -O vdpol.c

The resulting MEX-File should be installed in a directory in your
normal search path as defined by MATLABPATH. Since the resulting
MEX-File is compiled code it will execute much faster than a cor-
responding M-file.

Files:
.mexrc.sh,$HOME/.mexrc.sh, Mex startup file that is source from
matlab/bin/.mexrc.sh the first file in the list. It
allows the user to set the values
for important directories, files,
and environment variables. See
matlab/bin/.mexrc.sh for a template.
matlab/extern/include/mex.h Header file for MEX files.
matlab/extern/include/cmex.h Header file for 3.5 and earlier
MEX files.
matlab/extern/lib/`arch`/libmex.a Library supplied if needed to link
MEX objects, where `arch` is
replaced by the architecture i.e.
"sun4".
matlab/extern/lib/ibm_rs/exp.ibm_rs Text file containing a list of
symbols exported by MATLAB. Needed
for linking mex files on the
IBM/RS 6000.

See Also:
fmex(1L)
MATLAB User's Manual.

Copyright (c) 1986-94 by The MathWorks, Inc.
Revision: 1.85 Date: 1994/03/28 16:49:43

fmex
Name:
fmex compilation program for MATLAB Fortran language MEX files

Usage:
fmex [ -Dname[=def] -g -Ipathname -llibrary -Ldir -O[level]
-Uname -v3.5 -v name=[def] CASE=value ] sourcefile ...
[ objectfile ] ... [ library ] ...

Description:
"fmex" will compile and link MEX source files into a relocatable
executable image. This image is only executable from within
MATLAB. The resulting file will have a ".mex###" extension, where
### will be one of of the following to reflect the architecture of the
machine:

sun4, SunOS 4.x - 4
sun4, SunOS 5.x - sol
hp700 - hp7
ibm_rs - rs6
sgi - sg
dec_risc - ds
hp300 - hp3
vax_unix - vx
alpha - axp

The first file name given (less any file name extension) will be the
name of the resulting MEX file. Additional source, object, or
library files can be given to satisfy external references. Both C
and Fortran source files can be specified when building a MEX file.

The behavior of this script is affected in two ways: a startup script
called .mexrc.sh which is sourced if it exists and command line options.

The template startup script can be found in matlab/bin/.mexrc.sh. The
first occurrence of the file .mexrc.sh is sourced from the following
directory list: . (current), $HOME (home), matlab/bin. For more
details see the README.mex file in the matlab/bin directory.

The default values assigned in the body of this script for the
documented variables that can be changed in .mexrc.sh can be viewed
by typing cmex or fmex without ANY arguments.

The options are passed on to the Fortran/C compiler and linker.
The -D, -I, and -U options are useful with Fortran compilers that
first pass the source file through the C preprocessor "cpp(1)". Most
Berkeley UNIX "f77" Fortran compilers will do this if the file exten-
sion is `.F' instead of `.f'. See the man page for your Fortran com-
piler for more information.

Note, the default options do not include the optimizer flag. The -O
option must be specified to generate optimized code. Different com-
pilers interpret the -O[level] option differently. See the man page
for the compiler for the definition of "level" if any.

If MATLAB detects a file with a ".mex" extension in the search path
it will load it before a corresponding M-file in the same directory.
Therefore it is recommended that MEX-files be install in the same
directory that the M-file is (or would be if it existed).

Further evaluation is done to most of the options below. This means
that if the argument part of the option is placed in single quotes,
variable evaluation is postponed until after all options are considered.
For example, if the option -L'$MATLAB/extern/lib/sun4' is used,
$MATLAB will be evaluated inside this script at the appropriate time.
The user does not need to know the value of $MATLAB.

Options:

-Dname=[def]
Define a symbol name to the C preprocessor "cpp(1)". Equivalent
to a #define directive in the source. If no "def" is given,
"name" is defined as `1'.
-Ipathname
Add "pathname" to the list of directories in which to search for
#include files with relative filenames (not beginning with slash

/). The preprocessor first searches for #include files in the
directory containing "sourcefile", then in directories named
with -I options (if any), and finally, in /usr/include.
-llibrary
Link with object library "library" (for "ld(1)").
-Ldirectory
Add "directory" to the list of directories containing
object-library routines (for linking using "ld(1)").
-O[level]
Optimize the object code. See the man page for the compiler
for the definition of "level" if any.
-Uname
Remove any initial definition of the "cpp(1)" symbol "name".
(Inverse of the -D option.)
-v3.5
Compile MEX files developed under version 3.5 or earlier.
-v
Prints the values for important internal variables AFTER
.mexrc.sh is sourced and ALL arguments are considered. Prints
each compile step and final link step fully evaluated
to see which options and files were used. Very useful for
debugging.
name=[def]
Define a variable. The variable can be a string enclosed in
quotes. Be careful that the string cannot contain any interior
DOUBLE quotes. It overrides any variable already defined in
the script either by a default value, being set in the
.mexrc.sh file, or passed through the environment.

Note: If you need to fine tune the order of the libraries use
the LIBS variable. This can be tricky.
CASE=value
Used to select which case to take in .mexrc.sh for complicated
mex file applications and bugs.

Examples:
The following command will compile "yprime.f" into "yprime.mex4" (when
on a Sun-4) using the optimizer option.

fmex -O yprime.f yprimefg.f

The resulting MEX-File should be installed in a directory in your
normal search path as defined by MATLABPATH. Since the resulting
MEX-File is compiled code it will execute much faster than a cor-
responding M-file.


Files:
.mexrc.sh,$HOME/.mexrc.sh, Mex startup file that is source from
matlab/bin/.mexrc.sh the first file in the list. It
allows the user to set the values
for important directories, files,
and environment variables. See
matlab/bin/.mexrc.sh for a template.
matlab/extern/include/mex.h Header file for MEX files.
matlab/extern/include/cmex.h Header file for 3.5 and earlier
MEX files.
matlab/extern/lib/`arch`/libmex.a Library supplied if needed to link
MEX objects, where `arch` is
replaced by the architecture i.e.
"sun4".
matlab/extern/lib/`arch`/fmex35.o Object file containing the main
entry point for 3.5 and earlier
mex files.
matlab/extern/lib/ibm_rs/exp.ibm_rs Text file containing a list of
symbols exported by MATLAB. Needed
for linking mex files on the
IBM/RS 6000.

See Also:
cmex(1L)
MATLAB User's Manual.

Copyright (c) 1986-93 by The MathWorks, Inc.
Revision: 1.69 Date: 1994/03/28 16:51:14

matlab
Name:
matlab script file for invoking MATLAB

Usage:
matlab [-h|-help] | [-n]
[[-c licensefile] [-display Xserver] [-debug]]
[-Ddebugger [options]]

Description:
This Bourne Shell script sets MATLAB environment variables,
determines the machine architecture, and starts the appropriate
executable.

Options:

-h,-help

Help. Show command usage

-n

Print out the values of the environment variables used by
matlab. The image is NOT run.

-c licensefile (ignored on convex or cray)

Set LM_LICENSE_FILE to licensefile. This supersedes either
the value set in .matlabrc.sh or the default set in this
script. $MATLAB/etc/license.dat.DEMO.* files are NOT appended
using the ':' notation to this value. Those license.dat.DEMO*
files are appended in all other cases.

-display Xserver

Send X commands to X Window Server given by Xserver. This
supersedes the value of the DISPLAY environment variable.

-debug

Provides debugging information especially for X based
problems. Should be used only in conjunction with a
Technical Support Representative from The MathWorks, Inc.

-Ddebugger options

Startup matlab with debugger (e.g. dbx, xdb, gdb, ups, etc.)
The options if any depend on the debugger. If the debugger
allows options to be passed to matlab always include them
as part of options. Sets the environment variable:
MATLAB_DEBUG=debugger

NOTE: For certain debuggers like gdb, the SHELL environment
variable is ALWAYS set to /bin/sh.

Copyright (c) 1986-94 by The MathWorks, Inc.
Revision: 1.38 Date: 1994/03/22 21:31:31

/sol2

/sun4

In /usr/share/local/matlab42/bin/sol2



matlab

In /usr/share/local/matlab42/bin/sun4



matlab

Compiled by Jerod M. Parker(jparker@bass.gmu.edu)

June 1994