Binary MEX-file-name extension
Find the MEX-file extension for the system you are currently working on.
ext = mexext
ext = mexw32
Your results reflect your system.
Find the MEX-file extension for the Apple Macintosh systems.
Get the list for supported platforms.
extlist = mexext('all');
The mex function identifies a platform by its arch value, which is the output of the computer('arch') command. For Macintosh platforms, the value is maci64.
Search the arch field in the results, extlist, for 'maci64', and display the corresponding ext field.
for k=1:length(extlist) if strcmp(extlist(k).arch, 'maci64') disp(sprintf('Arch: %s Ext: %s', ... extlist(k).arch, extlist(k).ext)) end, end
Arch: maci64 Ext: mexmaci64
The file extension is mexmaci64.
To use the MEX-file-name extension in makefiles or scripts outside MATLAB®, type one of the following from the system command prompt. The script is located in the matlabroot\bin folder.
mexext.bat — Windows platform.
mexext.sh — UNIX® platform.
For example, the following commands are in a GNU® makefile.
ext = $(shell mexext) yprime.$(ext) : yprime.c mex yprime.c