User`s guide

R14SP3
23-30
Conflicting MEX-Files Renamed Automatically
If two files with the same name but with .mexw32 and .dll extensions exist in the same
directory, MATLAB uses the .mexw32 file. To avoid unintended shadowing, MATLAB
automatically renames compiled MEX-files under the following circumstances:
When you build a MEX-file with a .mexw32 extension and the directory contains an
existing file with the same name, but with a .dll extension, the extension of the
.dll file is changed to .dll.old.
When you build a MEX-file with a .dll extension (using the mex -output option)
and the directory contains an existing file with the same name, but with a .mexw32
extension, the extension of the .mexw32 file is changed to .mexw32.old.
New Return Value for mexext on Windows Systems
On 32-bit Windows platforms, the mexext function now returns mexw32. In MATLAB
7.0.4 it returned dll.
New mexext Script to Obtain MEX-File Extension in Makefiles
A new script displays the MEX-file extension in the current version of MATLAB that
corresponds to the platform on which the script is executed. It is intended to be used
outside MATLAB, in makefiles or scripts, to obtain the appropriate filename extension
for compiled MEX-files. Use this script instead of explicitly specifying the MEX-file
extension in a makefile.
The script is named mexext.bat on Windows platforms and mexext.sh on UNIX
platforms. It is located in the directory $matlab/bin, where $matlab represents the
string returned from the matlabroot command.
The script displays the MEX-file extension without a leading period. For example, on 32-
bit Windows platforms, it returns mexw32.
Following is a fragment of a GNU makefile that uses the mexext script to obtain the
MEX-file extension:
ext = $(shell mexext)
yprime.$(ext) : yprime.c
mex yprime.c