ilib_mex_build — utility for mex library management
ilib_mex_build(lib_name,table,files,libs [,makename,ldflags,cflags,fflags,cc])
a character string, the generic name of the library without path and extension.
3 column string matrix giving the table of 'scilab-name', 'interface name', 'cmex' or 'fmex'
string matrix giving objects files needed for shared library creation
string matrix giving extra libraries needed for shred library creation
character string. The path of the Makefile file without extension.
character strings to provide options/flags for the loader, the C compiler, the Fortran compiler. cc provides the name of the compiler.
This tool is used to create mex libraries and to generate a loader file which can be used to dynamically load the mex shared library
cd(TMPDIR); mputl('ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[],[],''Makelib'','''','''','''')','builder.sce'); mputl([ '#include ""mex.h""' 'void mexFunction(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])' '{' ' int *dims = mxGetDimensions(prhs[0]);' ' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);' '}' ],'mexfunction16.c'); exec(TMPDIR+'/builder.sce'); exec(TMPDIR+'/loader.sce'); mexf16(rand(2,3,2));