summaryrefslogtreecommitdiff
path: root/modules/mexlib
diff options
context:
space:
mode:
authorShashank2017-05-29 12:40:26 +0530
committerShashank2017-05-29 12:40:26 +0530
commit0345245e860375a32c9a437c4a9d9cae807134e9 (patch)
treead51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/mexlib
downloadscilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip
CMSCOPE changed
Diffstat (limited to 'modules/mexlib')
-rwxr-xr-xmodules/mexlib/.libs/libmat.abin0 -> 213566 bytes
l---------modules/mexlib/.libs/libmat.la1
-rwxr-xr-xmodules/mexlib/.libs/libmex.abin0 -> 213566 bytes
l---------modules/mexlib/.libs/libmex.la1
-rwxr-xr-xmodules/mexlib/.libs/libmx.abin0 -> 213564 bytes
l---------modules/mexlib/.libs/libmx.la1
-rwxr-xr-xmodules/mexlib/Makefile1347
-rwxr-xr-xmodules/mexlib/Makefile.am65
-rwxr-xr-xmodules/mexlib/Makefile.in1347
-rwxr-xr-xmodules/mexlib/etc/mexlib.quit10
-rwxr-xr-xmodules/mexlib/etc/mexlib.start9
-rwxr-xr-xmodules/mexlib/examples/cmex/cmex.sce30
-rwxr-xr-xmodules/mexlib/examples/cmex/readme.txt14
-rwxr-xr-xmodules/mexlib/examples/cppmex/builder.sce50
-rwxr-xr-xmodules/mexlib/examples/cppmex/demo.sce16
-rwxr-xr-xmodules/mexlib/examples/cppmex/libmex.dia.ref21
-rwxr-xr-xmodules/mexlib/examples/cppmex/libmex.tst13
-rwxr-xr-xmodules/mexlib/examples/cppmex/readme.txt15
-rwxr-xr-xmodules/mexlib/examples/cppmex/temptst.cpp38
-rwxr-xr-xmodules/mexlib/examples/cppmex/temptst.h52
-rwxr-xr-xmodules/mexlib/examples/cppmex/temptst2.cpp20
-rwxr-xr-xmodules/mexlib/examples/fmex/builder.sce33
-rwxr-xr-xmodules/mexlib/examples/fmex/demo.sce23
-rwxr-xr-xmodules/mexlib/examples/fmex/mexfunction1.F23
-rwxr-xr-xmodules/mexlib/examples/fmex/readme.txt14
-rwxr-xr-xmodules/mexlib/examples/interface/builder.sce52
-rwxr-xr-xmodules/mexlib/examples/interface/demo.sce27
-rwxr-xr-xmodules/mexlib/examples/interface/f4.c29
-rwxr-xr-xmodules/mexlib/examples/interface/fmex1.c43
-rwxr-xr-xmodules/mexlib/examples/interface/fmex2.c43
-rwxr-xr-xmodules/mexlib/examples/interface/foof.F16
-rwxr-xr-xmodules/mexlib/examples/interface/lib/bar.c18
-rwxr-xr-xmodules/mexlib/examples/interface/lib/builder.sce28
-rwxr-xr-xmodules/mexlib/examples/interface/lib/foo.c18
-rwxr-xr-xmodules/mexlib/examples/interface/lib/pipo.h16
-rwxr-xr-xmodules/mexlib/examples/interface/libmex.dia.ref24
-rwxr-xr-xmodules/mexlib/examples/interface/libmex.tst14
-rwxr-xr-xmodules/mexlib/examples/interface/readme.txt12
-rwxr-xr-xmodules/mexlib/examples/mexdll/Makelib.mak13
-rwxr-xr-xmodules/mexlib/examples/mexdll/demo.sce23
-rwxr-xr-xmodules/mexlib/examples/mexdll/libtst.c25
-rwxr-xr-xmodules/mexlib/examples/mexdll/readme.txt8
-rwxr-xr-xmodules/mexlib/examples/mexdll/xtimesy.def3
-rwxr-xr-xmodules/mexlib/examples/mexdll/xtimesy.dllbin0 -> 40960 bytes
-rwxr-xr-xmodules/mexlib/examples/mexglx/README85
-rwxr-xr-xmodules/mexlib/examples/mexglx/foo.c70
-rwxr-xr-xmodules/mexlib/examples/mexglx/libtst.c25
-rwxr-xr-xmodules/mexlib/examples/mexglx/test.dia.ref102
-rwxr-xr-xmodules/mexlib/examples/mexglx/test.sce53
-rwxr-xr-xmodules/mexlib/examples/mexglx/test1.sce45
-rwxr-xr-xmodules/mexlib/help/en_US/addchapter.sce0
-rwxr-xr-xmodules/mexlib/help/fr_FR/addchapter.sce0
-rwxr-xr-xmodules/mexlib/help/ja_JP/addchapter.sce2
-rwxr-xr-xmodules/mexlib/help/pt_BR/addchapter.sce0
-rwxr-xr-xmodules/mexlib/help/ru_RU/addchapter.sce0
-rwxr-xr-xmodules/mexlib/includes/mex.h356
-rwxr-xr-xmodules/mexlib/includes/sci_gateway.h35
-rwxr-xr-xmodules/mexlib/libmat.la41
-rwxr-xr-xmodules/mexlib/libmex.la41
-rwxr-xr-xmodules/mexlib/libmx.la41
-rwxr-xr-xmodules/mexlib/license.txt11
-rwxr-xr-xmodules/mexlib/locales/ca_ES.po91
-rwxr-xr-xmodules/mexlib/locales/cs_CZ.po88
-rwxr-xr-xmodules/mexlib/locales/de_DE.po90
-rwxr-xr-xmodules/mexlib/locales/es_ES.po91
-rwxr-xr-xmodules/mexlib/locales/fr_FR.po94
-rwxr-xr-xmodules/mexlib/locales/it_IT.po92
-rwxr-xr-xmodules/mexlib/locales/ja_JP.po114
-rwxr-xr-xmodules/mexlib/locales/mexlib.pot140
-rwxr-xr-xmodules/mexlib/locales/pl_PL.po90
-rwxr-xr-xmodules/mexlib/locales/pt_BR.po89
-rwxr-xr-xmodules/mexlib/locales/ru_RU.po90
-rwxr-xr-xmodules/mexlib/locales/uk_UA.po91
-rwxr-xr-xmodules/mexlib/locales/zh_CN.po89
-rwxr-xr-xmodules/mexlib/locales/zh_TW.po89
-rwxr-xr-xmodules/mexlib/macros/buildmacros.bat11
-rwxr-xr-xmodules/mexlib/macros/buildmacros.sce15
-rwxr-xr-xmodules/mexlib/macros/cleanmacros.bat13
-rwxr-xr-xmodules/mexlib/mexlib.iss49
-rwxr-xr-xmodules/mexlib/src/c/.deps/.dirstamp0
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmat_la-mexlib.Plo271
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmat_la-sci_gateway.Plo191
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmex_la-mexlib.Plo271
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmex_la-sci_gateway.Plo191
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmx_la-mexlib.Plo271
-rwxr-xr-xmodules/mexlib/src/c/.deps/libmx_la-sci_gateway.Plo191
-rwxr-xr-xmodules/mexlib/src/c/.dirstamp0
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmat_la-mexlib.obin0 -> 204280 bytes
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmat_la-sci_gateway.obin0 -> 6304 bytes
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmex_la-mexlib.obin0 -> 204280 bytes
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmex_la-sci_gateway.obin0 -> 6304 bytes
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmx_la-mexlib.obin0 -> 204280 bytes
-rwxr-xr-xmodules/mexlib/src/c/.libs/libmx_la-sci_gateway.obin0 -> 6304 bytes
-rwxr-xr-xmodules/mexlib/src/c/libmat_la-mexlib.lo12
-rwxr-xr-xmodules/mexlib/src/c/libmat_la-sci_gateway.lo12
-rwxr-xr-xmodules/mexlib/src/c/libmex_la-mexlib.lo12
-rwxr-xr-xmodules/mexlib/src/c/libmex_la-sci_gateway.lo12
-rwxr-xr-xmodules/mexlib/src/c/libmx_la-mexlib.lo12
-rwxr-xr-xmodules/mexlib/src/c/libmx_la-sci_gateway.lo12
-rwxr-xr-xmodules/mexlib/src/c/mexlib.c3407
-rwxr-xr-xmodules/mexlib/src/c/mexlib.h211
-rwxr-xr-xmodules/mexlib/src/c/sci_gateway.c41
-rwxr-xr-xmodules/mexlib/src/libmat/Core_f_Import.def9
-rwxr-xr-xmodules/mexlib/src/libmat/libmat.rc96
-rwxr-xr-xmodules/mexlib/src/libmat/libmat.vcxproj288
-rwxr-xr-xmodules/mexlib/src/libmat/libmat.vcxproj.filters46
-rwxr-xr-xmodules/mexlib/src/libmex/Core_f_Import.def9
-rwxr-xr-xmodules/mexlib/src/libmex/libmex.rc96
-rwxr-xr-xmodules/mexlib/src/libmex/libmex.vcxproj288
-rwxr-xr-xmodules/mexlib/src/libmex/libmex.vcxproj.filters47
-rwxr-xr-xmodules/mexlib/src/libmx/Core_f_Import.def9
-rwxr-xr-xmodules/mexlib/src/libmx/libmx.rc96
-rwxr-xr-xmodules/mexlib/src/libmx/libmx.vcxproj289
-rwxr-xr-xmodules/mexlib/src/libmx/libmx.vcxproj.filters46
-rwxr-xr-xmodules/mexlib/tests/nonreg_tests/bug_5292.dia.ref34
-rwxr-xr-xmodules/mexlib/tests/nonreg_tests/bug_5292.tst43
-rwxr-xr-xmodules/mexlib/tests/nonreg_tests/bug_614.dia.ref37
-rwxr-xr-xmodules/mexlib/tests/nonreg_tests/bug_614.tst43
118 files changed, 12481 insertions, 0 deletions
diff --git a/modules/mexlib/.libs/libmat.a b/modules/mexlib/.libs/libmat.a
new file mode 100755
index 000000000..0b805b64e
--- /dev/null
+++ b/modules/mexlib/.libs/libmat.a
Binary files differ
diff --git a/modules/mexlib/.libs/libmat.la b/modules/mexlib/.libs/libmat.la
new file mode 120000
index 000000000..e223d330f
--- /dev/null
+++ b/modules/mexlib/.libs/libmat.la
@@ -0,0 +1 @@
+../libmat.la \ No newline at end of file
diff --git a/modules/mexlib/.libs/libmex.a b/modules/mexlib/.libs/libmex.a
new file mode 100755
index 000000000..a9c2eb031
--- /dev/null
+++ b/modules/mexlib/.libs/libmex.a
Binary files differ
diff --git a/modules/mexlib/.libs/libmex.la b/modules/mexlib/.libs/libmex.la
new file mode 120000
index 000000000..134a4b842
--- /dev/null
+++ b/modules/mexlib/.libs/libmex.la
@@ -0,0 +1 @@
+../libmex.la \ No newline at end of file
diff --git a/modules/mexlib/.libs/libmx.a b/modules/mexlib/.libs/libmx.a
new file mode 100755
index 000000000..d009a27d4
--- /dev/null
+++ b/modules/mexlib/.libs/libmx.a
Binary files differ
diff --git a/modules/mexlib/.libs/libmx.la b/modules/mexlib/.libs/libmx.la
new file mode 120000
index 000000000..08fccd0fc
--- /dev/null
+++ b/modules/mexlib/.libs/libmx.la
@@ -0,0 +1 @@
+../libmx.la \ No newline at end of file
diff --git a/modules/mexlib/Makefile b/modules/mexlib/Makefile
new file mode 100755
index 000000000..accd02d79
--- /dev/null
+++ b/modules/mexlib/Makefile
@@ -0,0 +1,1347 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# modules/mexlib/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/scilab
+pkgincludedir = $(includedir)/scilab
+pkglibdir = $(libdir)/scilab
+pkglibexecdir = $(libexecdir)/scilab
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp $(libmex_la_include_HEADERS)
+am__append_1 = java
+subdir = modules/mexlib
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libmex_la_etcdir)" \
+ "$(DESTDIR)$(libmex_la_rootdir)" \
+ "$(DESTDIR)$(libmex_la_includedir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libmat_la_DEPENDENCIES =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = src/c/libmat_la-mexlib.lo \
+ src/c/libmat_la-sci_gateway.lo
+am_libmat_la_OBJECTS = $(am__objects_1)
+libmat_la_OBJECTS = $(am_libmat_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_libmat_la_rpath =
+#am_libmat_la_rpath = -rpath $(pkglibdir)
+libmex_la_DEPENDENCIES =
+am__objects_2 = src/c/libmex_la-mexlib.lo \
+ src/c/libmex_la-sci_gateway.lo
+am_libmex_la_OBJECTS = $(am__objects_2)
+libmex_la_OBJECTS = $(am_libmex_la_OBJECTS)
+am_libmex_la_rpath =
+#am_libmex_la_rpath = -rpath $(pkglibdir)
+libmx_la_DEPENDENCIES =
+am__objects_3 = src/c/libmx_la-mexlib.lo src/c/libmx_la-sci_gateway.lo
+am_libmx_la_OBJECTS = $(am__objects_3)
+libmx_la_OBJECTS = $(am_libmx_la_OBJECTS)
+am_libmx_la_rpath =
+#am_libmx_la_rpath = -rpath $(pkglibdir)
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I. -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libmat_la_SOURCES) $(libmex_la_SOURCES) \
+ $(libmx_la_SOURCES)
+DIST_SOURCES = $(libmat_la_SOURCES) $(libmex_la_SOURCES) \
+ $(libmx_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libmex_la_etc_DATA) $(libmex_la_root_DATA)
+HEADERS = $(libmex_la_include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14
+ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ
+ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+ANT = /usr/bin/ant
+ANTLR = /usr/share/java/antlr.jar
+AR = ar
+ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack
+ASM3 = /usr/share/java/asm3-3.3.2.jar
+AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf
+AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader
+AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14
+AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar
+AWK = mawk
+BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar
+BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas
+CC = gcc
+CCACHE =
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKSTYLE =
+COBERTURA = /usr/share/java/cobertura.jar
+COMMONS_BEANUTILS =
+COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar
+COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar
+CPP = gcc -E
+CPPFLAGS =
+CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config
+CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz
+CURL_VERSION = libcurl 7.19.7
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEMOTOOLS_ENABLE = yes
+DEPDIR = .deps
+DLLTOOL = false
+DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/
+DOXYGEN_BIN =
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3
+FFTW_ENABLE = yes
+FGREP = /bin/grep -F
+FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar
+FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath
+FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar
+FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar
+FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar
+FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar
+FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar
+FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar
+GENHTML =
+GETTEXT_MACRO_VERSION = 0.19
+GIWS_BIN =
+GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar
+GMSGFMT = /usr/bin/msgfmt
+GMSGFMT_015 = /usr/bin/msgfmt
+GRAPHICS_ENABLE = yes
+GREP = /bin/grep
+GUI_ENABLE = yes
+HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl
+HELP_ENABLE = yes
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTLLIBS =
+INTL_MACOSX_LIBS =
+JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar
+JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
+JAVAC_DEBUG = off
+JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc
+JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah
+JAVASCI_ENABLE = yes
+JAVA_ENABLE = yes
+JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64
+JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
+JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm
+JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb
+JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar
+JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar
+JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar
+JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar
+JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar
+JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar
+JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar
+JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar
+JUNIT4 = /usr/share/java/junit4.jar
+LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack
+LCOV =
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = -Wl,--no-as-needed
+LIBICONV = -liconv
+LIBINTL =
+LIBM = -lm
+LIBOBJS =
+LIBS = -lpthread -ldl -lcurses -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LOGGING_LEVEL = SEVERE
+LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar
+LTLIBICONV = -liconv
+LTLIBINTL =
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo
+MANIFEST_TOOL = :
+MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+MATIO_ENABLE = yes
+MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5
+MKDIR_P = /bin/mkdir -p
+MPI_ENABLE = no
+MSGCAT = /usr/bin/msgcat
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_015 = /usr/bin/msgfmt
+MSGMERGE = /usr/bin/msgmerge
+NM = nm
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OCAMLC = ocamlc
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLOPT = ocamlopt
+OCAMLYACC = ocamlyacc
+OPENMPI_CC =
+OPENMPI_CFLAGS =
+OPENMPI_CXX =
+OPENMPI_CXXFLAGS =
+OPENMPI_LIBS =
+OPENMP_CFLAGS = -fopenmp
+OPENMP_CXXFLAGS = -fopenmp
+OPENMP_ENABLE = yes
+OPENMP_LIBS = -lgomp -lstdc++
+OTOOL =
+OTOOL64 =
+PACKAGE = scilab
+PACKAGE_BUGREPORT = http://bugzilla.scilab.org/
+PACKAGE_NAME = Scilab
+PACKAGE_STRING = Scilab 5
+PACKAGE_TARNAME = scilab
+PACKAGE_URL =
+PACKAGE_VERSION = 5
+PATH_SEPARATOR = :
+PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config
+PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre
+PCRE_VERSION = 8.35
+PKG_CONFIG = /usr/bin/pkg-config
+POSUB = po
+POW_LIB =
+PYTHON =
+RANLIB = ranlib
+RELOCATABLE = no
+RT_LIB = -lrt
+SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar
+SCILAB_BINARY_VERSION = 5.5.2
+SCILAB_LIBRARY_VERSION = 5:5:2
+SCILAB_VERSION_MAINTENANCE = 2
+SCILAB_VERSION_MAJOR = 5
+SCILAB_VERSION_MINOR = 5
+SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar
+SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar
+SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector
+SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector
+SCI_FFLAGS = -DNDEBUG -m64 -fPIC
+SCI_LDFLAGS =
+SED = /bin/sed
+SET_MAKE =
+SET_RELOCATABLE =
+SHELL = /bin/bash
+SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar
+SPLINT = no
+STRIP = strip
+SWIG_BIN =
+SWIG_JAVA =
+SWIG_RUNTIME_LIBS_DIR =
+SWIG_SCILAB =
+TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl
+TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_ENABLE = yes
+UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd
+USE_NLS = yes
+VERSION = 5
+WITH_OCAML =
+WITH_TKSCI = yes
+XCOS_ENABLE = yes
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_015 = /usr/bin/xgettext
+XGETTEXT_EXTRA_OPTIONS =
+XMKMF =
+XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar
+XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar
+XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config
+XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2
+XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl
+XML_VERSION = 2.9.1
+X_CFLAGS =
+X_EXTRA_LIBS =
+X_LIBS =
+X_PRE_LIBS =
+abs_builddir = /home/shashank/scilab-master_5.5.2/modules/mexlib
+abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/mexlib
+abs_top_builddir = /home/shashank/scilab-master_5.5.2
+abs_top_srcdir = /home/shashank/scilab-master_5.5.2
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN =
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+cxx_present = yes
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+MEXLIB_C_SOURCES = src/c/mexlib.c \
+src/c/sci_gateway.c
+
+MEXLIB_FLAGS = -I$(srcdir)/includes/ \
+-I$(top_srcdir)/modules/call_scilab/includes/ \
+-I$(top_srcdir)/modules/elementary_functions/includes/ \
+-I$(top_srcdir)/modules/localization/includes/ \
+-I$(top_srcdir)/modules/output_stream/includes/ \
+-I$(top_srcdir)/modules/string/includes/
+
+#pkglib_LTLIBRARIES = libmat.la libmex.la libmx.la
+noinst_LTLIBRARIES = libmat.la libmex.la libmx.la
+libmex_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmex_la_LIBADD = $(MEXLIB_DEP)
+libmex_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+libmat_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmat_la_LIBADD = $(MEXLIB_DEP)
+libmat_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+libmx_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmx_la_LIBADD = $(MEXLIB_DEP)
+libmx_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+#### Target ######
+modulename = mexlib
+
+# For the code check (splint)
+CHECK_SRC = $(MEXLIB_C_SOURCES)
+INCLUDE_FLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+#### mexlib : Conf files ####
+libmex_la_rootdir = $(mydatadir)
+libmex_la_root_DATA = license.txt
+
+####mexlib : init scripts ####
+libmex_la_etcdir = $(mydatadir)/etc
+libmex_la_etc_DATA = etc/mexlib.quit etc/mexlib.start
+
+####mexlib : include files ####
+libmex_la_includedir = $(pkgincludedir)
+libmex_la_include_HEADERS = includes/mex.h \
+includes/sci_gateway.h
+
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/mexlib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/mexlib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/c/$(am__dirstamp):
+ @$(MKDIR_P) src/c
+ @: > src/c/$(am__dirstamp)
+src/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/c/$(DEPDIR)
+ @: > src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmat_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmat_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmat.la: $(libmat_la_OBJECTS) $(libmat_la_DEPENDENCIES) $(EXTRA_libmat_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmat_la_rpath) $(libmat_la_OBJECTS) $(libmat_la_LIBADD) $(LIBS)
+src/c/libmex_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmex_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmex.la: $(libmex_la_OBJECTS) $(libmex_la_DEPENDENCIES) $(EXTRA_libmex_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmex_la_rpath) $(libmex_la_OBJECTS) $(libmex_la_LIBADD) $(LIBS)
+src/c/libmx_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmx_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmx.la: $(libmx_la_OBJECTS) $(libmx_la_DEPENDENCIES) $(EXTRA_libmx_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmx_la_rpath) $(libmx_la_OBJECTS) $(libmx_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f src/c/*.$(OBJEXT)
+ -rm -f src/c/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include src/c/$(DEPDIR)/libmat_la-mexlib.Plo
+include src/c/$(DEPDIR)/libmat_la-sci_gateway.Plo
+include src/c/$(DEPDIR)/libmex_la-mexlib.Plo
+include src/c/$(DEPDIR)/libmex_la-sci_gateway.Plo
+include src/c/$(DEPDIR)/libmx_la-mexlib.Plo
+include src/c/$(DEPDIR)/libmx_la-sci_gateway.Plo
+
+.c.o:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
+# $(AM_V_CC)source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $<
+
+src/c/libmat_la-mexlib.lo: src/c/mexlib.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmat_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmat_la-mexlib.Tpo -c -o src/c/libmat_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmat_la-mexlib.Tpo src/c/$(DEPDIR)/libmat_la-mexlib.Plo
+# $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmat_la-mexlib.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmat_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmat_la-sci_gateway.lo: src/c/sci_gateway.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmat_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmat_la-sci_gateway.Tpo -c -o src/c/libmat_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmat_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmat_la-sci_gateway.Plo
+# $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmat_la-sci_gateway.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmat_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+src/c/libmex_la-mexlib.lo: src/c/mexlib.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmex_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmex_la-mexlib.Tpo -c -o src/c/libmex_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmex_la-mexlib.Tpo src/c/$(DEPDIR)/libmex_la-mexlib.Plo
+# $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmex_la-mexlib.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmex_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmex_la-sci_gateway.lo: src/c/sci_gateway.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmex_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmex_la-sci_gateway.Tpo -c -o src/c/libmex_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmex_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmex_la-sci_gateway.Plo
+# $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmex_la-sci_gateway.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmex_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+src/c/libmx_la-mexlib.lo: src/c/mexlib.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmx_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmx_la-mexlib.Tpo -c -o src/c/libmx_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmx_la-mexlib.Tpo src/c/$(DEPDIR)/libmx_la-mexlib.Plo
+# $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmx_la-mexlib.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmx_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmx_la-sci_gateway.lo: src/c/sci_gateway.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmx_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmx_la-sci_gateway.Tpo -c -o src/c/libmx_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmx_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmx_la-sci_gateway.Plo
+# $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmx_la-sci_gateway.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmx_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf src/c/.libs src/c/_libs
+install-libmex_la_etcDATA: $(libmex_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_etc_DATA)'; test -n "$(libmex_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libmex_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libmex_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_etc_DATA)'; test -n "$(libmex_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libmex_la_rootDATA: $(libmex_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_root_DATA)'; test -n "$(libmex_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libmex_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libmex_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_root_DATA)'; test -n "$(libmex_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libmex_la_includeHEADERS: $(libmex_la_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_include_HEADERS)'; test -n "$(libmex_la_includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_includedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libmex_la_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libmex_la_includedir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_include_HEADERS)'; test -n "$(libmex_la_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libmex_la_etcdir)" "$(DESTDIR)$(libmex_la_rootdir)" "$(DESTDIR)$(libmex_la_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f src/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/c/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf src/c/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-libmex_la_etcDATA \
+ install-libmex_la_includeHEADERS install-libmex_la_rootDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf src/c/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libmex_la_etcDATA \
+ uninstall-libmex_la_includeHEADERS \
+ uninstall-libmex_la_rootDATA uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libmex_la_etcDATA \
+ install-libmex_la_includeHEADERS install-libmex_la_rootDATA \
+ install-man install-pdf install-pdf-am \
+ install-pkglibLTLIBRARIES install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-libmex_la_etcDATA uninstall-libmex_la_includeHEADERS \
+ uninstall-libmex_la_rootDATA uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT); \
+ fi
+
+clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) clean; \
+ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#swig: $(SWIG_WRAPPERS)
+# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+# if test -n "$(SWIG_WRAPPERS)"; then \
+# for file in $(SWIG_WRAPPERS) ; do \
+# echo "Swig process of $$file (Java) ..."; \
+# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+#swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+# @SWIG_OUTDIR=src/swig/; \
+# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+# for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+# echo "Swig process of $$file (Scilab) ..."; \
+# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#giws: $(GIWS_WRAPPERS)
+# @GIWS_OUTPUTDIR=src/jni/; \
+# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+# if test -n "$(GIWS_WRAPPERS)"; then \
+# for file in $(GIWS_WRAPPERS) ; do \
+# echo "GIWS process of $$file ..."; \
+# if test -z "$(GIWS_OPTIONS)"; then \
+# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# else \
+# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# fi \
+# done; \
+# fi
+
+#giws-exception:
+# @GIWS_OUTPUTDIR=src/jni/;\
+# echo "GIWS: Generation of exception class ..."; \
+# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+ @echo "-------- Install of XML sources of help files --------"; \
+ for lang in $(ALL_LINGUAS); do \
+ if test -d $(srcdir)/help/$$lang; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+ done ; \
+ fi; \
+ fi; \
+ done; \
+ @echo "-------- Install of MathML sources --------"; \
+ if test -d $(srcdir)/help/mml/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+ done ; \
+ fi; \
+ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+clean-local: clean-java
+#clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/mexlib/Makefile.am b/modules/mexlib/Makefile.am
new file mode 100755
index 000000000..6cbdd00b2
--- /dev/null
+++ b/modules/mexlib/Makefile.am
@@ -0,0 +1,65 @@
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+MEXLIB_C_SOURCES = src/c/mexlib.c \
+src/c/sci_gateway.c
+
+MEXLIB_FLAGS = -I$(srcdir)/includes/ \
+-I$(top_srcdir)/modules/call_scilab/includes/ \
+-I$(top_srcdir)/modules/elementary_functions/includes/ \
+-I$(top_srcdir)/modules/localization/includes/ \
+-I$(top_srcdir)/modules/output_stream/includes/ \
+-I$(top_srcdir)/modules/string/includes/
+
+if MAINTAINER_MODE
+pkglib_LTLIBRARIES = libmat.la libmex.la libmx.la
+else
+noinst_LTLIBRARIES = libmat.la libmex.la libmx.la
+endif
+
+
+libmex_la_SOURCES = $(MEXLIB_C_SOURCES)
+
+libmex_la_LIBADD = $(MEXLIB_DEP)
+
+libmex_la_CPPFLAGS= $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+
+libmat_la_SOURCES = $(MEXLIB_C_SOURCES)
+
+libmat_la_LIBADD = $(MEXLIB_DEP)
+
+libmat_la_CPPFLAGS= $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+
+libmx_la_SOURCES = $(MEXLIB_C_SOURCES)
+
+libmx_la_LIBADD = $(MEXLIB_DEP)
+
+libmx_la_CPPFLAGS= $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+
+#### Target ######
+modulename=mexlib
+
+# For the code check (splint)
+CHECK_SRC= $(MEXLIB_C_SOURCES)
+INCLUDE_FLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+#### mexlib : Conf files ####
+libmex_la_rootdir = $(mydatadir)
+libmex_la_root_DATA = license.txt
+
+####mexlib : init scripts ####
+libmex_la_etcdir = $(mydatadir)/etc
+libmex_la_etc_DATA = etc/mexlib.quit etc/mexlib.start
+
+
+####mexlib : include files ####
+libmex_la_includedir=$(pkgincludedir)
+libmex_la_include_HEADERS = includes/mex.h \
+includes/sci_gateway.h
+
+include $(top_srcdir)/Makefile.incl.am
diff --git a/modules/mexlib/Makefile.in b/modules/mexlib/Makefile.in
new file mode 100755
index 000000000..016850fa9
--- /dev/null
+++ b/modules/mexlib/Makefile.in
@@ -0,0 +1,1347 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp $(libmex_la_include_HEADERS)
+@NEED_JAVA_TRUE@am__append_1 = java
+subdir = modules/mexlib
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libmex_la_etcdir)" \
+ "$(DESTDIR)$(libmex_la_rootdir)" \
+ "$(DESTDIR)$(libmex_la_includedir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libmat_la_DEPENDENCIES =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = src/c/libmat_la-mexlib.lo \
+ src/c/libmat_la-sci_gateway.lo
+am_libmat_la_OBJECTS = $(am__objects_1)
+libmat_la_OBJECTS = $(am_libmat_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+@MAINTAINER_MODE_FALSE@am_libmat_la_rpath =
+@MAINTAINER_MODE_TRUE@am_libmat_la_rpath = -rpath $(pkglibdir)
+libmex_la_DEPENDENCIES =
+am__objects_2 = src/c/libmex_la-mexlib.lo \
+ src/c/libmex_la-sci_gateway.lo
+am_libmex_la_OBJECTS = $(am__objects_2)
+libmex_la_OBJECTS = $(am_libmex_la_OBJECTS)
+@MAINTAINER_MODE_FALSE@am_libmex_la_rpath =
+@MAINTAINER_MODE_TRUE@am_libmex_la_rpath = -rpath $(pkglibdir)
+libmx_la_DEPENDENCIES =
+am__objects_3 = src/c/libmx_la-mexlib.lo src/c/libmx_la-sci_gateway.lo
+am_libmx_la_OBJECTS = $(am__objects_3)
+libmx_la_OBJECTS = $(am_libmx_la_OBJECTS)
+@MAINTAINER_MODE_FALSE@am_libmx_la_rpath =
+@MAINTAINER_MODE_TRUE@am_libmx_la_rpath = -rpath $(pkglibdir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libmat_la_SOURCES) $(libmex_la_SOURCES) \
+ $(libmx_la_SOURCES)
+DIST_SOURCES = $(libmat_la_SOURCES) $(libmex_la_SOURCES) \
+ $(libmx_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libmex_la_etc_DATA) $(libmex_la_root_DATA)
+HEADERS = $(libmex_la_include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANT = @ANT@
+ANTLR = @ANTLR@
+AR = @AR@
+ARPACK_LIBS = @ARPACK_LIBS@
+ASM3 = @ASM3@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
+AWK = @AWK@
+BATIK = @BATIK@
+BLAS_LIBS = @BLAS_LIBS@
+CC = @CC@
+CCACHE = @CCACHE@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKSTYLE = @CHECKSTYLE@
+COBERTURA = @COBERTURA@
+COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
+COMMONS_IO = @COMMONS_IO@
+COMMONS_LOGGING = @COMMONS_LOGGING@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CURL_VERSION = @CURL_VERSION@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCBOOK_ROOT = @DOCBOOK_ROOT@
+DOXYGEN_BIN = @DOXYGEN_BIN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECJ = @ECJ@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTW3_LIB = @FFTW3_LIB@
+FFTW_ENABLE = @FFTW_ENABLE@
+FGREP = @FGREP@
+FLEXDOCK = @FLEXDOCK@
+FLIBS = @FLIBS@
+FOP = @FOP@
+FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@
+FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@
+FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@
+FREEHEP_IO = @FREEHEP_IO@
+FREEHEP_UTIL = @FREEHEP_UTIL@
+GENHTML = @GENHTML@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GIWS_BIN = @GIWS_BIN@
+GLUEGEN2_RT = @GLUEGEN2_RT@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
+GREP = @GREP@
+GUI_ENABLE = @GUI_ENABLE@
+HDF5_CFLAGS = @HDF5_CFLAGS@
+HDF5_LIBS = @HDF5_LIBS@
+HELP_ENABLE = @HELP_ENABLE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVAC_DEBUG = @JAVAC_DEBUG@
+JAVADOC = @JAVADOC@
+JAVAH = @JAVAH@
+JAVASCI_ENABLE = @JAVASCI_ENABLE@
+JAVA_ENABLE = @JAVA_ENABLE@
+JAVA_G = @JAVA_G@
+JAVA_HOME = @JAVA_HOME@
+JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
+JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
+JDB = @JDB@
+JEUCLID_CORE = @JEUCLID_CORE@
+JGRAPHX = @JGRAPHX@
+JHALL = @JHALL@
+JLATEXMATH = @JLATEXMATH@
+JLATEXMATH_FOP = @JLATEXMATH_FOP@
+JOGL2 = @JOGL2@
+JROSETTA_API = @JROSETTA_API@
+JROSETTA_ENGINE = @JROSETTA_ENGINE@
+JUNIT4 = @JUNIT4@
+LAPACK_LIBS = @LAPACK_LIBS@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOGGING_LEVEL = @LOGGING_LEVEL@
+LOOKS = @LOOKS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATIO_CFLAGS = @MATIO_CFLAGS@
+MATIO_ENABLE = @MATIO_ENABLE@
+MATIO_LIBS = @MATIO_LIBS@
+MKDIR_P = @MKDIR_P@
+MPI_ENABLE = @MPI_ENABLE@
+MSGCAT = @MSGCAT@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OCAMLC = @OCAMLC@
+OCAMLDEP = @OCAMLDEP@
+OCAMLLEX = @OCAMLLEX@
+OCAMLOPT = @OCAMLOPT@
+OCAMLYACC = @OCAMLYACC@
+OPENMPI_CC = @OPENMPI_CC@
+OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
+OPENMPI_CXX = @OPENMPI_CXX@
+OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@
+OPENMPI_LIBS = @OPENMPI_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_ENABLE = @OPENMP_ENABLE@
+OPENMP_LIBS = @OPENMP_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CFLAGS = @PCRE_CFLAGS@
+PCRE_CONFIG = @PCRE_CONFIG@
+PCRE_LIBS = @PCRE_LIBS@
+PCRE_VERSION = @PCRE_VERSION@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+RANLIB = @RANLIB@
+RELOCATABLE = @RELOCATABLE@
+RT_LIB = @RT_LIB@
+SAXON = @SAXON@
+SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@
+SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
+SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@
+SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@
+SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@
+SCIRENDERER = @SCIRENDERER@
+SCIRENDERER_CP = @SCIRENDERER_CP@
+SCI_CFLAGS = @SCI_CFLAGS@
+SCI_CXXFLAGS = @SCI_CXXFLAGS@
+SCI_FFLAGS = @SCI_FFLAGS@
+SCI_LDFLAGS = @SCI_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SET_RELOCATABLE = @SET_RELOCATABLE@
+SHELL = @SHELL@
+SKINLF = @SKINLF@
+SPLINT = @SPLINT@
+STRIP = @STRIP@
+SWIG_BIN = @SWIG_BIN@
+SWIG_JAVA = @SWIG_JAVA@
+SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
+SWIG_SCILAB = @SWIG_SCILAB@
+TCLTK_LIBS = @TCLTK_LIBS@
+TCL_INC_PATH = @TCL_INC_PATH@
+TK_INC_PATH = @TK_INC_PATH@
+UMFPACK_CFLAGS = @UMFPACK_CFLAGS@
+UMFPACK_ENABLE = @UMFPACK_ENABLE@
+UMFPACK_LIB = @UMFPACK_LIB@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WITH_OCAML = @WITH_OCAML@
+WITH_TKSCI = @WITH_TKSCI@
+XCOS_ENABLE = @XCOS_ENABLE@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
+XML_APIS_EXT = @XML_APIS_EXT@
+XML_CONFIG = @XML_CONFIG@
+XML_FLAGS = @XML_FLAGS@
+XML_LIBS = @XML_LIBS@
+XML_VERSION = @XML_VERSION@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cxx_present = @cxx_present@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MEXLIB_C_SOURCES = src/c/mexlib.c \
+src/c/sci_gateway.c
+
+MEXLIB_FLAGS = -I$(srcdir)/includes/ \
+-I$(top_srcdir)/modules/call_scilab/includes/ \
+-I$(top_srcdir)/modules/elementary_functions/includes/ \
+-I$(top_srcdir)/modules/localization/includes/ \
+-I$(top_srcdir)/modules/output_stream/includes/ \
+-I$(top_srcdir)/modules/string/includes/
+
+@MAINTAINER_MODE_TRUE@pkglib_LTLIBRARIES = libmat.la libmex.la libmx.la
+@MAINTAINER_MODE_FALSE@noinst_LTLIBRARIES = libmat.la libmex.la libmx.la
+libmex_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmex_la_LIBADD = $(MEXLIB_DEP)
+libmex_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+libmat_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmat_la_LIBADD = $(MEXLIB_DEP)
+libmat_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+libmx_la_SOURCES = $(MEXLIB_C_SOURCES)
+libmx_la_LIBADD = $(MEXLIB_DEP)
+libmx_la_CPPFLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+#### Target ######
+modulename = mexlib
+
+# For the code check (splint)
+CHECK_SRC = $(MEXLIB_C_SOURCES)
+INCLUDE_FLAGS = $(MEXLIB_FLAGS) $(AM_CPPFLAGS)
+
+#### mexlib : Conf files ####
+libmex_la_rootdir = $(mydatadir)
+libmex_la_root_DATA = license.txt
+
+####mexlib : init scripts ####
+libmex_la_etcdir = $(mydatadir)/etc
+libmex_la_etc_DATA = etc/mexlib.quit etc/mexlib.start
+
+####mexlib : include files ####
+libmex_la_includedir = $(pkgincludedir)
+libmex_la_include_HEADERS = includes/mex.h \
+includes/sci_gateway.h
+
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/mexlib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/mexlib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/c/$(am__dirstamp):
+ @$(MKDIR_P) src/c
+ @: > src/c/$(am__dirstamp)
+src/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/c/$(DEPDIR)
+ @: > src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmat_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmat_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmat.la: $(libmat_la_OBJECTS) $(libmat_la_DEPENDENCIES) $(EXTRA_libmat_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmat_la_rpath) $(libmat_la_OBJECTS) $(libmat_la_LIBADD) $(LIBS)
+src/c/libmex_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmex_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmex.la: $(libmex_la_OBJECTS) $(libmex_la_DEPENDENCIES) $(EXTRA_libmex_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmex_la_rpath) $(libmex_la_OBJECTS) $(libmex_la_LIBADD) $(LIBS)
+src/c/libmx_la-mexlib.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libmx_la-sci_gateway.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+
+libmx.la: $(libmx_la_OBJECTS) $(libmx_la_DEPENDENCIES) $(EXTRA_libmx_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libmx_la_rpath) $(libmx_la_OBJECTS) $(libmx_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f src/c/*.$(OBJEXT)
+ -rm -f src/c/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmat_la-mexlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmat_la-sci_gateway.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmex_la-mexlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmex_la-sci_gateway.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmx_la-mexlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libmx_la-sci_gateway.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+src/c/libmat_la-mexlib.lo: src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmat_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmat_la-mexlib.Tpo -c -o src/c/libmat_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmat_la-mexlib.Tpo src/c/$(DEPDIR)/libmat_la-mexlib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmat_la-mexlib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmat_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmat_la-sci_gateway.lo: src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmat_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmat_la-sci_gateway.Tpo -c -o src/c/libmat_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmat_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmat_la-sci_gateway.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmat_la-sci_gateway.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmat_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+src/c/libmex_la-mexlib.lo: src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmex_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmex_la-mexlib.Tpo -c -o src/c/libmex_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmex_la-mexlib.Tpo src/c/$(DEPDIR)/libmex_la-mexlib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmex_la-mexlib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmex_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmex_la-sci_gateway.lo: src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmex_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmex_la-sci_gateway.Tpo -c -o src/c/libmex_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmex_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmex_la-sci_gateway.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmex_la-sci_gateway.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmex_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmex_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+src/c/libmx_la-mexlib.lo: src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmx_la-mexlib.lo -MD -MP -MF src/c/$(DEPDIR)/libmx_la-mexlib.Tpo -c -o src/c/libmx_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmx_la-mexlib.Tpo src/c/$(DEPDIR)/libmx_la-mexlib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/mexlib.c' object='src/c/libmx_la-mexlib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmx_la-mexlib.lo `test -f 'src/c/mexlib.c' || echo '$(srcdir)/'`src/c/mexlib.c
+
+src/c/libmx_la-sci_gateway.lo: src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libmx_la-sci_gateway.lo -MD -MP -MF src/c/$(DEPDIR)/libmx_la-sci_gateway.Tpo -c -o src/c/libmx_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libmx_la-sci_gateway.Tpo src/c/$(DEPDIR)/libmx_la-sci_gateway.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sci_gateway.c' object='src/c/libmx_la-sci_gateway.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libmx_la-sci_gateway.lo `test -f 'src/c/sci_gateway.c' || echo '$(srcdir)/'`src/c/sci_gateway.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf src/c/.libs src/c/_libs
+install-libmex_la_etcDATA: $(libmex_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_etc_DATA)'; test -n "$(libmex_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libmex_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libmex_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_etc_DATA)'; test -n "$(libmex_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libmex_la_rootDATA: $(libmex_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_root_DATA)'; test -n "$(libmex_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libmex_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libmex_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_root_DATA)'; test -n "$(libmex_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libmex_la_includeHEADERS: $(libmex_la_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(libmex_la_include_HEADERS)'; test -n "$(libmex_la_includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libmex_la_includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libmex_la_includedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libmex_la_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libmex_la_includedir)" || exit $$?; \
+ done
+
+uninstall-libmex_la_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmex_la_include_HEADERS)'; test -n "$(libmex_la_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libmex_la_includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libmex_la_etcdir)" "$(DESTDIR)$(libmex_la_rootdir)" "$(DESTDIR)$(libmex_la_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f src/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/c/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf src/c/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-libmex_la_etcDATA \
+ install-libmex_la_includeHEADERS install-libmex_la_rootDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf src/c/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libmex_la_etcDATA \
+ uninstall-libmex_la_includeHEADERS \
+ uninstall-libmex_la_rootDATA uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libmex_la_etcDATA \
+ install-libmex_la_includeHEADERS install-libmex_la_rootDATA \
+ install-man install-pdf install-pdf-am \
+ install-pkglibLTLIBRARIES install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-libmex_la_etcDATA uninstall-libmex_la_includeHEADERS \
+ uninstall-libmex_la_rootDATA uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+@NEED_JAVA_TRUE@java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT); \
+@NEED_JAVA_TRUE@ fi
+
+@NEED_JAVA_TRUE@clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT) clean; \
+@NEED_JAVA_TRUE@ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
+@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \
+@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \
+@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \
+@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
+@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
+@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \
+@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ else \
+@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ fi \
+@GIWS_TRUE@ done; \
+@GIWS_TRUE@ fi
+
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
+@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ done; \
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+@NEED_JAVA_TRUE@clean-local: clean-java
+@NEED_JAVA_FALSE@clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/mexlib/etc/mexlib.quit b/modules/mexlib/etc/mexlib.quit
new file mode 100755
index 000000000..ab83f0c89
--- /dev/null
+++ b/modules/mexlib/etc/mexlib.quit
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007-2008 - INRIA
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
diff --git a/modules/mexlib/etc/mexlib.start b/modules/mexlib/etc/mexlib.start
new file mode 100755
index 000000000..28d5ff874
--- /dev/null
+++ b/modules/mexlib/etc/mexlib.start
@@ -0,0 +1,9 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2006-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
diff --git a/modules/mexlib/examples/cmex/cmex.sce b/modules/mexlib/examples/cmex/cmex.sce
new file mode 100755
index 000000000..0cbd0df1c
--- /dev/null
+++ b/modules/mexlib/examples/cmex/cmex.sce
@@ -0,0 +1,30 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+mode(-1);
+clear
+D=pwd()
+cd(TMPDIR)
+mputl("ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[],[],'''','''','''','''')","builder.sce")
+
+mputl([
+"#include ""mex.h"""
+"void mexFunction(nlhs, plhs, nrhs, prhs)"
+" int nlhs, nrhs;"
+" mxArray *plhs[]; 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))
+cd(D)
diff --git a/modules/mexlib/examples/cmex/readme.txt b/modules/mexlib/examples/cmex/readme.txt
new file mode 100755
index 000000000..ebfefc1ef
--- /dev/null
+++ b/modules/mexlib/examples/cmex/readme.txt
@@ -0,0 +1,14 @@
+The purpose of this contribution is to emulate the Matlab mexfile mechanism.
+
+Only the most useful functions have been emulated.
+
+See SCI/modules/mexlib/src/mexlib.c for additional info and
+in particular the list of emulated mx functions.
+
+-------------------------------------------------------
+To build and load the shared library enter
+ --> exec (SCI+'/modules/mexlib/examples/cmex/cmex.sce')
+ at scilab prompt
+
+-------------------------------------------------------
+INRIA 2006
diff --git a/modules/mexlib/examples/cppmex/builder.sce b/modules/mexlib/examples/cppmex/builder.sce
new file mode 100755
index 000000000..458ea69b9
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/builder.sce
@@ -0,0 +1,50 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// This is the builder.sce
+// must be run from this directory
+
+// interface library name
+ilib_name = "libmex"
+
+// objects files (but do not give mexfiles here)
+files = ["temptst2.cpp"];
+
+// other libs needed for linking (must be shared library names)
+libs = [];
+
+// table of (scilab_name,interface-name or mexfile-name, type)
+table =["square","temptst","cmex"];
+
+if getos() <> "Windows" then
+ if part(getenv("OSTYPE","no"),1:6)=="darwin" then
+ cflags = ""
+ fflags = "";
+ ldflags= "";
+ cc = "g++";
+ else
+ // Since linking is done by gcc and not g++
+ // we must add the libstdc++ to cflags
+ // an other possibility would be to use cflags="" and cc="
+ cflags = " -lstdc++"
+ fflags = "";
+ ldflags= "";
+ cc="";
+ end
+else
+ cflags = ""
+ fflags = "";
+ ldflags= "";
+ cc = "";
+end
+
+// do not modify below
+// ----------------------------------------------
+ilib_mex_build(ilib_name,table,files,libs,"",ldflags,cflags,fflags)
diff --git a/modules/mexlib/examples/cppmex/demo.sce b/modules/mexlib/examples/cppmex/demo.sce
new file mode 100755
index 000000000..7928d811e
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/demo.sce
@@ -0,0 +1,16 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+exec(SCI+"/modules/mexlib/examples/cppmex/builder.sce");
+exec(SCI+"/modules/mexlib/examples/cppmex/loader.sce");
+
+x=56;
+y = square(x);
+if norm(y-x^2) > %eps then pause,end
diff --git a/modules/mexlib/examples/cppmex/libmex.dia.ref b/modules/mexlib/examples/cppmex/libmex.dia.ref
new file mode 100755
index 000000000..0ddfc113b
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/libmex.dia.ref
@@ -0,0 +1,21 @@
+
+// load the shared library
+
+
+exec loader.sce ;
+shared archive loaded
+
+
+// run tests
+
+
+x=56;
+
+y = square(x);
+
+if norm(y-x^2) > %eps then bugmes();quit;end
+
+
+
+
+
diff --git a/modules/mexlib/examples/cppmex/libmex.tst b/modules/mexlib/examples/cppmex/libmex.tst
new file mode 100755
index 000000000..3b1cba897
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/libmex.tst
@@ -0,0 +1,13 @@
+// load the shared library
+
+exec loader.sce ;
+
+// run tests
+
+x=56;
+y = square(x);
+if norm(y-x^2) > %eps then pause,end
+
+
+
+
diff --git a/modules/mexlib/examples/cppmex/readme.txt b/modules/mexlib/examples/cppmex/readme.txt
new file mode 100755
index 000000000..e1e96b29b
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/readme.txt
@@ -0,0 +1,15 @@
+
+ mexfunctions and c++ code
+
+
+
+See SCI/modules/mexlib/srct/mexlib.c for additional info and
+in particular the list of emulated mx functions.
+
+Usage:
+
+exec (SCI+'/modules/mexlib/examples/cppmex/demo.sce');
+
+-------------------------------------------------------
+
+
diff --git a/modules/mexlib/examples/cppmex/temptst.cpp b/modules/mexlib/examples/cppmex/temptst.cpp
new file mode 100755
index 000000000..52cf052d8
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/temptst.cpp
@@ -0,0 +1,38 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "mex.h"
+#include "temptst.h"
+
+extern N1<double> callsquare(N1<double> n1);
+
+void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
+{
+ if (nrhs < 1)
+ {
+ mexErrMsgTxt("Need at least one argument");
+ }
+ if (mxGetM(prhs[0]) == 0)
+ {
+ mexErrMsgTxt("First argument must have at least one entry");
+ }
+ double* m = mxGetPr(prhs[0]);
+
+ N1<double> ans = callsquare(N1<double>(*m));
+ mxArray* result = mxCreateDoubleMatrix(1, 1, mxREAL);
+ *mxGetPr(result) = ans.data();
+ plhs[0] = result;
+ return;
+}
+
+
+
diff --git a/modules/mexlib/examples/cppmex/temptst.h b/modules/mexlib/examples/cppmex/temptst.h
new file mode 100755
index 000000000..c5f0fe984
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/temptst.h
@@ -0,0 +1,52 @@
+
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#ifndef TEMPTST_H
+
+template<class T>
+class N1
+{
+private:
+ T data_;
+public:
+ ~N1() { }
+ T data() const
+ {
+ return data_;
+ }
+ T sqr() const;
+ const N1<T>& operator=(const N1<T>& v);
+ N1(const N1<T>& v)
+ {
+ operator=(v);
+ }
+ N1(T d1): data_(d1) { }
+};
+
+
+template<class T>
+T N1<T>::sqr() const
+{
+ return data_ * data_;
+}
+
+template<class T>
+const N1<T>& N1<T>::operator=(const N1<T>& v)
+{
+ data_ = v.data();
+ return *this;
+}
+
+#endif
+
+#define TEMPTST_H
diff --git a/modules/mexlib/examples/cppmex/temptst2.cpp b/modules/mexlib/examples/cppmex/temptst2.cpp
new file mode 100755
index 000000000..5213de024
--- /dev/null
+++ b/modules/mexlib/examples/cppmex/temptst2.cpp
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "temptst.h"
+
+N1<double> callsquare(N1<double> n1)
+{
+ double x = n1.sqr();
+ return N1<double>(x);
+}
+
diff --git a/modules/mexlib/examples/fmex/builder.sce b/modules/mexlib/examples/fmex/builder.sce
new file mode 100755
index 000000000..1e66fba22
--- /dev/null
+++ b/modules/mexlib/examples/fmex/builder.sce
@@ -0,0 +1,33 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// This is the builder.sce
+// must be run from this directory
+
+// interface library name
+ilib_name = "libmex"
+
+// objects files (but do not give mexfiles here)
+files = [];
+
+// other libs needed for linking (must be shared library names)
+libs = [];
+
+// table of (scilab_name,interface-name or mexfile-name, type)
+
+table =["mexf1","mexfunction1","fmex"];
+
+ldflags = "";
+cflags = "";
+fflags = "";
+
+// do not modify below
+// ----------------------------------------------
+ilib_mex_build(ilib_name,table,files,libs,"",ldflags,cflags,fflags)
diff --git a/modules/mexlib/examples/fmex/demo.sce b/modules/mexlib/examples/fmex/demo.sce
new file mode 100755
index 000000000..c5da3deaf
--- /dev/null
+++ b/modules/mexlib/examples/fmex/demo.sce
@@ -0,0 +1,23 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Allan CORNET
+// INRIA 2007
+
+exec(SCI+"/modules/mexlib/examples/fmex/builder.sce");
+exec(SCI+"/modules/mexlib/examples/fmex/loader.sce");
+
+[a,b]=mexf1(1,2);
+
+if (b~=2) then
+ disp("problem with this example");
+else
+ disp("ok");
+end
diff --git a/modules/mexlib/examples/fmex/mexfunction1.F b/modules/mexlib/examples/fmex/mexfunction1.F
new file mode 100755
index 000000000..8501e071a
--- /dev/null
+++ b/modules/mexlib/examples/fmex/mexfunction1.F
@@ -0,0 +1,23 @@
+ subroutine mexfunction(nlhs, plhs, nrhs, prhs)
+c [a,b]=mexf1(1,2) see builder.sce file
+
+ integer*4 plhs(*), prhs(*)
+C Uncomment for 64 bits Dec Alpha machines
+C integer*8 plhs(*), prhs(*)
+C
+ integer nlhs, nrhs
+c
+ if (nrhs.ne.2) then
+ call mexerrmsgtxt('Two inputs needed')
+ endif
+
+ if (nlhs.gt.2) then
+ call mexerrmsgtxt('Two many outputs')
+ endif
+
+ plhs(1)=prhs(1)
+ plhs(2)=prhs(2)
+
+ return
+ end
+
diff --git a/modules/mexlib/examples/fmex/readme.txt b/modules/mexlib/examples/fmex/readme.txt
new file mode 100755
index 000000000..03c362d6b
--- /dev/null
+++ b/modules/mexlib/examples/fmex/readme.txt
@@ -0,0 +1,14 @@
+The purpose of this contribution is to emulate the Matlab mexfile mechanism.
+
+Only the most useful functions have been emulated.
+
+See SCI/modules/mexlib/src/mexlib.c for additional info and
+in particular the list of emulated mx functions.
+
+-------------------------------------------------------
+To build and load the shared library enter
+ --> exec (SCI+'/modules/mexlib/examples/fmex/demo.sce')
+ at scilab prompt
+
+-------------------------------------------------------
+INRIA 2007
diff --git a/modules/mexlib/examples/interface/builder.sce b/modules/mexlib/examples/interface/builder.sce
new file mode 100755
index 000000000..6bcd64d2c
--- /dev/null
+++ b/modules/mexlib/examples/interface/builder.sce
@@ -0,0 +1,52 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// This is the builder.sce
+// must be run from this directory
+
+// [1] generate Path.incl
+// here we want SCI to be ../../
+// but in a contrib the next line should be
+// replaced by sci = SCI
+
+sci="../../"
+F=mopen("Path.incl","w");
+mfprintf(F,"SCIDIR="+sci+"\n");
+mfprintf(F,"SCIDIR1="+strsubst(sci,"/","\\")+"\n");
+mclose(F);
+
+// [2] building lib/libutil.xx
+
+chdir lib
+exec builder.sce
+chdir ../
+
+// [3] the part devoted to shared lib generation
+
+ilib_name = "libmex" // interface library name
+
+// objects files (but do not give mexfiles here)
+
+files = ["f4.o"];
+
+// other libs needed for linking (must be shared library names)
+
+libs = ["lib/libutil"];
+
+// table of (scilab_name,interface-name or mexfile-name, type)
+
+table =["f1", "fmex1", "cmex";
+"f2", "fmex2", "cmex";
+"f3", "foof", "Fmex";
+"f4", "int_f4" "csci"];
+
+// do not modify below
+// ----------------------------------------------
+ilib_build(ilib_name,table,files,libs)
diff --git a/modules/mexlib/examples/interface/demo.sce b/modules/mexlib/examples/interface/demo.sce
new file mode 100755
index 000000000..8f6028bbe
--- /dev/null
+++ b/modules/mexlib/examples/interface/demo.sce
@@ -0,0 +1,27 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+currentdir=pwd();
+cd SCI+"/modules/mexlib/examples/interface/lib"
+
+exec("builder.sce");
+
+cd SCI+"/modules/mexlib/examples/interface"
+exec("builder.sce");
+
+exec(SCI+"/modules/mexlib/examples/interface/loader.sce");
+
+
+if f1(89)<>89+2 then pause,end
+if f2(89)<>89+3 then pause,end
+if f3(89)<>89 then pause,end
+if f4(89)<>89+5 then pause,end
+
+cd currentdir
diff --git a/modules/mexlib/examples/interface/f4.c b/modules/mexlib/examples/interface/f4.c
new file mode 100755
index 000000000..c7d924aec
--- /dev/null
+++ b/modules/mexlib/examples/interface/f4.c
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include "stack-c.h"
+#include "lib/pipo.h"
+
+int int_f4(char *fname)
+{
+ static int l1, m1, n1;
+ CheckRhs(1, 1);
+ CheckLhs(1, 1);
+ GetRhsVar(1, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1);
+ CheckScalar(1, m1, n1);
+ *istk(l1) = foo(*istk(l1));
+ *istk(l1) = bar(*istk(l1));
+ LhsVar(1) = 1;
+ return 0;
+}
diff --git a/modules/mexlib/examples/interface/fmex1.c b/modules/mexlib/examples/interface/fmex1.c
new file mode 100755
index 000000000..e9c2e8911
--- /dev/null
+++ b/modules/mexlib/examples/interface/fmex1.c
@@ -0,0 +1,43 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <stdio.h>
+#include "mex.h"
+#include "lib/pipo.h"
+
+void mexFunction(nlhs, plhs, nrhs, prhs)
+int nlhs, nrhs;
+Matrix *plhs[];
+Matrix *prhs[];
+{
+ Matrix *ptrA;
+ double *A;
+ int m, n;
+ if (nrhs != 1)
+ {
+ mexErrMsgTxt("This function requires 1 input!");
+ }
+ if (nlhs > 1)
+ {
+ mexErrMsgTxt("This function requires at most 1 output !");
+ }
+ ptrA = prhs[0];
+ if (! mxIsNumeric(prhs[0]))
+ {
+ mexErrMsgTxt("First argument must be numeric matrix.");
+ }
+ m = mxGetM(ptrA);
+ n = mxGetN(ptrA);
+ A = mxGetPr(ptrA);
+ A[0] = foo( (int) A[0]);
+ plhs[0] = prhs[0];
+}
diff --git a/modules/mexlib/examples/interface/fmex2.c b/modules/mexlib/examples/interface/fmex2.c
new file mode 100755
index 000000000..ff81d2d21
--- /dev/null
+++ b/modules/mexlib/examples/interface/fmex2.c
@@ -0,0 +1,43 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <stdio.h>
+#include "mex.h"
+#include "lib/pipo.h"
+
+void mexFunction(nlhs, plhs, nrhs, prhs)
+int nlhs, nrhs;
+Matrix *plhs[];
+Matrix *prhs[];
+{
+ Matrix *ptrA;
+ double *A;
+ int m, n;
+ if (nrhs != 1)
+ {
+ mexErrMsgTxt("This function requires 1 input!");
+ }
+ if (nlhs > 1)
+ {
+ mexErrMsgTxt("This function requires at most 1 output !");
+ }
+ ptrA = prhs[0];
+ if (! mxIsNumeric(prhs[0]))
+ {
+ mexErrMsgTxt("First argument must be numeric matrix.");
+ }
+ m = mxGetM(ptrA);
+ n = mxGetN(ptrA);
+ A = mxGetPr(ptrA);
+ A[0] = bar( (int) A[0]);
+ plhs[0] = prhs[0];
+}
diff --git a/modules/mexlib/examples/interface/foof.F b/modules/mexlib/examples/interface/foof.F
new file mode 100755
index 000000000..653b7118b
--- /dev/null
+++ b/modules/mexlib/examples/interface/foof.F
@@ -0,0 +1,16 @@
+ subroutine mexfunction(nlhs,plhs,nrhs,prhs)
+c simple example of fortran mex.
+c usage a=pipo3(2)
+ integer*4 plhs(*), prhs(*)
+c FOR 64 bits MACHINES SHOULD BE integer*8
+ integer nlhs, nrhs
+c
+ if (nrhs.ne.1) then
+ call mexerrmsgtxt('Requires ONE input')
+ endif
+ if (nlhs.ne.1) then
+ call mexerrmsgtxt('Requires ONE output!')
+ endif
+ plhs(1)=prhs(1)
+ return
+ end
diff --git a/modules/mexlib/examples/interface/lib/bar.c b/modules/mexlib/examples/interface/lib/bar.c
new file mode 100755
index 000000000..5955e742f
--- /dev/null
+++ b/modules/mexlib/examples/interface/lib/bar.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "pipo.h"
+
+int bar(int x)
+{
+ return x + 3;
+}
diff --git a/modules/mexlib/examples/interface/lib/builder.sce b/modules/mexlib/examples/interface/lib/builder.sce
new file mode 100755
index 000000000..3e9a46791
--- /dev/null
+++ b/modules/mexlib/examples/interface/lib/builder.sce
@@ -0,0 +1,28 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Demo file for ext1c example
+
+// builder code for ext1c.c
+link_name = "util" ; // functions to be added to the call table
+// the first entry point gives the name of the library
+// note here that util is not an entry point
+// thus the generated loader.sce will not work
+// but it does not matter since we will use an other
+// loader.sce (../lib/loader.sce)
+
+flag = "c"; // ext1c is a C function
+files = ["foo.o";"bar.o" ]; // objects files for ext1c
+libs = []; // other libs needed for linking
+
+// the next call generates files (Makelib,loader.sce) used
+// for compiling and loading ext1c and performs the compilation
+
+ilib_for_link(link_name,files,libs,flag);
diff --git a/modules/mexlib/examples/interface/lib/foo.c b/modules/mexlib/examples/interface/lib/foo.c
new file mode 100755
index 000000000..ac2c065de
--- /dev/null
+++ b/modules/mexlib/examples/interface/lib/foo.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "pipo.h"
+
+int foo(int x)
+{
+ return x + 2;
+}
diff --git a/modules/mexlib/examples/interface/lib/pipo.h b/modules/mexlib/examples/interface/lib/pipo.h
new file mode 100755
index 000000000..9568313e3
--- /dev/null
+++ b/modules/mexlib/examples/interface/lib/pipo.h
@@ -0,0 +1,16 @@
+
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+extern int foo(int x) ;
+extern int bar(int x) ;
+
diff --git a/modules/mexlib/examples/interface/libmex.dia.ref b/modules/mexlib/examples/interface/libmex.dia.ref
new file mode 100755
index 000000000..6843699b4
--- /dev/null
+++ b/modules/mexlib/examples/interface/libmex.dia.ref
@@ -0,0 +1,24 @@
+
+// load the shared library
+
+
+exec loader.sce ;
+shared archive loaded
+Link done
+shared archive loaded
+
+
+if f1(89)<>89+2 then bugmes();quit;end
+
+if f2(89)<>89+3 then bugmes();quit;end
+
+if f3(89)<>89 then bugmes();quit;end
+
+if f4(89)<>89+5 then bugmes();quit;end
+
+
+
+
+
+
+
diff --git a/modules/mexlib/examples/interface/libmex.tst b/modules/mexlib/examples/interface/libmex.tst
new file mode 100755
index 000000000..660027d25
--- /dev/null
+++ b/modules/mexlib/examples/interface/libmex.tst
@@ -0,0 +1,14 @@
+// load the shared library
+
+exec loader.sce ;
+
+if f1(89)<>89+2 then pause,end
+if f2(89)<>89+3 then pause,end
+if f3(89)<>89 then pause,end
+if f4(89)<>89+5 then pause,end
+
+
+
+
+
+
diff --git a/modules/mexlib/examples/interface/readme.txt b/modules/mexlib/examples/interface/readme.txt
new file mode 100755
index 000000000..0c01277aa
--- /dev/null
+++ b/modules/mexlib/examples/interface/readme.txt
@@ -0,0 +1,12 @@
+Copyright Jean-Philippe Chancelier/Cermics Enpc
+
+This directory contains example of a mix of C interface routines and
+C and Fortran mex files. More over the interfaces and mex functions
+use symbols defined in a shared library lib/libutil.so (or .dll) defined
+in the lib subdirectory.
+
+Jean-Philipppe Chancelier
+
+exec(SCI+'/modules/mexlib/examples/interface/demo.sce');
+
+
diff --git a/modules/mexlib/examples/mexdll/Makelib.mak b/modules/mexlib/examples/mexdll/Makelib.mak
new file mode 100755
index 000000000..52c4079ce
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/Makelib.mak
@@ -0,0 +1,13 @@
+SCIDIR =../../../..
+SCIDIR1 =..\..\..\..
+# name of the dll to be built
+LIBRARY = libtst
+# list of objects file
+OBJS = libtst.obj
+# added libraries
+OTHERLIBS = xtimesy.lib
+!include $(SCIDIR)/Makefile.incl.mak
+CFLAGS = $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)\libs\MALLOC\includes" -I"$(SCIDIR)\modules\core\includes" -I"$(SCIDIR)/libs/f2c" -I"$(SCIDIR)/modules/mexlib/includes"
+FFLAGS = $(FC_OPTIONS) -DFORDLL -I"$(SCIDIR)\libs\MALLOC\includes" -I"$(SCIDIR)\modules\core\includes" -I"$(SCIDIR)/libs/f2c" -I"$(SCIDIR)/modules/mexlib/includes"
+EXTRA_LDFLAGS =
+!include $(SCIDIR1)\modules\dynamic_link\src\scripts\Makedll.incl
diff --git a/modules/mexlib/examples/mexdll/demo.sce b/modules/mexlib/examples/mexdll/demo.sce
new file mode 100755
index 000000000..4a81d2ef1
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/demo.sce
@@ -0,0 +1,23 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Allan CORNET
+// INRIA 2007
+
+cd "SCI/modules/mexlib/examples/mexdll"
+
+if (findmsvccompiler() <> "unknown") then
+ unix_w("lib /def:xtimesy.def");
+ unix_w("nmake /f makelib.mak all");
+
+ addinter("libtst.dll","libtst","xtimesy")
+ xtimesy(2,3)
+
+end
diff --git a/modules/mexlib/examples/mexdll/libtst.c b/modules/mexlib/examples/mexdll/libtst.c
new file mode 100755
index 000000000..0a19c7a38
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/libtst.c
@@ -0,0 +1,25 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <mex.h>
+extern Gatefunc mexFunction;
+static GenericTable Tab[] =
+{
+ {mex_gateway, mexFunction, "errmsg"},
+};
+
+int C2F(libtst)()
+{
+ Rhs = Max(0, Rhs);
+ (*(Tab[Fin - 1].f))(Tab[Fin - 1].name, Tab[Fin - 1].F);
+ return 0;
+}
diff --git a/modules/mexlib/examples/mexdll/readme.txt b/modules/mexlib/examples/mexdll/readme.txt
new file mode 100755
index 000000000..80d46e1d4
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/readme.txt
@@ -0,0 +1,8 @@
+Linking a .mexglx, say xtimesy.mexglx, file with Scilab.
+VISUAL C++ environment.
+
+exec(SCI+'/modules/mexlib/examples/mexdll/demo.sce');
+
+Note that for each mex .dll file a second .dll file must be
+constructed. It is not possible to call several mex .dll
+files by a unique gateway (such as libtst).
diff --git a/modules/mexlib/examples/mexdll/xtimesy.def b/modules/mexlib/examples/mexdll/xtimesy.def
new file mode 100755
index 000000000..54b598032
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/xtimesy.def
@@ -0,0 +1,3 @@
+LIBRARY xtimesy.dll
+EXPORTS
+ mexFunction
diff --git a/modules/mexlib/examples/mexdll/xtimesy.dll b/modules/mexlib/examples/mexdll/xtimesy.dll
new file mode 100755
index 000000000..58fbedc37
--- /dev/null
+++ b/modules/mexlib/examples/mexdll/xtimesy.dll
Binary files differ
diff --git a/modules/mexlib/examples/mexglx/README b/modules/mexlib/examples/mexglx/README
new file mode 100755
index 000000000..320fab67e
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/README
@@ -0,0 +1,85 @@
+Linking a .mexglx, say foo.mexglx, file with Scilab.
+(Assuming foo.mexglx has been created by the Matlab's mex script).
+
+0/ Here I create the file foo.mexglx using Scilab, just to have a
+ proper foo.mexglx for testing (note that I copy libfoo.so to foo.mexglx
+ but internally the name libfoo.so is contained in foo.mexglx and
+ the dynamic loader will search libfoo.so (see below)).
+
+-->ilib_for_link("foo",['foo.o'],[],"c");
+-->host('cp libfoo.so foo.mexglx');
+
+ If I have matlab
+
+-->host('mex -V4 foo.c');
+
+1/ If necessary, create empty libmx.so libmex.so and libmat.so which
+ could be required by the .mexglx file.
+ (If "ldd foo.mexglx" shows a dependency).
+
+This is done by the following commands:
+
+-->ilib_for_link("mx",[],[],"c");
+-->ilib_for_link("mex",[],[],"c");
+-->ilib_for_link("mat",[],[],"c");
+
+2/link the (almost empty) .so files with Scilab
+
+// Note that this is not really usefull
+//-->link ./libmx.so;
+//-->link ./libmex.so;
+//-->link ./libmat.so;
+
+3/link foo.mexglx with Scilab
+-->link ./foo.mexglx;
+
+4/ Make a dynamic library with the provided C routine (libtst.c file).
+ Note that you can use libtst.c file as is and that the entrypoint
+ MUST BE mexFunction. If you have more than one mexglx files you
+ will need to copy libtst.c and change only the function name
+ (this is described below)
+
+-->ilib_for_link("tst",['libtst.o'],[],"c");
+
+5/At Scilab prompt enter:
+
+-->addinter('./libtst.so','libtst','foo');
+OR addinter ./libtst.so libtst foo to link libtst.so with Scilab.
+Note that foo is the name of the Scilab function.
+
+6/call the mexfunction:
+-->foo(5,'foo')
+
+Note that the mexfunction is called through the libtst function
+using the entrypoint 'libtst' (not mexFunction!).
+If several mexFunction are used, one should build several
+libtst.c file, one for each mexfunction, using a different name
+e.g. libtst1.c libtst2.c ... Each mexFunction must be called through a
+different entrypoint.
+
+Here Makelib and libtst.c are generic files while
+Makextimesy and libxtimesy.c are adapted to xtimesy.mexglx.
+
+*********************************************
+
+OR ...
+ld -shared -o foo.so libtst.so foo.mexglx -rpath `pwd`
+addinter('./foo.so','libtst','foo');
+
+EXAMPLE:
+mexname='xtimesy';
+mputl(strsubst(mgetl('libtst.c'),'libtst',mexname),'lib'+mexname+'.c');
+mputl(strsubst(mgetl('Makelib'),'libtst','lib'+mexname),'Make'+mexname);
+//make -f Makextimesy
+// ld -shared -o xtimesy.so libxtimesy.o xtimesy.mexglx -rpath `pwd`
+//OR :
+link ./libmx.so;
+link ./libmex.so;
+link ./libmat.so;
+link ./xtimesy.mexglx;
+addinter('./libxtimesy.so','xtimesy','xtimesy')
+xtimesy(2,3)
+
+
+
+
diff --git a/modules/mexlib/examples/mexglx/foo.c b/modules/mexlib/examples/mexglx/foo.c
new file mode 100755
index 000000000..025b29557
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/foo.c
@@ -0,0 +1,70 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <stdio.h>
+#include "mex.h"
+
+#define STRING "hello world"
+
+void ABcopy (double *a, double *b, int mn);
+
+void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
+{
+ mxArray *ptrB;
+ double *A, *B;
+ int m, n, it, strl;
+ char *str;
+ if (nrhs != 2)
+ {
+ mexErrMsgTxt("This function requires 2 inputs!");
+ }
+ if (nlhs > 3)
+ {
+ mexErrMsgTxt("This function requires at most 3 outputs!");
+ }
+ if (! mxIsNumeric(prhs[0]))
+ {
+ mexErrMsgTxt("First argument must be numeric matrix.");
+ }
+ if (! mxIsChar(prhs[1]))
+ {
+ mexErrMsgTxt("Second argument must be a string.");
+ }
+ m = mxGetM(prhs[0]);
+ n = mxGetN(prhs[0]);
+ A = mxGetPr(prhs[0]);
+ it = 0;
+ ptrB = mxCreateDoubleMatrix(n, m, it);
+ m = mxGetM(ptrB);
+ n = mxGetN(ptrB);
+ B = mxGetPr(ptrB);
+ ABcopy(A, B, m * n);
+ plhs[0] = prhs[0];
+ plhs[1] = ptrB;
+ m = mxGetM(prhs[1]);
+ strl = mxGetN(prhs[1]);
+ str = mxCalloc(m * strl + 1, sizeof(char));
+ mxGetString(prhs[1], str, m * strl);
+ plhs[2] = mxCreateString(str);
+}
+
+void ABcopy(a, b, mn)
+double *a;
+double *b;
+int mn;
+{
+ int i;
+ for ( i = 0 ; i < mn ; i++)
+ {
+ b[i] = a[i] + 33.0 + i;
+ }
+}
diff --git a/modules/mexlib/examples/mexglx/libtst.c b/modules/mexlib/examples/mexglx/libtst.c
new file mode 100755
index 000000000..0a19c7a38
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/libtst.c
@@ -0,0 +1,25 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <mex.h>
+extern Gatefunc mexFunction;
+static GenericTable Tab[] =
+{
+ {mex_gateway, mexFunction, "errmsg"},
+};
+
+int C2F(libtst)()
+{
+ Rhs = Max(0, Rhs);
+ (*(Tab[Fin - 1].f))(Tab[Fin - 1].name, Tab[Fin - 1].F);
+ return 0;
+}
diff --git a/modules/mexlib/examples/mexglx/test.dia.ref b/modules/mexlib/examples/mexglx/test.dia.ref
new file mode 100755
index 000000000..3b4cd1e7c
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/test.dia.ref
@@ -0,0 +1,102 @@
+
+// Linking a0.mexglx, say foo.mexglx, file with Scilab.
+
+// (Assuming foo.mexglx has been created by the Matlab's mex script).
+
+// 0/ Here I create the file foo.mexglx using Scilab, just to have a
+
+// proper foo.mexglx for testing
+
+
+ilib_for_link("foo",['foo.o'],[],"c");
+ generate a loader file
+ generate a Makefile
+ running the makefile
+ compilation of foo
+ building shared library (be patient)
+
+host('cp libfoo.so foo.mexglx');
+
+
+// 1/ If necessary, create empty libmx.so libmex.so and libmat.so which
+
+// could be required by the0.mexglx file.
+
+// (If "ldd foo.mexglx" shows a dependency).
+
+// This is done by the following commands:
+
+
+ilib_for_link("mx",[],[],"c");
+ generate a loader file
+ generate a Makefile
+ running the makefile
+ building shared library (be patient)
+
+ilib_for_link("mex",[],[],"c");
+ generate a loader file
+ generate a Makefile
+ running the makefile
+ building shared library (be patient)
+
+ilib_for_link("mat",[],[],"c");
+ generate a loader file
+ generate a Makefile
+ running the makefile
+ building shared library (be patient)
+
+
+// 2/link the (almost empty)0.so files with Scilab
+
+// Note that this is not really usefull
+
+
+//link0./libmx.so;
+
+//link0./libmex.so;
+
+//link0./libmat.so;
+
+
+// 3/link foo.mexglx with Scilab
+
+link0./foo.mexglx;
+shared archive loaded
+Link done
+
+
+// 4/ Make a dynamic library with the provided C routine (libtst.c file).
+
+// Note that you can use libtst.c file as is and that the entrypoint
+
+// MUST BE mexFunction. If you have more than one mexglx files you
+
+// will need to copy libtst.c and change only the function name
+
+// (this is described below)
+
+
+ilib_for_link("tst",['libtst.o'],[],"c");
+ generate a loader file
+ generate a Makefile
+ running the makefile
+ compilation of libtst
+ building shared library (be patient)
+
+
+//5/At Scilab prompt enter:
+
+
+addinter('./libtst.so','libtst','foo');
+shared archive loaded
+
+
+// 6/call the mexfunction:
+
+
+foo(5,'test string')
+ ans =
+
+ 5.
+
+
diff --git a/modules/mexlib/examples/mexglx/test.sce b/modules/mexlib/examples/mexglx/test.sce
new file mode 100755
index 000000000..2a81e22e0
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/test.sce
@@ -0,0 +1,53 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Linking a .mexglx, say foo.mexglx, file with Scilab.
+// (Assuming foo.mexglx has been created by the Matlab's mex script).
+// 0/ Here I create the file foo.mexglx using Scilab, just to have a
+// proper foo.mexglx for testing
+
+ilib_for_link("foo",["foo.o"],[],"c");
+host("cp libfoo.so foo.mexglx");
+
+// 1/ If necessary, create empty libmx.so libmex.so and libmat.so which
+// could be required by the .mexglx file.
+// (If "ldd foo.mexglx" shows a dependency).
+// This is done by the following commands:
+
+ilib_for_link("mx",[],[],"c");
+ilib_for_link("mex",[],[],"c");
+ilib_for_link("mat",[],[],"c");
+
+// 2/link the (almost empty) .so files with Scilab
+// Note that this is not really usefull
+
+//link ./libmx.so;
+//link ./libmex.so;
+//link ./libmat.so;
+
+// 3/link foo.mexglx with Scilab
+link ./foo.mexglx;
+
+// 4/ Make a dynamic library with the provided C routine (libtst.c file).
+// Note that you can use libtst.c file as is and that the entrypoint
+// MUST BE mexFunction. If you have more than one mexglx files you
+// will need to copy libtst.c and change only the function name
+// (this is described below)
+
+ilib_for_link("tst",["libtst.o"],[],"c");
+
+//5/At Scilab prompt enter:
+
+addinter("./libtst.so","libtst","foo");
+
+// 6/call the mexfunction:
+
+foo(5,"test string")
+
diff --git a/modules/mexlib/examples/mexglx/test1.sce b/modules/mexlib/examples/mexglx/test1.sce
new file mode 100755
index 000000000..41c2eb46f
--- /dev/null
+++ b/modules/mexlib/examples/mexglx/test1.sce
@@ -0,0 +1,45 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Linking a .mexglx, say foo.mexglx, file with Scilab.
+// (Assuming foo.mexglx has been created by the Matlab's mex script).
+// 0/ Here I create the file foo.mexglx using Scilab, just to have a
+// proper foo.mexglx for testing
+
+ilib_for_link("foo",["foo.o"],[],"c");
+host("cp libfoo.so foo.mexglx");
+
+// 1/ If necessary, create empty libmx.so libmex.so and libmat.so which
+// could be required by the .mexglx file.
+// (If "ldd foo.mexglx" shows a dependency).
+// This is done by the following commands:
+
+ilib_for_link("mx",[],[],"c");
+ilib_for_link("mex",[],[],"c");
+ilib_for_link("mat",[],[],"c");
+
+// 4/ Make a dynamic library with the provided C routine (libtst.c file).
+// Note that you can use libtst.c file as is and that the entrypoint
+// MUST BE mexFunction. If you have more than one mexglx files you
+// will need to copy libtst.c and change only the function name
+// (this is described below)
+
+// just make a lib*.so from ./foo.mexglx or else libtool will ignore ./foo.mexglx
+
+host("cp ./foo.mexglx libfoo_mex.so")
+ilib_for_link("tst",["libtst.o"]," -R`pwd` -L`pwd` -lfoo_mex -lmx -lmex -lmat","c");
+
+//5/At Scilab prompt enter:
+
+addinter("./libtst.so","libtst","foo");
+
+// 6/call the mexfunction:
+
+foo(5,"test string")
diff --git a/modules/mexlib/help/en_US/addchapter.sce b/modules/mexlib/help/en_US/addchapter.sce
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/help/en_US/addchapter.sce
diff --git a/modules/mexlib/help/fr_FR/addchapter.sce b/modules/mexlib/help/fr_FR/addchapter.sce
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/help/fr_FR/addchapter.sce
diff --git a/modules/mexlib/help/ja_JP/addchapter.sce b/modules/mexlib/help/ja_JP/addchapter.sce
new file mode 100755
index 000000000..139597f9c
--- /dev/null
+++ b/modules/mexlib/help/ja_JP/addchapter.sce
@@ -0,0 +1,2 @@
+
+
diff --git a/modules/mexlib/help/pt_BR/addchapter.sce b/modules/mexlib/help/pt_BR/addchapter.sce
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/help/pt_BR/addchapter.sce
diff --git a/modules/mexlib/help/ru_RU/addchapter.sce b/modules/mexlib/help/ru_RU/addchapter.sce
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/help/ru_RU/addchapter.sce
diff --git a/modules/mexlib/includes/mex.h b/modules/mexlib/includes/mex.h
new file mode 100755
index 000000000..d40e4b2f1
--- /dev/null
+++ b/modules/mexlib/includes/mex.h
@@ -0,0 +1,356 @@
+
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ * Copyright (C) ENPC
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SCI_MEX
+#define SCI_MEX
+
+#ifdef WIN32
+#include <stddef.h> /*for LCC */
+#endif
+
+#define __MEX_INCLUDE__
+#include "stack-c.h"
+#undef __MEX_INCLUDE__
+
+ typedef int Matrix;
+ typedef unsigned long int vraiptrst;
+#ifndef __DEF_MXARRAY__
+#define __DEF_MXARRAY__
+ typedef int mxArray;
+ typedef int Gatefunc (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);
+#endif
+
+ typedef int (*GatefuncH) (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);
+
+ typedef int (*FGatefuncH) (int *nlhs, mxArray *plhs[], int *nrhs, mxArray *prhs[]);
+
+ typedef int (*Myinterfun) (char *, GatefuncH F);
+
+ typedef int (*GT) ();
+
+#ifndef __DEF_TABLE_STRUCT__
+#define __DEF_TABLE_STRUCT__
+ typedef struct table_struct
+ {
+ Myinterfun f; /** interface **/
+ GT F; /** function **/
+ char *name; /** its name **/
+ } GenericTable;
+#endif
+
+#define mxLOGICAL int
+#define mxLogical int
+
+#define REAL 0
+#define COMPLEX 1
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define mxCreateFull mxCreateDoubleMatrix
+
+#ifndef __cplusplus
+#ifndef bool
+#define bool int
+#endif
+#endif
+
+ /* mexGetMatrixPtr - mexGetArrayPtr : NOT IN MATLAB API - V6.4 compatible*/
+#define mexGetMatrixPtr(name) mexGetArrayPtr(name, "caller")
+
+ /* mexGetArray : NOT IN MATLAB API - V6.4 compatible*/
+#define mexGetArrayPtr(name,type) mexGetArray(name,type)
+
+ void mexPrintf(const char *fmt, ...);
+ void C2F(mexprintf)(char *error_msg, int len);
+
+ /* mexPutFull: NOT IN MATLAB API - V4 compatible */
+ /** Put a matrix in Scilab Workspace */
+#define mexPutFull(name,m,n,ptrM,tag) \
+ if ( ! C2F(cwritemat)(name,(c_local=m,&c_local),(c1_local=n,&c1_local),ptrM,strlen(name))) { \
+ mexErrMsgTxt(_("mexPutFull failed\n"));return; }
+
+ /* prototypes */
+
+ /* mexInfo: NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ void mexInfo (char *);
+
+ /* mexCheck: NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ int mexCheck (char *, int );
+
+ mxArray *mxCreateCharMatrixFromStrings (int m, const char **str);
+ mxArray *mxCreateString (const char *string);
+ mxArray *C2F(mxcreatestring) (char *string, long int l);
+ /* mxcreatefull : NOT IN MATLAB API - v4 compatible */
+ mxArray *C2F(mxcreatefull) (int *m, int *n, int *it);
+ mxArray *mxCreateCharArray (int ND, const int *size);
+
+ mxArray *mxCreateCellArray (int ND, const int *size);
+ mxArray *mxCreateCellMatrix (int m, int n);
+
+ mxArray *mxCreateStructArray (int ndim, const int *dims, int nfields, const char **field_names);
+ mxArray *mxCreateStructMatrix (int m, int n, int nfields, const char **field_names);
+
+ mxArray *mxGetCell (const mxArray *ptr, int index);
+
+ double mxGetScalar (const mxArray *ptr);
+ double C2F(mxgetscalar) (mxArray *ptr);
+ double *mxGetPi (const mxArray *ptr);
+ double * C2F(mxgetpi) (mxArray *ptr);
+ double *mxGetPr (const mxArray *ptr);
+ double * C2F(mxgetpr) (mxArray *ptr);
+ double mxGetInf (void);
+ double mxGetNaN (void);
+ double mxGetEps (void);
+ bool mxIsNaN (double x);
+ bool mxIsInf (double x);
+ bool mxIsFinite (double x);
+ int *mxGetDimensions (const mxArray *ptr);
+ int mxCalcSingleSubscript (const mxArray *ptr, int nsubs, const int *subs);
+ int mxGetNumberOfElements (const mxArray *ptr);
+ int mxGetNumberOfDimensions(const mxArray *ptr);
+ int mxGetNumberOfFields(const mxArray *ptr);
+ void *mxGetData(const mxArray *ptr);
+ void *mxGetImagData(const mxArray *ptr);
+
+ void clear_mex(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs);
+
+ extern void errjump ();
+
+ int mxGetM (const mxArray *ptr);
+ int C2F(mxgetm) (mxArray *ptr);
+ int mxGetN (const mxArray *ptr);
+ int C2F(mxgetn) (mxArray *ptr);
+ int mxGetString (const mxArray *ptr, char *str, int strl);
+ int C2F(mxgetstring) (mxArray *ptr, char *str, int *strl);
+ bool mxIsComplex (const mxArray *ptr);
+ int C2F(mxiscomplex) (mxArray *ptr);
+ /* mxisfull : NOT IN MATLAB API - v4 compatible */
+ bool mxIsFull (const mxArray *ptr);
+ int C2F(mxisfull) (mxArray *ptr);
+ bool mxIsNumeric (const mxArray *ptr);
+ int C2F(mxisnumeric) (mxArray *ptr);
+ bool mxIsSparse (const mxArray *ptr);
+ int C2F(mxissparse) (mxArray *ptr);
+ /* mxisstring : NOT IN MATLAB API - v6.0 compatible */
+ bool mxIsString (const mxArray *ptr);
+ int C2F(mxisstring) (mxArray *ptr);
+ int *mxGetIr (const mxArray *ptr);
+ int *mxGetJc (const mxArray *ptr);
+
+ /**
+ * TODO : comment
+ * @param type
+ * @param m
+ * @param n
+ * @param it
+ * @param lr
+ * @param ptr
+ * @param type_len
+ * @return
+ */
+ int C2F(createptr) (char *type, int *m, int *n, int *it, int *lr, int *ptr, long int type_len);
+
+ /**
+ * TODO : comment
+ * @param m
+ * @param ptr
+ * @return
+ */
+ int C2F(createstkptr) (int *m, vraiptrst *ptr);
+
+
+ /**
+ * TODO : comment
+ * @param nlhs
+ * @param plhs
+ * @param nrhs
+ * @param prhs
+ * @return
+ */
+ int C2F(endmex) (int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs);
+
+
+ /**
+ * TODO : comment
+ * @param nlhs
+ * @param plhs
+ * @param nrhs
+ * @param prhs
+ * @return
+ */
+ int C2F(initmex) (int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs);
+
+ int C2F(mexcallscilab) (int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs, char *name, int namelen);
+ int C2F(mxcopyptrtoreal8) (mxArray *ptr, double *y, int *n);
+ int C2F(mxcopyreal8toptr) (double *y, mxArray *ptr, int *n);
+ int fortran_mex_gateway (char *fname, FGatefuncH F);
+ int mexAtExit (mxArray *ptr);
+ int mexCallSCILAB (int nlhs, mxArray **plhs, int nrhs, mxArray **prhs, const char *name);
+ int mexCallMATLAB (int nlhs, mxArray **plhs, int nrhs, mxArray **prhs, const char *name);
+ int mex_gateway (char *fname, GatefuncH F);
+ int mxGetElementSize (const mxArray *ptr);
+ int mxGetNzmax (const mxArray *ptr);
+ char *mxArrayToString (const mxArray *array_ptr);
+ bool mxIsDouble (const mxArray *ptr);
+ bool mxIsSingle (const mxArray *ptr);
+ bool mxIsLogical (const mxArray *ptr);
+ bool mexIsGlobal(const mxArray *ptr);
+ /* mxsetlogical: NOT IN MATLAB API - v6.5 compatible */
+ void mxSetLogical (mxArray *ptr);
+ /* mxclearlogical: NOT IN MATLAB API - v6.5 compatible */
+ void mxClearLogical (mxArray *ptr);
+ bool mxIsChar (const mxArray *ptr);
+ bool mxIsEmpty (const mxArray *ptr);
+ bool mxIsClass (const mxArray *ptr, const char *name);
+ bool mxIsCell (const mxArray *ptr);
+ bool mxIsStruct (const mxArray *ptr);
+
+ bool mxIsInt8(const mxArray *ptr);
+ bool mxIsInt16(const mxArray *ptr);
+ bool mxIsInt32(const mxArray *ptr);
+ bool mxIsUint8(const mxArray *ptr);
+ bool mxIsUint16(const mxArray *ptr);
+ bool mxIsUint32(const mxArray *ptr);
+ /* mxIsUint64 missing */
+
+ void mxSetM(mxArray *ptr, int m);
+ void mxSetN(mxArray *ptr, int n);
+ void mxSetJc(mxArray *array_ptr, int *jc_data);
+ void mxSetIr(mxArray *array_ptr, int *ir_data);
+ void mxSetNzmax(mxArray *array_ptr, int nzmax);
+ void mxSetCell(mxArray *pa, int i, mxArray *value);
+
+ /* mexGetArray: NOT IN MATLAB API - v6.5 compatible */
+ mxArray *mexGetArray(char *name, char *workspace);
+ mxArray *mexGetVariable(const char *workspace, const char *name);
+ const mxArray *mexGetVariablePtr(const char *workspace, const char *name);
+
+ unsigned long int C2F(mxcalloc)(unsigned int *n, unsigned int *size);
+ void *mxCalloc(size_t n, size_t size);
+ void *mxMalloc(size_t nsize);
+ void mxFree(void *ptr);
+ void mxDestroyArray(mxArray *ptr);
+
+ /* mxCalloc_m : NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ void *mxCalloc_m(unsigned int n, unsigned int size);
+ /* mxMalloc_m : NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ void *mxMalloc_m(unsigned int nsize);
+ /* mxFree_m : NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ void mxFree_m(void *);
+ /* mxfreematrix: NOT IN MATLAB API - v6.0 compatible */
+ void mxFreeMatrix(mxArray *ptr);
+ void C2F(mxfreematrix)(mxArray *ptr);
+
+ void mexErrMsgTxt(const char *error_msg);
+ void C2F(mexerrmsgtxt)(char *error_msg, int len);
+ int mexEvalString(const char *name);
+ void mexWarnMsgTxt(const char *error_msg);
+ /* mexprint: NOT IN MATLAB API - SCILAB SPECIFIC ?*/
+ void mexprint(char* fmt, ...);
+
+ int mxGetFieldNumber(const mxArray *ptr, const char *string);
+ mxArray *mxGetField(const mxArray *pa, int i, const char *fieldname);
+ void mxSetFieldByNumber(mxArray *array_ptr, int index, int field_number, mxArray *value);
+ void mxSetField (mxArray *pa, int i, const char *fieldname, mxArray *value);
+
+ mxArray *mxGetFieldByNumber(const mxArray *ptr, int index, int field_number);
+ const char *mxGetFieldNameByNumber(const mxArray *array_ptr, int field_number);
+ mxLOGICAL *mxGetLogicals (const mxArray *array_ptr);
+
+ /**
+ * TODO : comment
+ * @param x
+ * @return
+ */
+ vraiptrst C2F(locptr)(void *x);
+
+ typedef enum
+ {
+ mxCELL_CLASS = 1,
+ mxSTRUCT_CLASS,
+ mxOBJECT_CLASS,
+ mxCHAR_CLASS,
+ mxSPARSE_CLASS,
+ mxDOUBLE_CLASS,
+ mxSINGLE_CLASS,
+ mxINT8_CLASS,
+ mxUINT8_CLASS,
+ mxINT16_CLASS,
+ mxUINT16_CLASS,
+ mxINT32_CLASS,
+ mxUINT32_CLASS,
+ mxUNKNOWN_CLASS = 0
+ } mxClassID;
+
+ typedef enum { mxREAL, mxCOMPLEX } mxComplexity;
+
+ mxClassID mxGetClassID(const mxArray *ptr);
+ /* mxGetName: NOT IN MATLAB API - v6.4 compatible */
+ const char *mxGetName(const mxArray *array_ptr);
+ /* mxSetName: NOT IN MATLAB API - v6.4 compatible */
+ void mxSetName( mxArray *pa, const char *s );
+ void mxSetPr(mxArray *array_ptr, double *pr);
+ void mxSetPi(mxArray *array_ptr, double *pi);
+ void mxSetData(mxArray *array_ptr, void *pr);
+ mxArray *mxCreateNumericArray(int ndim, const int *dims, mxClassID classid, mxComplexity flag);
+ mxArray *mxCreateNumericMatrix(int m, int n, mxClassID classid, int cmplx_flag);
+ int mxSetDimensions(mxArray *array_ptr, const int *dims, int ndim);
+ mxArray *mxCreateDoubleMatrix(int m, int n, mxComplexity it);
+ mxArray *mxCreateDoubleScalar(double value);
+ mxArray *mxCreateSparse(int m, int n, int nzmax, mxComplexity cmplx);
+ mxArray *mxDuplicateArray(const mxArray *ptr);
+
+ /* typedef uint16_T mxChar; */
+
+ /* typedef short int mxChar; */
+ typedef unsigned short mxChar;
+
+#define INT8_T char
+#define UINT8_T unsigned char
+#define INT16_T short
+#define UINT16_T unsigned short
+#define INT32_T int
+#define UINT32_T unsigned int
+#define REAL32_T float
+
+ typedef INT8_T int8_T;
+ typedef UINT8_T uint8_T;
+ typedef INT16_T int16_T;
+ typedef UINT16_T uint16_T;
+ typedef INT32_T int32_T;
+ typedef UINT32_T uint32_T;
+ typedef REAL32_T real32_T;
+
+ typedef int mwSize;
+ typedef int mwIndex;
+ typedef mxArray * mwPointer;
+
+#endif /* SCI_MEX */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* generic mexfunction name */
+#ifdef __cplusplus
+extern "C" {
+ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]);
+}
+#endif
diff --git a/modules/mexlib/includes/sci_gateway.h b/modules/mexlib/includes/sci_gateway.h
new file mode 100755
index 000000000..73592a7dc
--- /dev/null
+++ b/modules/mexlib/includes/sci_gateway.h
@@ -0,0 +1,35 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) DIGITEO - 2009 - Sylvestre LEDRU
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*----------------------------------------------------------------------------*/
+typedef int (*GatefuncS) (char *fname, int l);
+/*----------------------------------------------------------------------------*/
+/**
+ * This function manages the call of a native function which has been added
+ * through addinter with PutLhsVar (Compatibility Scilab 4.x and 5.1)
+ *
+ * @param fname name of the function
+ * @param F
+ * @param SharedLibraryName name of the library
+ */
+int sci_gateway(char *fname, GatefuncS F);
+/*----------------------------------------------------------------------------*/
+/**
+* This function manages the call of a native function which has been added
+* through addinter without PutLhsVar in gateway (as for internal scilab functions)
+*
+* @param fname name of the function
+* @param F
+* @param SharedLibraryName name of the library
+*/
+int sci_gateway_without_putlhsvar(char *fname, GatefuncS F);
+/*----------------------------------------------------------------------------*/
diff --git a/modules/mexlib/libmat.la b/modules/mexlib/libmat.la
new file mode 100755
index 000000000..ecd7e5e0e
--- /dev/null
+++ b/modules/mexlib/libmat.la
@@ -0,0 +1,41 @@
+# libmat.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libmat.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libmat.
+current=
+age=
+revision=
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
diff --git a/modules/mexlib/libmex.la b/modules/mexlib/libmex.la
new file mode 100755
index 000000000..ae91c09a1
--- /dev/null
+++ b/modules/mexlib/libmex.la
@@ -0,0 +1,41 @@
+# libmex.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libmex.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libmex.
+current=
+age=
+revision=
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
diff --git a/modules/mexlib/libmx.la b/modules/mexlib/libmx.la
new file mode 100755
index 000000000..4dd8e83a2
--- /dev/null
+++ b/modules/mexlib/libmx.la
@@ -0,0 +1,41 @@
+# libmx.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libmx.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libmx.
+current=
+age=
+revision=
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
diff --git a/modules/mexlib/license.txt b/modules/mexlib/license.txt
new file mode 100755
index 000000000..db1d06612
--- /dev/null
+++ b/modules/mexlib/license.txt
@@ -0,0 +1,11 @@
+Copyright:
+Copyright (c) 2008 - DIGITEO
+Copyright (c) 1989-2008 - INRIA
+Copyright (c) 1989-2007 - ENPC
+
+License:
+This module must be used under the terms of the CeCILL.
+This module file is licensed as described in the file COPYING, which
+you should have received as part of this distribution. The terms
+are also available at
+http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
diff --git a/modules/mexlib/locales/ca_ES.po b/modules/mexlib/locales/ca_ES.po
new file mode 100755
index 000000000..bc36dc1a4
--- /dev/null
+++ b/modules/mexlib/locales/ca_ES.po
@@ -0,0 +1,91 @@
+# Catalan translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-02-16 09:58+0000\n"
+"Last-Translator: oriolsbd <oriolsbd@yahoo.es>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ca\n"
+
+msgid "mexPutFull failed\n"
+msgstr "Ha fallat el mexPutFull\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "No hi ha més memòria: augmenteu el stacksize"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "No s'ha implementat la rutina mxIsSingle.\n"
+
+msgid "Variable is not logical."
+msgstr "La variable no és lògica."
+
+msgid "No more memory available: increase stacksize."
+msgstr "No hi ha més memòria: incrementeu el stacksize."
+
+msgid "Warning: "
+msgstr "Avís: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: S'ha passat un punter invàlid a la funció."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: Ha fallat l'avaluació. "
+
+msgid "GetElementSize error."
+msgstr "Error al GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "La funció mexPutArray és obsoleta, utilitzeu la mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "No s'ha implementat la rutina mxSetName!\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "No s'ha implementat la rutina mxSetData.\n"
+
+msgid "Last warning"
+msgstr "Últim avís"
+
+msgid "Warning"
+msgstr "Avís"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: El mxSetPr sobreescriurà el destí per %i bytes.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: El mxSetPi sobreescriurà el destí per %i bytes.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "No s'ha implementat la rutina mxGetName.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "No s'ha implementat la rutina mxSetDimensions.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr ""
+"La matriu de cadenes de text és invàlida (com a molt pot tenir una columna)"
+
+msgid "Column length of string matrix must agree!"
+msgstr ""
+"La longitud de columna de la matriu de cadenes de text ha de ser correcta."
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Utilitzeu mtlb_sparse(sparse( ))."
+
+msgid "Invalid input"
+msgstr "L'entrada és invàlida"
+
+msgid "No more memory"
+msgstr "No hi ha més memòria"
diff --git a/modules/mexlib/locales/cs_CZ.po b/modules/mexlib/locales/cs_CZ.po
new file mode 100755
index 000000000..5a463a845
--- /dev/null
+++ b/modules/mexlib/locales/cs_CZ.po
@@ -0,0 +1,88 @@
+# Czech translation for scilab
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-03-12 12:21+0000\n"
+"Last-Translator: Zbyněk Schwarz <Unknown>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull selhal\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Už není dostupná žádná další paměť: zvyšte velikost zásobníku"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Rutina mxIsSingle není zavedena.\n"
+
+msgid "Variable is not logical."
+msgstr "Proměnná není logická."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Není dostupná žádná další pamět: zvyšte velikost zásobníku."
+
+msgid "Warning: "
+msgstr "Varování: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: předán neplatný ukazatel zavolané funkci."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: vyhodnocení selhalo. "
+
+msgid "GetElementSize error."
+msgstr "Chyba GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "Funkce mexPutArray je zastaralá, použijte mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Rutina mxSetName není zavedena !\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Rutina mxSetData není zavedena.\n"
+
+msgid "Last warning"
+msgstr "Poslední varování"
+
+msgid "Warning"
+msgstr "Varování"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr přepisuji cíl o %i bajtů.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi přepisuji cíl o %i bajtů.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Rutina mxGetName není zavedena.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Rutina mxSetDimensions není zavedena.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Neplatný řezězec matice (nanejvýš jeden slupec!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "Délka sloupce řetězce matice musí souhlasit!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Použijte mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Neplatný vstup"
+
+msgid "No more memory"
+msgstr "Žádná další paměť"
diff --git a/modules/mexlib/locales/de_DE.po b/modules/mexlib/locales/de_DE.po
new file mode 100755
index 000000000..b675e4fff
--- /dev/null
+++ b/modules/mexlib/locales/de_DE.po
@@ -0,0 +1,90 @@
+# German translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-10-31 20:45+0000\n"
+"Last-Translator: Petersen <Unknown>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: de\n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull fehlgeschlagen\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Kein freier Speicher verfügbar: Erhöhe Stapelgröße"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Routine mxIsSingle noch nicht implementiert.\n"
+
+msgid "Variable is not logical."
+msgstr "Variable ist nicht logisch."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Kein freier Speicher verfügbar: Erhöhe Stapelgröße"
+
+msgid "Warning: "
+msgstr "Warnung: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr ""
+"mexCallSCILAB: ungültiger Zeiger zur aufgerufenen Funktion übergeben."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: Auswertung fehlgeschlagen. "
+
+msgid "GetElementSize error."
+msgstr "GetElementSize Fehler"
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "Funktion mexPutArray ist hinfällig, verwende mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Routine mxSetName noch nicht implementiert.\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Routine mxSetData noch nicht implementiert\n"
+
+msgid "Last warning"
+msgstr "Letzte Warnung"
+
+msgid "Warning"
+msgstr "Warnung"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr überschreibt Ziel durch %i Bytes.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi überschreibt Ziel durch %i Bytes.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Routine mxGetName noch nicht implementiert.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Routine mxGetDimensions noch nicht implementiert.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "ungültige Zeichenkettenmatrix (höchstens eine Spalte!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "Spaltenlänge der Zeichenkettenmatrix muß übereinstimmen!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Verwende mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Ungültiger Eingang"
+
+msgid "No more memory"
+msgstr "Kein weiterer Speicher"
diff --git a/modules/mexlib/locales/es_ES.po b/modules/mexlib/locales/es_ES.po
new file mode 100755
index 000000000..c9ebd2c69
--- /dev/null
+++ b/modules/mexlib/locales/es_ES.po
@@ -0,0 +1,91 @@
+# Spanish translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-10-28 18:09+0000\n"
+"Last-Translator: Fido <Unknown>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: es\n"
+
+msgid "mexPutFull failed\n"
+msgstr "falló mexPutFull\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "No hay mas memoria disponible: Aumente el tamaño de pila"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Rutina mxIsSingle no implementada.\n"
+
+msgid "Variable is not logical."
+msgstr "La variable no es lógica"
+
+msgid "No more memory available: increase stacksize."
+msgstr "No hay más memoria disponible: Aumente el tamaño de pila."
+
+msgid "Warning: "
+msgstr "Advertencia: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: se pasó un puntero inválido a la función llamada."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: falló la evaluación. "
+
+msgid "GetElementSize error."
+msgstr "Error GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "La función mexPutArray es obsoleta, use mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Rutina mxSetName no implementada !\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Rutina mxSetData no implementada.\n"
+
+msgid "Last warning"
+msgstr "Última advertencia"
+
+msgid "Warning"
+msgstr "Advertencia"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr sobreescribiendo destino por %i bytes.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi sobreescribiendo destino por %i bytes.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Rutina mxGetName no implementada.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Rutina mxSetDimensions no implementada.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Matriz de strings inválida (¡a lo sumo una columna!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr ""
+"¡El largo de la columna y el largo de la matriz de cadena de caracteres "
+"deben coincidir!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Use mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Entrada inválida"
+
+msgid "No more memory"
+msgstr "No hay más memoria"
diff --git a/modules/mexlib/locales/fr_FR.po b/modules/mexlib/locales/fr_FR.po
new file mode 100755
index 000000000..6fabc3fff
--- /dev/null
+++ b/modules/mexlib/locales/fr_FR.po
@@ -0,0 +1,94 @@
+# French translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-07-11 08:56+0000\n"
+"Last-Translator: ycollet <Unknown>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: fr\n"
+
+msgid "mexPutFull failed\n"
+msgstr "Échec de mexPutFull\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Plus de mémoire disponible : augmentez stacksize"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "La fonction mxIsSingle n'est pas implémentée.\n"
+
+msgid "Variable is not logical."
+msgstr "La variable n'est pas de type logical."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Plus de mémoire disponible : augmentez stacksize."
+
+msgid "Warning: "
+msgstr "Avertissement : "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB : Pointeur invalide demandé à la fonction appelée."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB : Échec de l'évaluation. "
+
+msgid "GetElementSize error."
+msgstr "Erreur GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr ""
+"La fonction mexPutArray est obsolète, utilisez mexPutVariable à la place !\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "La fonction mxSetName n'est pas implémentée !\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "La fonction mxSetData n'est pas implémentée.\n"
+
+msgid "Last warning"
+msgstr "Dernier avertissement"
+
+msgid "Warning"
+msgstr "Attention"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s : mxSetPr écrasement de la destination de %i octets.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s : mxSetPi écrasement de la destination de %i octets.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "La fonction mxGetName n'est pas implémentée.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "La fonction mxSetDimensions n'est pas implémentée.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr ""
+"Matrice de chaîne de caractères invalide (au moins une colonne est "
+"nécessaire)"
+
+msgid "Column length of string matrix must agree!"
+msgstr ""
+"La longueur des colonnes de la matrice de chaîne de caractères doit "
+"correspondre !"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Utilisez mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Entrée invalide"
+
+msgid "No more memory"
+msgstr "Plus de mémoire disponible"
diff --git a/modules/mexlib/locales/it_IT.po b/modules/mexlib/locales/it_IT.po
new file mode 100755
index 000000000..4bcd50182
--- /dev/null
+++ b/modules/mexlib/locales/it_IT.po
@@ -0,0 +1,92 @@
+# Italian translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-10-11 15:12+0000\n"
+"Last-Translator: Carml <mighty.carml@gmail.com>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: it\n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull fallito\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Non c'è più memoria disponibile: incrementare stacksize"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "La routine mxlsSingle non è sviluppata.\n"
+
+msgid "Variable is not logical."
+msgstr "La variabile non è logica."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Non c'è più memoria disponibile: incrementare stacksize"
+
+msgid "Warning: "
+msgstr "Attenzione: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr ""
+"mexCallSCILAB: è stato passato un puntatore non valido alla funzione "
+"chiamata."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: valutazione fallita. "
+
+msgid "GetElementSize error."
+msgstr "Errore di GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "La funzione mexPutArray è obsoleta, usare mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "La routine mxSetName non è sviluppata !\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "La routine mxSetData non è sviluppata.\n"
+
+msgid "Last warning"
+msgstr "Ultimo avviso"
+
+msgid "Warning"
+msgstr "Attenzione"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr sta sovrascrivendo la destinazione di %i byte.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi sta sovrascrivendo la destinazione di %i byte.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "La routine mxGetName non è sviluppata.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "La routine mxSetDimensions non è sviluppata.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Matrice di stringhe non valida (serve almeno una colonna!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr ""
+"La lunghezza delle colonne della matrice di stringhe deve concordare!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Usare mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Input non valido"
+
+msgid "No more memory"
+msgstr "Memoria esaurita"
diff --git a/modules/mexlib/locales/ja_JP.po b/modules/mexlib/locales/ja_JP.po
new file mode 100755
index 000000000..65e98111a
--- /dev/null
+++ b/modules/mexlib/locales/ja_JP.po
@@ -0,0 +1,114 @@
+# Japanese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-08-25 12:54+0000\n"
+"Last-Translator: Rui Hirokawa <Unknown>\n"
+"Language-Team: Japanese <z-saito@guitar.ocn.ne.jp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"X-Poedit-Country: Japan\n"
+"Language: ja\n"
+"X-Poedit-Language: Japanese\n"
+
+# File: includes/mex.h, line: 80
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull に失敗しました\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "メモリが不足しています: stacksize を増やしてください"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "mxIsSingle ルーチンは実装されていません.\n"
+
+msgid "Variable is not logical."
+msgstr "変数が logical ではありません."
+
+msgid "No more memory available: increase stacksize."
+msgstr "メモリが不足しています: stacksize を増やしてください."
+
+#
+# File: src/c/mexlib.c, line: 1964
+msgid "Warning: "
+msgstr "警告: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: コールされた関数に不正なポインタが渡されました."
+
+#
+# File: src/c/mexlib.c, line: 1998
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: 評価は失敗しました。 "
+
+#
+# File: src/c/mexlib.c, line: 2092
+msgid "GetElementSize error."
+msgstr "GetElementSize エラー。"
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "mexPutArray関数は廃止されました, mexPutVariableを使用してください!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "mxSetName ルーチンは実装されていません.\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "mxSetData ルーチンは実装されていません.\n"
+
+#
+# File: src/c/mexlib.c, line: 2252
+# File: src/c/mexlib.c, line: 2263
+# File: src/c/mexlib.c, line: 2287
+# File: src/c/mexlib.c, line: 2298
+msgid "Last warning"
+msgstr "最後の警告"
+
+#
+# File: src/c/mexlib.c, line: 2252
+# File: src/c/mexlib.c, line: 2263
+# File: src/c/mexlib.c, line: 2287
+# File: src/c/mexlib.c, line: 2298
+msgid "Warning"
+msgstr "警告"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr は出力先を %i バイト上書きしています.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPiは出力先を %i バイト上書きしています.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "mxGetNameルーチンは実装されていません.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "mxSetDimensions ルーチンは実装されていません.\n"
+
+#
+# File: src/c/mexlib.c, line: 2432
+msgid "Invalid string matrix (at most one column!)"
+msgstr "無効な文字列行列(最大1列です!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "文字列行列の列の長さを揃えてください!"
+
+#
+# File: src/c/mexlib.c, line: 2444
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "mtlb_sparse(sparse( )) を使ってください!"
+
+#
+# File: src/c/mexlib.c, line: 2455
+msgid "Invalid input"
+msgstr "入力間違いです"
+
+msgid "No more memory"
+msgstr "メモリが不足しています"
diff --git a/modules/mexlib/locales/mexlib.pot b/modules/mexlib/locales/mexlib.pot
new file mode 100755
index 000000000..87ffeaddb
--- /dev/null
+++ b/modules/mexlib/locales/mexlib.pot
@@ -0,0 +1,140 @@
+# Localization of the module mexlib
+# Please see in SCI/tools/localization for localization management
+# Copyright (C) 2007-2008 - INRIA
+# Copyright (C) 2008-2011 - DIGITEO
+# Copyright (C) 2012-2014 - Scilab-Enterprises
+# This file is distributed under the same license as the Scilab package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n"
+"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Revision-Date: 2015-03-27 13:54+0100\n"
+
+# File: includes/mex.h, line: 87
+msgid "mexPutFull failed\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 465
+msgid "No more memory available: increase stacksize"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 953
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 1019
+msgid "Variable is not logical."
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 1092
+msgid "No more memory available: increase stacksize."
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2409
+msgid "Warning: "
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2431
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2447
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2551
+msgid "GetElementSize error."
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2700
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2713
+msgid "Routine mxSetName not implemented !\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2719
+msgid "Routine mxSetData not implemented.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2744
+# File: src/c/mexlib.c, line: 2758
+# File: src/c/mexlib.c, line: 2786
+# File: src/c/mexlib.c, line: 2800
+msgid "Last warning"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2744
+# File: src/c/mexlib.c, line: 2758
+# File: src/c/mexlib.c, line: 2786
+# File: src/c/mexlib.c, line: 2800
+msgid "Warning"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2759
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2801
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2809
+msgid "Routine mxGetName not implemented.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2816
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2958
+msgid "Invalid string matrix (at most one column!)"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2968
+msgid "Column length of string matrix must agree!"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2974
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 2985
+msgid "Invalid input"
+msgstr ""
+
+#
+# File: src/c/mexlib.c, line: 3275
+msgid "No more memory"
+msgstr ""
diff --git a/modules/mexlib/locales/pl_PL.po b/modules/mexlib/locales/pl_PL.po
new file mode 100755
index 000000000..ec97fddb0
--- /dev/null
+++ b/modules/mexlib/locales/pl_PL.po
@@ -0,0 +1,90 @@
+# Polish translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-07-07 11:22+0000\n"
+"Last-Translator: I.Rokach <Unknown>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pl\n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull nie powiodło się.\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Nie ma więcej pamięci: zwiększ rozmiar stosu"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Procedura mxIsSingle nie zaimplementowana.\n"
+
+msgid "Variable is not logical."
+msgstr "Zmienna nie jest logiczną."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Zabrakło pamięci: zwiększ rozmiar stosu"
+
+msgid "Warning: "
+msgstr "Ostrzeżenie: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr ""
+"mexCallSCILAB: nieprawidłowy wskaźnik przekazany do wywołanej funkcji."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: błąd obliczeń. "
+
+msgid "GetElementSize error."
+msgstr "Błąd GetElementSize ."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "Funkcja mexPutArray jest przestarzała, użyj mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Procedura mxSetName nie zaimplementowana.\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Procedura mxSetData nie zaimplementowana.\n"
+
+msgid "Last warning"
+msgstr "Ostatnie ostrzeżenie"
+
+msgid "Warning"
+msgstr "Ostrzeżenie"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxUstawPr nadpisuje cel o %i bajtów.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxUstawPi nadpisuje cel o %i bajtów.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Procedura mxGetName nie zaimplementowana.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Procedura mxSetDimensions nie zaimplementowana.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Nieprawidłowa macierz łańcuchów (najwyżej jedna kolumna!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "Długość kolumn macierzy łańcuchów musi być zgodna"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Użyj mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Niepoprawne dane wejściowe"
+
+msgid "No more memory"
+msgstr "Brak pamięci"
diff --git a/modules/mexlib/locales/pt_BR.po b/modules/mexlib/locales/pt_BR.po
new file mode 100755
index 000000000..0cda37da6
--- /dev/null
+++ b/modules/mexlib/locales/pt_BR.po
@@ -0,0 +1,89 @@
+# Brazilian Portuguese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-07-06 19:11+0000\n"
+"Last-Translator: Daniel de Souza Grilo <soporter@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pt_BR\n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull falhou\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Memória esgotada: aumente o tamanho da pilha"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "A rotina mxIsSingle não foi implementada.\n"
+
+msgid "Variable is not logical."
+msgstr "A variável não é lógica"
+
+msgid "No more memory available: increase stacksize."
+msgstr "Memória esgotada: aumente o tamanho da pilha"
+
+msgid "Warning: "
+msgstr "Aviso: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: ponteiro inválido passado à função chamada."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: a avaliação falhou. "
+
+msgid "GetElementSize error."
+msgstr "Erro de GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "A função mexPutArray está obsoleta, utilize mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "A rotina mxSetName não foi implementada!\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "A rotina mxSetData não foi implementada.\n"
+
+msgid "Last warning"
+msgstr "Último aviso"
+
+msgid "Warning"
+msgstr "Aviso"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: destino de escrita de mxSetPr por %i bytes.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: destino de escrita de mxSetPi por %i bytes\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "A rotina mxGetName não foi implementada.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "A rotina mxSetDimensions não foi implementada.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Matriz de strings inválida (no máximo uma coluna!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "O comprimento de coluna da matriz de strings deve concordar!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Use mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Entrada inválida"
+
+msgid "No more memory"
+msgstr "Memória esgotada"
diff --git a/modules/mexlib/locales/ru_RU.po b/modules/mexlib/locales/ru_RU.po
new file mode 100755
index 000000000..c2de80502
--- /dev/null
+++ b/modules/mexlib/locales/ru_RU.po
@@ -0,0 +1,90 @@
+# Russian translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-11-07 20:10+0000\n"
+"Last-Translator: kkirill <Unknown>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ru\n"
+
+msgid "mexPutFull failed\n"
+msgstr "Сбой mexPutFull\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Не осталось доступной памяти: увеличьте размер стека (stacksize)"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Процедура mxIsSingle не реализована.\n"
+
+msgid "Variable is not logical."
+msgstr "Переменная не является логической."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Не осталось доступной памяти: увеличьте размер стека (stacksize)"
+
+msgid "Warning: "
+msgstr "Внимание: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr ""
+"mexCallSCILAB: недействительный указатель передаётся вызываемой функции."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: сбой вычисления. "
+
+msgid "GetElementSize error."
+msgstr "Ошибка GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "Функция mexPutArray устарела, используйте mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Процедура mxSetName не реализована!\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Процедура mxSetData не реализована!\n"
+
+msgid "Last warning"
+msgstr "Последнее предупреждение"
+
+msgid "Warning"
+msgstr "Внимание"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr перезаписывает адресат %i байтами.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi перезаписывает адресат %i байтами.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Процедура mxGetName не реализована.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Процедура mxSetDimensions не реализована.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Неверная матрица строк (ожидалось не более одного столбца!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "Количество столбцов матрицы строк должно соответствовать!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Используйте mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Неверный ввод"
+
+msgid "No more memory"
+msgstr "Не осталось доступной памяти"
diff --git a/modules/mexlib/locales/uk_UA.po b/modules/mexlib/locales/uk_UA.po
new file mode 100755
index 000000000..ad9077b5d
--- /dev/null
+++ b/modules/mexlib/locales/uk_UA.po
@@ -0,0 +1,91 @@
+# Ukrainian translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+#
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+# Yuri Chornoivan <yurchor@gmail.com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-01-15 19:58+0000\n"
+"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
+"Language-Team: Ukrainian <translation@linux.org.ua>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: uk\n"
+
+msgid "mexPutFull failed\n"
+msgstr "Помилка mexPutFull\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "Доступну пам’ять вичерпано: збільшіть розмір стека."
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "Підпрограму mxIsSingle не реалізовано.\n"
+
+msgid "Variable is not logical."
+msgstr "Змінна не належить до логічних."
+
+msgid "No more memory available: increase stacksize."
+msgstr "Доступну пам’ять вичерпано: збільшіть розмір стека."
+
+msgid "Warning: "
+msgstr "Попередження: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: викликаній функції передано некоректний вказівник."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: спроба обчислення була невдалою. "
+
+msgid "GetElementSize error."
+msgstr "Помилка GetElementSize."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr ""
+"Функція mexPutArray вважається застарілою, використовуйте mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "Підпрограму mxSetName не реалізовано!\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "Підпрограму mxSetData не реалізовано.\n"
+
+msgid "Last warning"
+msgstr "Останнє попередження"
+
+msgid "Warning"
+msgstr "Попередження"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: функція mxSetPr перезаписано призначення на %i байтів.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: функція mxSetPi перезаписано призначення на %i байтів.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "Підпрограму mxGetName не реалізовано.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "Підпрограму mxSetDimensions не реалізовано.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "Некоректна матриця з рядків (не більше одного стовпчика!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "Довжина стовпчиків матриці з рядків має бути однаковою!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "Скористайтеся mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "Некоректні дані"
+
+msgid "No more memory"
+msgstr "Доступну пам’ять вичерпано"
diff --git a/modules/mexlib/locales/zh_CN.po b/modules/mexlib/locales/zh_CN.po
new file mode 100755
index 000000000..4f2c3d83d
--- /dev/null
+++ b/modules/mexlib/locales/zh_CN.po
@@ -0,0 +1,89 @@
+# Simplified Chinese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-10-25 15:26+0000\n"
+"Last-Translator: Shiqi Yu <shiqi.yu@gmail.com>\n"
+"Language-Team: Simplified Chinese <zh_CN@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull失败\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "内存不足:请增大stacksize"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "功能mxlsSingle尚未实现。\n"
+
+msgid "Variable is not logical."
+msgstr "变量不是逻辑型的(logical)。"
+
+msgid "No more memory available: increase stacksize."
+msgstr "内存不足:请增大stacksize"
+
+msgid "Warning: "
+msgstr "警告: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB:传递给被调用函数的指针不正确。"
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB:计算失败。 "
+
+msgid "GetElementSize error."
+msgstr "GetElementSize错误."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "函数mexPutArray已被废弃,请使用mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "函数mxSetName尚未实现!\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "函数mxSetData尚未实现。\n"
+
+msgid "Last warning"
+msgstr "上一个警告"
+
+msgid "Warning"
+msgstr "警告"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s:mxSetPtr用%i个字节覆盖目标。\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s:mxSetPi用%i个字节覆盖目标。\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "函数mxGetName尚未实现。\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "函数mxSetDimensions尚未实现。\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "不正确的字符串矩阵(最多一列!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "字符串矩阵的列长度必须一致!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "使用mtlb_sparse(sparse( ))!"
+
+msgid "Invalid input"
+msgstr "无效输入"
+
+msgid "No more memory"
+msgstr "内存不足"
diff --git a/modules/mexlib/locales/zh_TW.po b/modules/mexlib/locales/zh_TW.po
new file mode 100755
index 000000000..0047bc0f8
--- /dev/null
+++ b/modules/mexlib/locales/zh_TW.po
@@ -0,0 +1,89 @@
+# Chinese (Traditional) translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2009-11-12 05:35+0000\n"
+"Last-Translator: TzuYuan Lin <Unknown>\n"
+"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+msgid "mexPutFull failed\n"
+msgstr "mexPutFull 失敗\n"
+
+msgid "No more memory available: increase stacksize"
+msgstr "已經無可用的記憶體空間: 增加堆疊空間"
+
+msgid "Routine mxIsSingle not implemented.\n"
+msgstr "mxIsSingle 常式尚未執行.\n"
+
+msgid "Variable is not logical."
+msgstr "變數不合邏輯."
+
+msgid "No more memory available: increase stacksize."
+msgstr "無可用的記憶體空間: 增加堆疊空間"
+
+msgid "Warning: "
+msgstr "警告: "
+
+msgid "mexCallSCILAB: invalid pointer passed to called function."
+msgstr "mexCallSCILAB: 傳一個無效指標至被呼叫端函數."
+
+msgid "mexCallSCILAB: evaluation failed. "
+msgstr "mexCallSCILAB: 執行失敗. "
+
+msgid "GetElementSize error."
+msgstr "GetElementSize 錯誤."
+
+msgid "Function mexPutArray is obsolete, use mexPutVariable!\n"
+msgstr "mexPutArray 是舊函數, 請使用 mexPutVariable!\n"
+
+msgid "Routine mxSetName not implemented !\n"
+msgstr "mxSetName 常式尚未執行.\n"
+
+msgid "Routine mxSetData not implemented.\n"
+msgstr "mxSetData 常式尚未執行.\n"
+
+msgid "Last warning"
+msgstr "最後警告"
+
+msgid "Warning"
+msgstr "警告"
+
+#, c-format
+msgid "%s: mxSetPr overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPr 從第 %i 位元組開始覆蓋目標值.\n"
+
+#, c-format
+msgid "%s: mxSetPi overwriting destination by %i bytes.\n"
+msgstr "%s: mxSetPi 從第 %i 位元組開始覆蓋目標值.\n"
+
+msgid "Routine mxGetName not implemented.\n"
+msgstr "mxGetName 常式尚未執行.\n"
+
+msgid "Routine mxSetDimensions not implemented.\n"
+msgstr "mxSetDimensions 常式未被執行.\n"
+
+msgid "Invalid string matrix (at most one column!)"
+msgstr "無效的字串矩陣 (最多一欄!)"
+
+msgid "Column length of string matrix must agree!"
+msgstr "字串矩陣的欄位長度必須一致!"
+
+msgid "Use mtlb_sparse(sparse( ))!"
+msgstr "使用 mtlb_sparse(sparse())!"
+
+msgid "Invalid input"
+msgstr "無效的輸入"
+
+msgid "No more memory"
+msgstr "記憶體不足"
diff --git a/modules/mexlib/macros/buildmacros.bat b/modules/mexlib/macros/buildmacros.bat
new file mode 100755
index 000000000..a73ca67f8
--- /dev/null
+++ b/modules/mexlib/macros/buildmacros.bat
@@ -0,0 +1,11 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2008 - INRIA
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit;
diff --git a/modules/mexlib/macros/buildmacros.sce b/modules/mexlib/macros/buildmacros.sce
new file mode 100755
index 000000000..045db3aa7
--- /dev/null
+++ b/modules/mexlib/macros/buildmacros.sce
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2005-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+if (isdef("genlib") == %f) then
+ exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce");
+end
+
+// genlib('mexliblib','SCI/modules/mexlib/macros',%f,%t);
diff --git a/modules/mexlib/macros/cleanmacros.bat b/modules/mexlib/macros/cleanmacros.bat
new file mode 100755
index 000000000..4ad1bbae2
--- /dev/null
+++ b/modules/mexlib/macros/cleanmacros.bat
@@ -0,0 +1,13 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2008 - INRIA
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL
diff --git a/modules/mexlib/mexlib.iss b/modules/mexlib/mexlib.iss
new file mode 100755
index 000000000..7f1811743
--- /dev/null
+++ b/modules/mexlib/mexlib.iss
@@ -0,0 +1,49 @@
+;
+; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) INRIA - Allan CORNET
+; Copyright (C) DIGITEO - 2010 - Allan CORNET
+;
+; This file must be used under the terms of the CeCILL.
+; This source file is licensed as described in the file COPYING, which
+; you should have received as part of this distribution. The terms
+; are also available at
+; http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+;
+;--------------------------------------------------------------------------------------------------------------
+; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required)
+;
+;--------------------------------------------------------------------------------------------------------------
+; mexlib module
+;--------------------------------------------------------------------------------------------------------------
+;
+#define MEXLIB "mexlib"
+;
+Source: bin\libmx.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: bin\libmx.lib; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: bin\libmex.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: bin\libmex.lib; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: bin\libmat.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: bin\libmat.lib; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#MEXLIB}\license.txt; DestDir: {app}\modules\{#MEXLIB}; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#MEXLIB}\etc\{#MEXLIB}.quit; DestDir: {app}\modules\{#MEXLIB}\etc; Components: {#COMPN_SCILAB}
+Source: modules\{#MEXLIB}\etc\{#MEXLIB}.start; DestDir: {app}\modules\{#MEXLIB}\etc; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#MEXLIB}\includes\*.h; DestDir: {app}\modules\{#MEXLIB}\includes; Components: {#COMPN_SCILAB}
+;
+;Source: modules\{#MEXLIB}\macros\lib; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+;Source: modules\{#MEXLIB}\macros\names; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+;Source: modules\{#MEXLIB}\macros\*.bin; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+;Source: modules\{#MEXLIB}\macros\*.sci; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#MEXLIB}\macros\buildmacros.sce; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#MEXLIB}\macros\buildmacros.bat; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#MEXLIB}\macros\cleanmacros.bat; DestDir: {app}\modules\{#MEXLIB}\macros; Components: {#COMPN_SCILAB}
+;
+;Source: modules\{#MEXLIB}\demos\*.*; DestDir: {app}\modules\{#MEXLIB}\demos; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#MEXLIB}\examples\*.*; DestDir: {app}\modules\{#MEXLIB}\examples; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#MEXLIB}\tests\*.*; DestDir: {app}\modules\{#MEXLIB}\tests; Flags: recursesubdirs; Components: {#COMPN_SCILAB} and {#COMPN_TESTS}
+;
+;--------------------------------------------------------------------------------------------------------------
diff --git a/modules/mexlib/src/c/.deps/.dirstamp b/modules/mexlib/src/c/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/.dirstamp
diff --git a/modules/mexlib/src/c/.deps/libmat_la-mexlib.Plo b/modules/mexlib/src/c/.deps/libmat_la-mexlib.Plo
new file mode 100755
index 000000000..bd699c72d
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmat_la-mexlib.Plo
@@ -0,0 +1,271 @@
+src/c/libmat_la-mexlib.lo: src/c/mexlib.c /usr/include/stdc-predef.h \
+ /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdio.h \
+ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/elementary_functions/includes/elementary_functions.h \
+ ../../modules/core/includes/machine.h includes/mex.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h src/c/mexlib.h \
+ ../../modules/string/includes/cvstr.h \
+ ../../modules/string/includes/dynlib_string.h \
+ ../../modules/output_stream/includes/sciprint.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/output_stream/includes/cerro.h \
+ ../../modules/output_stream/includes/erro.h \
+ ../../modules/output_stream/includes/dynlib_output_stream.h \
+ ../../modules/localization/includes/localization.h \
+ /usr/include/libintl.h /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/call_scilab/includes/call_scilab.h \
+ ../../modules/core/includes/sci_types.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/elementary_functions/includes/elementary_functions.h:
+
+../../modules/core/includes/machine.h:
+
+includes/mex.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+src/c/mexlib.h:
+
+../../modules/string/includes/cvstr.h:
+
+../../modules/string/includes/dynlib_string.h:
+
+../../modules/output_stream/includes/sciprint.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/output_stream/includes/cerro.h:
+
+../../modules/output_stream/includes/erro.h:
+
+../../modules/output_stream/includes/dynlib_output_stream.h:
+
+../../modules/localization/includes/localization.h:
+
+/usr/include/libintl.h:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/call_scilab/includes/call_scilab.h:
+
+../../modules/core/includes/sci_types.h:
diff --git a/modules/mexlib/src/c/.deps/libmat_la-sci_gateway.Plo b/modules/mexlib/src/c/.deps/libmat_la-sci_gateway.Plo
new file mode 100755
index 000000000..366d90f13
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmat_la-sci_gateway.Plo
@@ -0,0 +1,191 @@
+src/c/libmat_la-sci_gateway.lo: src/c/sci_gateway.c \
+ /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h \
+ ../../modules/core/includes/BOOL.h ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h includes/sci_gateway.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+includes/sci_gateway.h:
diff --git a/modules/mexlib/src/c/.deps/libmex_la-mexlib.Plo b/modules/mexlib/src/c/.deps/libmex_la-mexlib.Plo
new file mode 100755
index 000000000..faab37216
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmex_la-mexlib.Plo
@@ -0,0 +1,271 @@
+src/c/libmex_la-mexlib.lo: src/c/mexlib.c /usr/include/stdc-predef.h \
+ /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdio.h \
+ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/elementary_functions/includes/elementary_functions.h \
+ ../../modules/core/includes/machine.h includes/mex.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h src/c/mexlib.h \
+ ../../modules/string/includes/cvstr.h \
+ ../../modules/string/includes/dynlib_string.h \
+ ../../modules/output_stream/includes/sciprint.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/output_stream/includes/cerro.h \
+ ../../modules/output_stream/includes/erro.h \
+ ../../modules/output_stream/includes/dynlib_output_stream.h \
+ ../../modules/localization/includes/localization.h \
+ /usr/include/libintl.h /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/call_scilab/includes/call_scilab.h \
+ ../../modules/core/includes/sci_types.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/elementary_functions/includes/elementary_functions.h:
+
+../../modules/core/includes/machine.h:
+
+includes/mex.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+src/c/mexlib.h:
+
+../../modules/string/includes/cvstr.h:
+
+../../modules/string/includes/dynlib_string.h:
+
+../../modules/output_stream/includes/sciprint.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/output_stream/includes/cerro.h:
+
+../../modules/output_stream/includes/erro.h:
+
+../../modules/output_stream/includes/dynlib_output_stream.h:
+
+../../modules/localization/includes/localization.h:
+
+/usr/include/libintl.h:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/call_scilab/includes/call_scilab.h:
+
+../../modules/core/includes/sci_types.h:
diff --git a/modules/mexlib/src/c/.deps/libmex_la-sci_gateway.Plo b/modules/mexlib/src/c/.deps/libmex_la-sci_gateway.Plo
new file mode 100755
index 000000000..f011aa2ca
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmex_la-sci_gateway.Plo
@@ -0,0 +1,191 @@
+src/c/libmex_la-sci_gateway.lo: src/c/sci_gateway.c \
+ /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h \
+ ../../modules/core/includes/BOOL.h ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h includes/sci_gateway.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+includes/sci_gateway.h:
diff --git a/modules/mexlib/src/c/.deps/libmx_la-mexlib.Plo b/modules/mexlib/src/c/.deps/libmx_la-mexlib.Plo
new file mode 100755
index 000000000..467261e3d
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmx_la-mexlib.Plo
@@ -0,0 +1,271 @@
+src/c/libmx_la-mexlib.lo: src/c/mexlib.c /usr/include/stdc-predef.h \
+ /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdio.h \
+ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/elementary_functions/includes/elementary_functions.h \
+ ../../modules/core/includes/machine.h includes/mex.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h src/c/mexlib.h \
+ ../../modules/string/includes/cvstr.h \
+ ../../modules/string/includes/dynlib_string.h \
+ ../../modules/output_stream/includes/sciprint.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/output_stream/includes/cerro.h \
+ ../../modules/output_stream/includes/erro.h \
+ ../../modules/output_stream/includes/dynlib_output_stream.h \
+ ../../modules/localization/includes/localization.h \
+ /usr/include/libintl.h /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/call_scilab/includes/call_scilab.h \
+ ../../modules/core/includes/sci_types.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/elementary_functions/includes/elementary_functions.h:
+
+../../modules/core/includes/machine.h:
+
+includes/mex.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+src/c/mexlib.h:
+
+../../modules/string/includes/cvstr.h:
+
+../../modules/string/includes/dynlib_string.h:
+
+../../modules/output_stream/includes/sciprint.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/output_stream/includes/cerro.h:
+
+../../modules/output_stream/includes/erro.h:
+
+../../modules/output_stream/includes/dynlib_output_stream.h:
+
+../../modules/localization/includes/localization.h:
+
+/usr/include/libintl.h:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/call_scilab/includes/call_scilab.h:
+
+../../modules/core/includes/sci_types.h:
diff --git a/modules/mexlib/src/c/.deps/libmx_la-sci_gateway.Plo b/modules/mexlib/src/c/.deps/libmx_la-sci_gateway.Plo
new file mode 100755
index 000000000..52bb132b7
--- /dev/null
+++ b/modules/mexlib/src/c/.deps/libmx_la-sci_gateway.Plo
@@ -0,0 +1,191 @@
+src/c/libmx_la-sci_gateway.lo: src/c/sci_gateway.c \
+ /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h \
+ ../../modules/core/includes/BOOL.h ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h includes/sci_gateway.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+includes/sci_gateway.h:
diff --git a/modules/mexlib/src/c/.dirstamp b/modules/mexlib/src/c/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/mexlib/src/c/.dirstamp
diff --git a/modules/mexlib/src/c/.libs/libmat_la-mexlib.o b/modules/mexlib/src/c/.libs/libmat_la-mexlib.o
new file mode 100755
index 000000000..e9db862b3
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmat_la-mexlib.o
Binary files differ
diff --git a/modules/mexlib/src/c/.libs/libmat_la-sci_gateway.o b/modules/mexlib/src/c/.libs/libmat_la-sci_gateway.o
new file mode 100755
index 000000000..c671c90d5
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmat_la-sci_gateway.o
Binary files differ
diff --git a/modules/mexlib/src/c/.libs/libmex_la-mexlib.o b/modules/mexlib/src/c/.libs/libmex_la-mexlib.o
new file mode 100755
index 000000000..e9db862b3
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmex_la-mexlib.o
Binary files differ
diff --git a/modules/mexlib/src/c/.libs/libmex_la-sci_gateway.o b/modules/mexlib/src/c/.libs/libmex_la-sci_gateway.o
new file mode 100755
index 000000000..c671c90d5
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmex_la-sci_gateway.o
Binary files differ
diff --git a/modules/mexlib/src/c/.libs/libmx_la-mexlib.o b/modules/mexlib/src/c/.libs/libmx_la-mexlib.o
new file mode 100755
index 000000000..e9db862b3
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmx_la-mexlib.o
Binary files differ
diff --git a/modules/mexlib/src/c/.libs/libmx_la-sci_gateway.o b/modules/mexlib/src/c/.libs/libmx_la-sci_gateway.o
new file mode 100755
index 000000000..c671c90d5
--- /dev/null
+++ b/modules/mexlib/src/c/.libs/libmx_la-sci_gateway.o
Binary files differ
diff --git a/modules/mexlib/src/c/libmat_la-mexlib.lo b/modules/mexlib/src/c/libmat_la-mexlib.lo
new file mode 100755
index 000000000..405ca6fa0
--- /dev/null
+++ b/modules/mexlib/src/c/libmat_la-mexlib.lo
@@ -0,0 +1,12 @@
+# src/c/libmat_la-mexlib.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmat_la-mexlib.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/libmat_la-sci_gateway.lo b/modules/mexlib/src/c/libmat_la-sci_gateway.lo
new file mode 100755
index 000000000..1291e1ece
--- /dev/null
+++ b/modules/mexlib/src/c/libmat_la-sci_gateway.lo
@@ -0,0 +1,12 @@
+# src/c/libmat_la-sci_gateway.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmat_la-sci_gateway.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/libmex_la-mexlib.lo b/modules/mexlib/src/c/libmex_la-mexlib.lo
new file mode 100755
index 000000000..c0b0fd926
--- /dev/null
+++ b/modules/mexlib/src/c/libmex_la-mexlib.lo
@@ -0,0 +1,12 @@
+# src/c/libmex_la-mexlib.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmex_la-mexlib.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/libmex_la-sci_gateway.lo b/modules/mexlib/src/c/libmex_la-sci_gateway.lo
new file mode 100755
index 000000000..483ef2563
--- /dev/null
+++ b/modules/mexlib/src/c/libmex_la-sci_gateway.lo
@@ -0,0 +1,12 @@
+# src/c/libmex_la-sci_gateway.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmex_la-sci_gateway.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/libmx_la-mexlib.lo b/modules/mexlib/src/c/libmx_la-mexlib.lo
new file mode 100755
index 000000000..ec916eb2d
--- /dev/null
+++ b/modules/mexlib/src/c/libmx_la-mexlib.lo
@@ -0,0 +1,12 @@
+# src/c/libmx_la-mexlib.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmx_la-mexlib.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/libmx_la-sci_gateway.lo b/modules/mexlib/src/c/libmx_la-sci_gateway.lo
new file mode 100755
index 000000000..1192cbae0
--- /dev/null
+++ b/modules/mexlib/src/c/libmx_la-sci_gateway.lo
@@ -0,0 +1,12 @@
+# src/c/libmx_la-sci_gateway.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libmx_la-sci_gateway.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/mexlib/src/c/mexlib.c b/modules/mexlib/src/c/mexlib.c
new file mode 100755
index 000000000..7b93ff8f1
--- /dev/null
+++ b/modules/mexlib/src/c/mexlib.c
@@ -0,0 +1,3407 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - François DELEBECQUE
+ * Copyright (C) ENPC - Jean-Philippe CHANCELIER
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+/*------------------------------------------------------------------------
+ * mexlib library
+ *
+ * This library emulates Matlab' API functions. It is not fully tested...
+ * -Assumes that Scilab string matrices have one column, e.g.
+ * Str=["qwerty";"123456"]; here this is a 2 x 6 matrix but Scilab
+ * considers Str as a 2 x 1 matrix. ["123";"1234"] is a valid string
+ * matrix which cannot be used here.
+ * -Assumes that sparse matrices have been converted into the Matlab
+ * format. Scilab sparse matrices are stored in the transposed Matlab
+ * format. If A is a sparse Scilab matrix, it should be converted
+ * by the command A=mtlb_sparse(A) in the calling sequence of the
+ * mex function.
+ * -Structs and Cells are Scilab mlists:
+ * Struct=mlist(["st","dims","field1",...,"fieldk"],
+ * int32([d1,d2,...,dn]),
+ * list(obj1, objN),
+ * .....
+ * list(obj1, objN)) k such lists
+ * N = d1 x d2 x dn
+ * obj = Scilab variable or pointer to Scilab variable.
+ * Cell = Struct with one field called "entries" and "st" <- "ce"
+ * One dimensional structs or cells are as follows:
+ * Struct=mlist(["st","dims","field1",...,"fieldk"],
+ * int32([1,1]),
+ * obj1,...,objk)
+ *
+ * -Nd dimensional arrays are Scilab mlists (for Nd > 2):
+ * X = mlist(["hm","dims","entries"],
+ * int32([d1,d2,...,dn]),
+ * values)
+ * values = vector of doubles or int8-16-32 or char
+ --------------------------------------------------------------------------*/
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#ifdef _MSC_VER
+#include <stdlib.h> /* for exit()*/
+#endif
+
+
+#include "stack-c.h"
+#include "elementary_functions.h"
+
+#include "mex.h"
+
+#include "MALLOC.h" /* MALLOC */
+#include "mexlib.h"
+#include "cvstr.h"
+#include "sciprint.h"
+#include "cerro.h"
+#include "erro.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "call_scilab.h"
+
+static char *the_current_mex_name;
+
+extern int C2F(hmcreate)(int *lw, int *nz, int *sz, int *typv, int *iflag, int *retval);
+extern int C2F(stcreate)(int *lw1, int *ndim, int *dims, int *nfields, char **field_names, int *retval);
+extern double C2F(dlamch)(char *CMACH, unsigned long int);
+extern int arr2num( mxArray *ptr );
+extern int arr2numcst(const mxArray *ptr );
+extern int IsReference (mxArray *array_ptr);
+
+#define DOUBLEMATRIX sci_matrix
+#define INTMATRIX sci_ints
+#define STRINGMATRIX sci_strings
+#define SPARSEMATRIX sci_matlab_sparse
+#define LOGICAL sci_boolean
+#define MLIST sci_mlist
+#define AsIs '$'
+#define NDARRAY 1
+#define CELL 2
+#define STRUCT 3
+
+/* s2iadr: value adress to header adress */
+#define s2iadr(l) ((l)+(l)-1)
+/* i2sadr: header adress to value adress */
+#define i2sadr(l) ( ( (l)/2 ) +1 )
+
+vraiptrst stkptr(long int ptr_lstk)
+{
+ vraiptrst ptr = C2F(locptr)(stk((long int)(ptr_lstk)));
+ return ptr;
+}
+
+int *Header(const mxArray *ptr)
+{
+ /* Retuns an int pointer to the header of a mxArray */
+ int *header = (int *) stkptr((long int)ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ return header;
+}
+
+
+mxArray *header2ptr(int *header)
+{
+ mxArray ptr;
+ ptr = (mxArray) ((double *)header - (double *)stkptr(C2F(vstk).lstk[0]) + C2F(vstk).lstk[0]) ;
+ return (mxArray *) ptr;
+}
+
+int *listentry(int *header, int i)
+{
+ /*Usage int *header = header(array_ptr)
+ * int *headersub = listentry(header, k)
+ * then headersub[0] ... is the header of the kth object in the
+ * list array_ptr */
+ int n, *ptr;
+ n = header[1];
+ if (i <= n)
+ {
+ if ( n % 2 == 0 )
+ {
+ n++;
+ }
+ /* n = n if n odd, n=n+1 if n even (=> n is odd and ptr even !) */
+ ptr = (int *) header + 3 + n + 2 * ( header[2 + (i - 1) ] - 1);
+ return ptr;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+int theMLIST(int *header)
+{
+ /* Returns the type of the mlist (CELL, STRUCT or HYPERMATRIX) */
+ int *header1;
+ int nfplus2, l;
+ if (header[0] == MLIST && header[1] == 3 && header[6] == STRINGMATRIX)
+ {
+ if (header[14] == 12 && header[15] == 14)
+ {
+ return 2; /* CELL "c"=12 "e"=14 */
+ }
+ if (header[14] == 17 && header[15] == 22)
+ {
+ return 1; /* NDARRAY "h"=17 "m"=22 */
+ }
+ }
+ if (header[0] == MLIST)
+ {
+ header1 = (int *) listentry(header, 1);
+ nfplus2 = header1[1] * header1[2];
+ l = 5 + nfplus2;
+ /* "s"=28, "t"=29 */
+ if (header1[0] == STRINGMATRIX && header1[l] == 28 && header1[l + 1] == 29)
+ {
+ return 3; /* STRUCT */
+ }
+ }
+ return 0;
+}
+
+/*----------------------------------------------------------------
+ * DOUBLEMATRIX
+ * header[0]= DOUBLEMATRIX =1
+ * header[1]= M (number of rows)
+ * header[2]= N (number of cols)
+ * header[3]= mxComplexity (0 real, 1 complex)
+ * value[2] = real part
+ * value[2+M*N] = imaginary part (if mxComplexity =1)
+ *
+ *-----------------------------------------------------------------
+ * INTMATRIX
+ * header[0] = INTMATRIX =8
+ * header[1]= M (number of rows)
+ * header[2]= N (number of cols)
+ * header[3]= TYPE
+ * TYPE= 01 02 04 11 12 14
+ * int8 int16 int32 uint8 uint16 uint32
+ * value[2] = real part
+ *
+ *------------------------------------------------------------------
+ * SPARSEMATRIX
+ * int *header = Header(ptr);
+ * value = (double *) header;
+ * header[0]= SPARSEMATRIX =7 (converted from 8)
+ * header[1]= M (number of rows)
+ * header[2]= N (number of cols)
+ * header[3]= mxComplexity (0 real, 1 complex)
+ * header[4]=nzmax
+ * header[5]=Jc[0] ... header[5+N]=Jc[N]
+ * header[5+N+1]=Ir[0] ... header[5+N+nzmax]=Ir[nzmax];
+ * value[(5+N+nzmax)/2 + 1] = Pr[0] ...
+ * value[(5+N+nzmax)/2 + nzmax] = Pr[nzmax]
+ * value[(5+N+nzmax)/2 + 1 + nzmax+1] = Pi[0]
+ * value[(5+N+nzmax)/2 + 1 + nzmax+nzmax] = Pi[nzmax]
+ * (5 + (N+1) + nzmax)*sizeof(int) + nzmax*sizeof(double) * (1+mxComplx)
+ *
+ *-------------------------------------------------------------------
+ * STRINGMATRIX
+ * header[0]= STRINGMATRIX = 10
+ * header[1]= nrows
+ * header[2]= ncols (MUST be 1 since Matlab string matrices are seen
+ * as Scilab column matrices, all columns
+ * having the same length
+ * header[3]= 0
+ * header[4:...]= 1, ptr1, ..., ptrnrows,
+ * header[5]=header[4] + length of string in row 1
+ * header[6]=header[5] + length of string in row 2
+ * header[5+header[1]:...] = code of strings (int)
+ *
+ *--------------------------------------------------------------------
+ *
+ * MLIST
+ * <=> ndim matlab numeric or char array
+ * <=> mlist(["hm","dims","entries"],[dim1,...,dimk], vector)
+ *
+ * or
+ * <=> matlab cell array
+ * <=> mlist(["ce","dims","entries"],[dim1,...,dimk], list())
+ *
+ * header[0]= MLIST = 17
+ * header[1]= 3 (3 elements in the mlist)
+ * header[2,3,4,5]= 1,12,*,* <-> 4 pointers
+ *
+ * ->header[6:27] <-> ["hm","dims","entries"] = ...
+ * HYPERMATRIX
+ * 10,1,3,0,1,3,7,14,17,22,13,18,22,28,14,23,29,27,18,14,28,*
+ * h m d i m s e n t r i e s
+ * <-> ["ce","dims","entries"] = ...
+ * CELL
+ * 10,1,3,0,1,3,7,14,12,14,13,18,22,28,14,23,29,27,18,14,28,*
+ * c e d i m s e n t r i e s
+ *
+ * ->header[28:...] <-> [dim1, ..., dimk] = ...
+ * 1,ndims,1,0,****** (dimensions) 28=6+2*(header[3]-1)
+ * ^
+ * |
+ * header[32]
+ *
+ * ->header[6+2*(header[4]-1):...] <-> vector
+ * = 1,m,n,it,* for double array
+ * = 8,m,n,it,* for int array with n=1
+ * = 10,m,n,0,1,len+1 for char array with m=1, n=1
+ * = 15,n,... for cell array
+ * ^
+ * |
+ * header[6+2*(header[4]-1)] ( = 1, 8, 10)
+ * header[6+2*(header[4]-1)+4:...] = ***** (entries) for double or int array
+ *
+ * header[6+2*(header[4]-1)+4:6+2*(header[4]-1)+5] = [1,length+1]
+ * header[6+2*(header[4]-1)+6:...] = entries = code of string (int)
+ *
+ *----------------------------------------------------------------------
+ **************************************************************************/
+
+mxClassID mxGetClassID(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ return mxDOUBLE_CLASS;
+ case STRINGMATRIX:
+ return mxCHAR_CLASS;
+ case SPARSEMATRIX:
+ return mxSPARSE_CLASS;
+ case INTMATRIX:
+ /*[8,m,n,it] it=01 02 04 11 12 14
+ int8 int16 int32 uint8 uint16 uint32 */
+ switch (header[3])
+ {
+ case 1:
+ return mxINT8_CLASS;
+ case 2:
+ return mxINT16_CLASS;
+ case 4:
+ return mxINT32_CLASS;
+ case 11:
+ return mxUINT8_CLASS;
+ case 12:
+ return mxUINT16_CLASS;
+ case 14:
+ return mxUINT32_CLASS;
+ default:
+ return mxUNKNOWN_CLASS;
+ }
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ case CELL:
+ return mxCELL_CLASS;
+ case STRUCT:
+ return mxSTRUCT_CLASS;
+ case NDARRAY:
+ /* header[6+2*(header[4]-1)] ( = 1, 10, 8) */
+ switch (header[6 + 2 * (header[4] - 1)])
+ {
+ case DOUBLEMATRIX:
+ return mxDOUBLE_CLASS;
+ case STRINGMATRIX:
+ return mxCHAR_CLASS;
+ case INTMATRIX:
+ switch (header[6 + 2 * (header[4] - 1) + 3])
+ {
+ case 1:
+ return mxINT8_CLASS;
+ case 2:
+ return mxINT16_CLASS;
+ case 4:
+ return mxINT32_CLASS;
+ case 11:
+ return mxUINT8_CLASS;
+ case 12:
+ return mxUINT16_CLASS;
+ case 14:
+ return mxUINT32_CLASS;
+ default:
+ return mxUNKNOWN_CLASS;
+ }
+ }
+ default:
+ return mxUNKNOWN_CLASS;
+ }
+ }
+ return mxUNKNOWN_CLASS;
+}
+
+
+bool mxIsInt8(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxINT8_CLASS;
+}
+
+bool mxIsInt16(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxINT16_CLASS;
+}
+
+bool mxIsInt32(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxINT32_CLASS;
+}
+
+bool mxIsUint8(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxUINT8_CLASS;
+}
+
+bool mxIsUint16(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxUINT16_CLASS;
+}
+
+bool mxIsUint32(const mxArray *ptr)
+{
+ return mxGetClassID(ptr) == mxUINT32_CLASS;
+}
+
+double mxGetEps(void)
+{
+ double eps;
+ eps = C2F(dlamch)("e", 1L);
+ return eps;
+}
+
+
+double mxGetInf(void)
+{
+ double big;
+ big = C2F(dlamch)("o", 1L);
+ return big * big;
+}
+
+double mxGetNaN(void)
+{
+ double x, y;
+ x = mxGetInf();
+ y = x / x;
+ return y;
+}
+
+bool mxIsInf(double x)
+{
+ if (x == x + 1)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsFinite(double x)
+{
+ if (x < x + 1)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsNaN(double x)
+{
+ if ( x != x )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int *RawHeader(const mxArray *ptr)
+{
+ /* Utility function : return an int pointer to *
+ * a Scilab variable. The variable can be *
+ * a reference (header[0] < 0) */
+ int *header = (int *) stkptr((long int)ptr);
+ return header;
+}
+
+int Is1x1(const mxArray *ptr)
+{
+ int proddims, k;
+ int *header = RawHeader(ptr);
+ int *headerdims = listentry(header, 2);
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ return (int) proddims == 1;
+}
+
+
+mxArray *mxCreateData(int m)
+/* Utility fctn : create a no-header, unpopulated *
+ * mxArray of size=m*sizeof(double) */
+{
+ static int lw, lr;
+ int n;
+ int size;
+ lw = Nbvars + 1;
+ size = m - 2;
+ if (! C2F(createvar)(&lw, "d", &size, (n = 1, &n), &lr, 1L))
+ {
+ mexErrMsgTxt(_("No more memory available: increase stacksize"));
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(intersci).iwhere[lw - 1];
+}
+
+
+int mxGetNumberOfElements(const mxArray *ptr)
+{
+ int m, commonlength, k, proddims;
+ int *headerdims;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ return header[1] * header[2];
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ case NDARRAY:
+ headerdims = listentry(header, 2);
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ return proddims;
+ case CELL:
+ case STRUCT:
+ headerdims = listentry(header, 2);
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ return proddims;
+ default:
+ return 0;
+ }
+ /* return header[6+2*(header[4]-1)+1]; */
+ case STRINGMATRIX:
+ m = header[1];
+ commonlength = header[5] - header[4];
+ return m * commonlength;
+ /*case SPARSEMATRIX to be done */
+ default:
+ return 0;
+ }
+}
+
+
+double *mxGetPr(const mxArray *ptr)
+{
+ double *value;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ /* return (header[1]==0 || header[2] == 0) ? NULL : &header[4]; */
+ return (header[1] == 0 || header[2] == 0) ? NULL : (double *) &header[4];
+ case MLIST:
+ switch (header[6 + 2 * (header[4] - 1)])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ return (double *) &header[6 + 2 * (header[4] - 1) + 4];
+ case STRINGMATRIX:
+ return (double *) &header[6 + 2 * (header[4] - 1) + 6];
+ default:
+ return 0;
+ }
+ case STRINGMATRIX:
+ value = (double *) header;
+ return &value[i2sadr(5 + header[2])];
+ case SPARSEMATRIX:
+ value = (double *) header;
+ return &value[ i2sadr(5 + header[2] + header[4]) ];
+ default:
+ return 0;
+ }
+}
+
+
+
+double *mxGetPi(const mxArray *ptr)
+{
+ int debut;
+ int m, n, it;
+ /* double *value = (double *) stkptr((long int)ptr); */
+ double *value;
+ int *header = Header(ptr);
+ value = (double *) header;
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ if (header[3] == 0 || header[1] == 0 || header[2] == 0)
+ {
+ return NULL;
+ }
+ return &value[2 + header[1] * header[2]];
+ case MLIST:
+ debut = 6 + 2 * (header[4] - 1);
+ switch (header[debut])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ m = header[debut + 1];
+ n = header[debut + 2];
+ it = header[debut + 3]; /* it should be 1 */
+ if (it == 0)
+ {
+ return NULL;
+ }
+ return (double *) &header[debut + 4 + 2 * m * n];
+ default:
+ return 0;
+ }
+ case SPARSEMATRIX:
+ if (header[3] == 0)
+ {
+ return NULL;
+ }
+ return &value[ i2sadr(5 + header[2] + header[4]) + header[4]];
+ default:
+ return 0;
+ }
+}
+
+int mxGetNumberOfDimensions(const mxArray *ptr)
+{
+ int *header1;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ case SPARSEMATRIX:
+ case STRINGMATRIX:
+ return 2;
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ case NDARRAY:
+ return header[29] * header[30]; /* header[29] or header[30] = 1 */
+ case CELL:
+ case STRUCT:
+ header1 = (int *) listentry(header, 2) ;
+ return header1[1] * header1[2];
+ default:
+ return 0;
+ }
+ default:
+ return 0;
+ }
+}
+
+int *mxGetDimensions(const mxArray *ptr)
+{
+ int *header1;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ case STRINGMATRIX:
+ return &header[1];
+ case SPARSEMATRIX: /* to be done */
+ return &header[1];
+ break;
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ /* case NDARRAY return &header[32]; break; */
+ case NDARRAY:
+ case CELL:
+ case STRUCT:
+ header1 = (int *) listentry(header, 2);
+ return &header1[4];
+ default:
+ return 0;
+ }
+ }
+ return 0;
+}
+
+int mxGetM(const mxArray *ptr)
+{
+ int *header1;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ case STRINGMATRIX:
+ case SPARSEMATRIX:
+ return header[1];
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ case NDARRAY:
+ return header[32];
+ case CELL:
+ case STRUCT:
+ header1 = (int *) listentry(header, 2);
+ return header1[4];
+ default:
+ return 0;
+ }
+ default:
+ return 0;
+ }
+}
+
+void mxSetM(mxArray *ptr, int M)
+{
+ mxArray *mxNew;
+ int size;
+ int oldM;
+ int commonlength;
+ int j;
+ int *headernew;
+ double *valueold, *valuenew;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case STRINGMATRIX:
+ /* string: copy header[5+oldM] to header[5+mnew] */
+ oldM = header[1];
+ commonlength = header[5] - header[4];
+ for (j = 0; j <= M * commonlength; ++j)
+ {
+ header[5 + j + M] = header[5 + j + oldM];
+ }
+ header[1] = M;
+ break;
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ /* make ptr a reference */
+ size = 2 + M * header[2] * (header[3] + 1); /* oldN=header[2] */
+ mxNew = mxCreateData(size); /* performs Nbvars++ */
+ headernew = (int *) stkptr((long int) mxNew);
+ headernew[0] = header[0];
+ headernew[1] = M;
+ headernew[2] = header[2];
+ headernew[3] = header[3];
+ valueold = (double *) &header[4];
+ valuenew = (double *) &headernew[4];
+ memcpy(valuenew, valueold, M * header[2] * (header[3] + 1)*sizeof(double));
+ ChangeToRef(arr2num(ptr), Nbvars);
+ break;
+ default:
+ break;
+ }
+}
+
+
+int *mxGetJc(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] != SPARSEMATRIX)
+ {
+ return 0;
+ }
+ /* header[0]=7; M=header[1]; N=header[2]; it =header[3]; nzmax=header[4];
+ Jc[0]=header[5]; Jc[1]=header[6]; etc; Jc[N]=nnz; */
+ return &header[5];
+}
+
+int *mxGetIr(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ /* ... N=header[2], nzmax=header[4]; then Jc, then Ir */
+ return &header[5 + header[2] + 1];
+}
+
+void mxSetJc(mxArray *array_ptr, int *jc_data)
+{
+ int * start_of_jc;
+ int N;
+ int *header = Header(array_ptr);
+
+ start_of_jc = (int *) mxGetJc(array_ptr);
+ N = header[2];
+ memcpy(start_of_jc, jc_data, (N + 1)*sizeof(int));
+}
+
+void mxSetIr(mxArray *array_ptr, int *ir_data)
+{
+ int * start_of_ir;
+ int NZMAX;
+ int *header = Header(array_ptr);
+
+ if (ir_data == NULL)
+ {
+ return;
+ }
+ start_of_ir = (int *) mxGetIr(array_ptr);
+ NZMAX = header[4];
+ memcpy(start_of_ir, ir_data, NZMAX * sizeof(int));
+}
+
+void mxSetNzmax(mxArray *array_ptr, int nzmax)
+{
+ int isize, Mold, Nold, NZMAXold, ITold;
+ double *Prold, *Piold;
+ int *Irold, *Jcold;
+ mxArray *mxNew;
+ int *headernew;
+ int *header = Header(array_ptr);
+ Mold = header[1];
+ Nold = header[2];
+ ITold = header[3];
+ NZMAXold = header[4];
+ Jcold = mxGetJc(array_ptr);
+ Irold = mxGetIr(array_ptr);
+ Prold = mxGetPr(array_ptr);
+ isize = 5 + (Nold + 1) + nzmax + (ITold + 1) * 2 * nzmax;
+ mxNew = mxCreateData( sadr(isize)); /* performs Nbvars++ */
+ headernew = (int *) stkptr((long int) mxNew);
+ headernew[0] = header[0];
+ headernew[1] = Mold;
+ headernew[2] = Nold;
+ headernew[3] = ITold;
+ headernew[4] = nzmax;
+ memcpy( mxGetJc(mxNew), Jcold, (Nold + 1)*sizeof(int));
+ memcpy( mxGetIr(mxNew), Irold, NZMAXold * sizeof(int));
+ memcpy( mxGetPr(mxNew), Prold, NZMAXold * sizeof(double));
+ if (ITold == 1)
+ {
+ Piold = mxGetPi(array_ptr);
+ memcpy( mxGetPi(mxNew), Piold, NZMAXold * sizeof(double));
+ }
+ ChangeToRef(arr2num(array_ptr), Nbvars);
+}
+
+int mxGetN(const mxArray *ptr)
+{
+ int ret;
+ int j;
+ int *header1;
+ int numberofdim;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ case SPARSEMATRIX:
+ return header[2];
+ case STRINGMATRIX:
+ /* for strings, N=length of first (and unique, header[2]=1) column
+ (all rows have same Matlab-length) */
+ return header[5] - header[4];
+ case MLIST:
+ switch (theMLIST(header))
+ {
+ case NDARRAY:
+ case CELL:
+ case STRUCT:
+ header1 = (int *) listentry(header, 2);
+ numberofdim = header1[1] * header1[2];
+ if (numberofdim == 2)
+ {
+ return header1[5];
+ }
+ else
+ {
+ ret = header1[5];
+ }
+ for (j = 0; j < numberofdim - 2; ++j)
+ {
+ ret = ret * header1[6 + j];
+ }
+ return ret;
+ default:
+ return 0;
+ }
+ default:
+ return 0;
+ }
+}
+
+void mxSetN(mxArray *ptr, int N)
+{
+ mxArray *mxNew;
+ int i, m, new, size;
+ int *headernew;
+ double *valueold, *valuenew;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case STRINGMATRIX:
+ m = header[1];
+ /* oldN = header[5]-header[4]; */
+ for (i = 0; i < m; ++i)
+ {
+ header[5 + i] = header[4 + i] + N;
+ /* to be done: compress header[5+m] */
+ }
+ break;
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ /* make ptr a reference */
+ size = 2 + header[1] * N * (header[3] + 1); /* oldM=header[1] */
+ mxNew = mxCreateData(size);
+ headernew = (int *) stkptr((long int) mxNew);
+ headernew[0] = header[0];
+ headernew[1] = header[1];
+ headernew[2] = N;
+ headernew[3] = header[3];
+ new = Nbvars;
+ valueold = (double *) &header[4];
+ valuenew = (double *) &headernew[4];
+ memcpy(valuenew, valueold, header[1]*N * (header[3] + 1)*sizeof(double));
+ ChangeToRef(arr2num(ptr), new);
+ break;
+ case SPARSEMATRIX:
+ /* TO BE DONE */
+ break;
+ default:
+ break;
+ }
+}
+
+
+bool mxIsString(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] == STRINGMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsChar(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case STRINGMATRIX:
+ return 1;
+ case MLIST:
+ switch (header[6 + 2 * (header[4] - 1)])
+ {
+ case STRINGMATRIX:
+ return 1;
+ default:
+ return 0;
+ }
+ default:
+ return 0;
+ }
+}
+
+bool mxIsNumeric(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] != STRINGMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsDouble(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if ((header[0] == DOUBLEMATRIX) | (header[0] == SPARSEMATRIX) | ( (header[0] == MLIST) && (header[6 + 2 * (header[4] - 1)] == DOUBLEMATRIX)))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsSingle(const mxArray *ptr)
+{
+ mexPrintf(_("Routine mxIsSingle not implemented.\n"));
+ exit(1); /* TO BE DONE */
+ return 0;
+}
+
+bool mxIsEmpty(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[1]*header[2] == 0)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+bool mxIsFull(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if ( header[0] != SPARSEMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsSparse(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] == SPARSEMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsLogical(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ /* TO BE DONE ND Array */
+ if (header[0] == LOGICAL)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void mxSetLogical(mxArray *ptr)
+{
+ int *header = Header(ptr);
+ header[0] = LOGICAL;
+}
+
+void mxClearLogical(mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] != LOGICAL)
+ {
+ mexErrMsgTxt(_("Variable is not logical."));
+ }
+ header[0] = DOUBLEMATRIX;
+}
+
+bool mxIsComplex(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ return header[3];
+ case MLIST:
+ if (header[6 + 2 * (header[4] - 1)] == DOUBLEMATRIX)
+ {
+ return header[6 + 2 * (header[4] - 1) + 3];
+ }
+ default:
+ return 0;
+ }
+}
+
+double mxGetScalar(const mxArray *ptr)
+{
+ double *value;
+ int *header = Header(ptr);
+ value = (double *) header;
+ if (header[0] == DOUBLEMATRIX)
+ {
+ return value[2];
+ }
+ else if (header[0] == SPARSEMATRIX)
+ {
+ /* nnz = header[4]; N = header[2]; */
+ return value[ i2sadr(5 + header[2] + header[4]) ];
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void *mxGetData(const mxArray *ptr)
+{
+ return mxGetPr(ptr);
+}
+
+void *mxGetImagData(const mxArray *ptr)
+{
+ return mxGetPi(ptr);
+}
+
+void mexErrMsgTxt(const char *error_msg)
+{
+ cerro((char *)error_msg);
+ errjump();
+}
+
+void mxAssert(int expr, char *error_message)
+{
+ if (!expr)
+ {
+ mexErrMsgTxt(error_message);
+ }
+}
+
+mxArray *mxCreateDoubleMatrix (int m, int n, mxComplexity it)
+{
+ static int lw, lr, lc;
+ int k;
+ lw = Nbvars + 1;
+ if (! C2F(createcvar)(&lw, "d", (int *) &it, &m, &n, &lr, &lc, 1L))
+ {
+ mexErrMsgTxt(_("No more memory available: increase stacksize."));
+ }
+ for ( k = 0; k < m * n * (it + 1); k++ )
+ {
+ *stk(lr + k) = 0;
+ }
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1]; /* C2F(intersci).iwhere[lw-1]); */
+}
+
+mxArray *mxCreateDoubleScalar(double value)
+{
+ mxArray *pa;
+ pa = mxCreateDoubleMatrix(1, 1, mxREAL);
+ *mxGetPr(pa) = value;
+ return (mxArray *) pa;
+}
+
+bool mxIsClass(const mxArray *ptr, const char *name)
+{
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ if ( strcmp(name, "double") == 0)
+ {
+ return 1;
+ }
+ break;
+ case MLIST:
+ switch (header[6 + 2 * (header[4] - 1)])
+ {
+ case DOUBLEMATRIX:
+ if ( strcmp(name, "double") == 0)
+ {
+ return 1;
+ }
+ break;
+ case INTMATRIX:
+ if ( strcmp(name, "double") == 0)
+ {
+ return 1;
+ }
+ break;
+ }
+ break;
+ case STRINGMATRIX:
+ if ( strcmp(name, "char") == 0)
+ {
+ return 1;
+ }
+ break;
+ case SPARSEMATRIX:
+ if ( strcmp(name, "sparse") == 0)
+ {
+ return 1;
+ }
+ break;
+ default:
+ return 0;
+ }
+ return 0;
+}
+
+mxArray *mxCreateStructArray(int ndim, const int *dims, int nfields, const char **field_names)
+{
+ static int lw, lw1;
+ int retval;
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ C2F(stcreate)(&lw1, &ndim, (int *) dims, &nfields, (char **) field_names, &retval);
+ if ( !retval)
+ {
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1 ];
+}
+
+mxArray *mxCreateStructMatrix(int m, int n, int nfields, const char **field_names)
+{
+ static int lw, lw1;
+ int ndim;
+ int retval;
+ int dims[2];
+
+ dims[0] = m;
+ dims[1] = n;
+
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ C2F(stcreate)(&lw1, (ndim = 2, &ndim), dims, &nfields, (char **) field_names, &retval);
+ if ( !retval)
+ {
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1 ];
+}
+
+void mxSetFieldByNumber(mxArray *array_ptr, int lindex, int field_number, mxArray *value)
+{
+ int pointed, point_ed;
+ int proddims, k;
+ int is1x1;
+ int *headerobj;
+ int *headervalue;
+ int *header = Header(array_ptr);
+ int *headerdims = listentry(header, 2);
+
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ is1x1 = (int) proddims == 1;
+
+ if (is1x1)
+ {
+ headerobj = listentry( header, field_number + 3);
+ }
+ else
+ {
+ headerobj = listentry( listentry(header, field_number + 3) , lindex + 1);
+ }
+ if (IsReference(value))
+ {
+ headervalue = RawHeader(value);
+ headerobj[0] = headervalue[0];
+ headerobj[1] = headervalue[1];
+ headerobj[2] = headervalue[2];
+ headerobj[3] = headervalue[3];
+ }
+ else
+ {
+ pointed = arr2num(value);
+ point_ed = Top - Rhs + pointed;
+ headerobj[0] = - *istk( iadr(*Lstk( point_ed )) ); /* reference : 1st entry (type) is opposite */
+ headerobj[1] = *Lstk(point_ed); /* pointed adress */
+ headerobj[2] = pointed; /* pointed variable */
+ headerobj[3] = *Lstk(point_ed + 1) - *Lstk(point_ed); /* size of pointed variable */
+ }
+}
+
+void mxSetField(mxArray *array_ptr, int lindex, const char *field_name, mxArray *value)
+{
+ int field_num;
+ field_num = mxGetFieldNumber(array_ptr, field_name);
+ mxSetFieldByNumber(array_ptr, lindex, field_num, value);
+}
+
+const char *mxGetFieldNameByNumber(const mxArray *array_ptr, int field_number)
+{
+ int k, longueur, istart, nf, job;
+ int *headerstr;
+ int *header = Header(array_ptr);
+ char *str = (char *) mxMalloc_m(25 * sizeof(char));
+ headerstr = listentry(header, 1);
+ nf = headerstr[1] * headerstr[2] - 2; /* number of fields */
+ k = field_number;
+ if (k > nf)
+ {
+ return (char *) 0; /* ? */
+ }
+ longueur = Min(headerstr[7 + k] - headerstr[6 + k], nlgh); /* size of kth fieldname */
+ istart = 6 + nf + headerstr[6 + k]; /* start of kth fieldname code */
+ C2F(cvstr)(&longueur, &headerstr[istart], str, (job = 1, &job), longueur);
+ str[longueur] = '\0';
+ return str;
+}
+
+/*
+mxCHAR *mxGetChars(mxArray *array_ptr)
+{
+ mexPrintf("%Not yet implemented\n");
+} */
+
+
+int IsReference(mxArray *array_ptr)
+{
+ if ((int) RawHeader(array_ptr)[0] < 0)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+mxArray *mxCreateNumericArray(int ndim, const int *dims, mxClassID CLASS, mxComplexity cmplx)
+{
+ static int lw, lw1;
+ int retval;
+ if (ndim < 3)
+ {
+ return mxCreateNumericMatrix(dims[0], dims[1], CLASS, cmplx);
+ }
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ C2F(hmcreate)(&lw1, &ndim, (int *) dims, (int *) &CLASS, (int *) &cmplx, &retval);
+ if ( !retval)
+ {
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1 ];
+}
+
+mxArray *mxCreateNumericMatrix(int m, int n, mxClassID CLASS, int cmplx)
+{
+ static int lw, lw1;
+ int it;
+ int lr;
+ switch (CLASS)
+ {
+ case mxDOUBLE_CLASS:
+ return mxCreateDoubleMatrix(m, n, (mxComplexity)cmplx);
+ case mxINT8_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 1, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ case mxINT16_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 2, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ case mxINT32_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 4, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ case mxUINT8_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 11, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ case mxUINT16_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 12, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ case mxUINT32_CLASS:
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ if (! C2F(creimat)(" ", &lw1, (it = 14, &it), &m, &n, &lr, 4L))
+ {
+ return (mxArray *) 0;
+ }
+ break;
+ default:
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1 ];
+}
+
+
+mxArray *mxCreateCharArray(int ndim, const int *dims)
+{
+ static int lw, lw1, CLASS, cmplx;
+ int retval;
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ C2F(hmcreate)(&lw1, &ndim, (int *) dims, (CLASS = 11, &CLASS), (cmplx = 0, &cmplx), &retval);
+ if ( !retval)
+ {
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1]; /* C2F(intersci).iwhere[lw-1]) */
+}
+
+mxArray *mxCreateCellArray(int ndim, const int *dims)
+{
+ static int lw, lw1;
+ int retval;
+ int *header;
+ int nfields;
+ char *field_names[] = {"entries"};
+ Nbvars++;
+ lw = Nbvars;
+ lw1 = lw + Top - Rhs;
+ C2F(stcreate)(&lw1, &ndim, (int *) dims, (nfields = 1, &nfields), field_names , &retval);
+ if ( !retval)
+ {
+ return (mxArray *) 0;
+ }
+ header = (int *) stk(C2F(vstk).lstk[lw + Top - Rhs - 1 ]);
+ header[14] = 12;
+ header[15] = 14; /* "st" <-- "ce" */
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1 ];
+}
+
+mxArray *mxCreateCellMatrix(int nrows, int ncols)
+{
+ int two = 2;
+ int dims[2];
+ dims[0] = nrows;
+ dims[1] = ncols;
+ return mxCreateCellArray(two, dims);
+}
+
+mxArray *mxGetCell(const mxArray *ptr, int lindex)
+{
+ int kk, lw, isize;
+ int proddims, k;
+ int is1x1;
+ int *headerlist, *headerobj, *headerobjcopy;
+ int *header = Header(ptr);
+ int *headerdims = listentry(header, 2);
+
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ is1x1 = (int) proddims == 1;
+
+ if (is1x1)
+ {
+ headerobj = listentry( header, lindex + 1);
+ isize = header[5] - header[4];
+ }
+ else
+ {
+ headerlist = listentry(header, 3);
+ headerobj = listentry(headerlist, lindex + 1);
+ isize = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+ Nbvars++;
+ lw = Nbvars;
+ CreateData(lw, isize * sizeof(double));
+ headerobjcopy = GetData(lw);
+ for (kk = 0; kk < 2 * isize; ++kk)
+ {
+ headerobjcopy[kk] = headerobj[kk];
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ C2F(intersci).iwhere[lw - 1] = C2F(vstk).lstk[lw + Top - Rhs - 1];
+ return (mxArray *) C2F(intersci).iwhere[lw - 1];
+}
+
+int mxGetFieldNumber(const mxArray *ptr, const char *string)
+{
+ int nf, longueur, istart, k, ilocal, retval;
+ int *headerstr;
+ static char str[nlgh];
+ int *header = Header(ptr);
+ headerstr = listentry(header, 1);
+ nf = headerstr[1] * headerstr[2] - 2; /* number of fields */
+ retval = -1;
+ for (k = 0; k < nf; k++)
+ {
+ longueur = Min(headerstr[7 + k] - headerstr[6 + k], nlgh); /* size of kth fieldname */
+ istart = 6 + nf + headerstr[6 + k]; /* start of kth fieldname code */
+ /* istart=8+headerstr[4+nf+k]; */
+ C2F(cvstr)(&longueur, &headerstr[istart], str, (ilocal = 1, &ilocal), longueur);
+ str[longueur] = '\0';
+ if (strcmp(string, str) == 0)
+ {
+ retval = k;
+ break;
+ }
+ }
+ return retval;
+}
+
+mxArray *mxGetField(const mxArray *ptr, int lindex, const char *string)
+{
+ int kk, lw, isize, fieldnum;
+ int proddims, k;
+ int is1x1;
+ int *headerlist, *headerobj, *headerobjcopy;
+ int *header = Header(ptr);
+ int *headerdims = listentry(header, 2);
+
+ fieldnum = mxGetFieldNumber(ptr, string);
+ if (fieldnum == -1)
+ {
+ return (mxArray *) 0;
+ }
+
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ is1x1 = (int) proddims == 1;
+
+ if (is1x1)
+ {
+ headerobj = listentry( header, 3 + fieldnum);
+ isize = header[5 + fieldnum] - header[4 + fieldnum];
+ }
+ else
+ {
+ headerlist = listentry(header, 3 + fieldnum);
+ headerobj = listentry(headerlist, lindex + 1);
+ isize = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+
+ Nbvars++;
+ lw = Nbvars;
+ CreateData(lw, isize * sizeof(double));
+ headerobjcopy = GetData(lw);
+ for (kk = 0; kk < 2 * isize; ++kk)
+ {
+ headerobjcopy[kk] = headerobj[kk];
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ C2F(intersci).iwhere[lw - 1] = C2F(vstk).lstk[lw + Top - Rhs - 1];
+ return (mxArray *) C2F(intersci).iwhere[lw - 1];
+}
+
+mxArray *mxGetFieldByNumber(const mxArray *ptr, int lindex, int field_number)
+{
+ int kk, lw, isize, fieldnum;
+ int proddims, k;
+ int is1x1;
+ int maxfieldnum, maxindex;
+ int *headerlist, *headerobj, *headerobjcopy;
+ int *header = Header(ptr);
+ int *headerdims = listentry(header, 2);
+
+ fieldnum = field_number;
+ maxfieldnum = mxGetNumberOfFields(ptr) - 1;
+ maxindex = mxGetNumberOfElements(ptr) - 1;
+ if (maxfieldnum < fieldnum)
+ {
+ return (mxArray *) NULL;
+ }
+ if (maxindex < lindex)
+ {
+ return (mxArray *) NULL;
+ }
+
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ is1x1 = (int) proddims == 1;
+
+ if (is1x1)
+ {
+ headerobj = listentry( header, 3 + fieldnum);
+ isize = header[5 + fieldnum] - header[4 + fieldnum];
+ }
+ else
+ {
+ headerlist = listentry(header, 3 + fieldnum);
+ headerobj = listentry(headerlist, lindex + 1);
+ isize = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+ if (isize == 2)
+ {
+ return (mxArray *) NULL; /* empty field */
+ }
+ Nbvars++;
+ lw = Nbvars;
+ CreateData(lw, isize * sizeof(double));
+ headerobjcopy = GetData(lw);
+ for (kk = 0; kk < 2 * isize; ++kk)
+ {
+ headerobjcopy[kk] = headerobj[kk];
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ C2F(intersci).iwhere[lw - 1] = C2F(vstk).lstk[lw + Top - Rhs - 1];
+ return (mxArray *) C2F(intersci).iwhere[lw - 1];
+}
+
+int mxGetNumberOfFields(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ if (header[0] == MLIST)
+ {
+ return header[1] - 2;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+/*----------------------------------------------------
+ * mxCalloc is supposed to initialize data to 0
+ * but what does it means since size can be anythink
+ * we initialize to zero for double and int data types
+ *----------------------------------------------------*/
+
+
+void *mxRealloc(void *ptr, size_t nsize)
+{
+ int m;
+ vraiptrst lrd = (vraiptrst)NULL;
+ m = (int) ((nsize) / sizeof(double) + 1);
+ mxFree((void *) lrd);
+ if (! C2F(createstkptr)( &m, &lrd))
+ {
+ return 0;
+ }
+ memcpy((void *) lrd, ptr, nsize);
+ return (void *) lrd;
+}
+
+void *mxCalloc(size_t n, size_t size)
+{
+ int m;
+ vraiptrst lrd;
+ static int one = 1;
+ int N;
+ static double zero = 0.0;
+ int nsize;
+ nsize = (int)(n * size);
+ m = nsize / sizeof(double) + 1;
+ if (! C2F(createstkptr)( &m, &lrd))
+ {
+ return 0;
+ }
+ if ( size == sizeof(double))
+ {
+ N = (int) n;
+ C2F(dset)(&N, &zero, (double *) lrd, &one);
+ }
+ else
+ {
+ int i;
+ for (i = 0; i < nsize ; i++)
+ {
+ ((char *) lrd)[i] = 0;
+ }
+ }
+ return (void *) lrd;
+}
+
+/* void *mxMalloc(unsigned int nsize) */
+void *mxMalloc(size_t nsize)
+{
+ int m;
+ vraiptrst lrd;
+ m = (int)((nsize) / sizeof(double) + 1);
+ if (! C2F(createstkptr)( &m, &lrd))
+ {
+ return 0;
+ }
+ return (void *) lrd;
+}
+
+/* a version which make use of malloc */
+
+typedef struct _rec_calloc
+{
+ void *adr;
+ int keep; /* 0: free 1: allocated 2: allocated and must be preserved */
+} rec_calloc;
+
+#define rec_size 512
+static rec_calloc calloc_table[rec_size] = {{0, 0}};
+
+
+void *mxCalloc_m(unsigned int n, unsigned int size)
+{
+ void *loc = CALLOC(n, size);
+ if ( loc != NULL)
+ {
+ int i;
+ for ( i = 0 ; i < rec_size ; i++)
+ {
+ if (calloc_table[i].keep == 0 )
+ {
+ /* sciprint("calloc installed at position %d\n",i); */
+ calloc_table[i].adr = loc;
+ calloc_table[i].keep = 1;
+ return loc ;
+ }
+ }
+ FREE(loc);
+ return NULL;
+ }
+ return NULL;
+}
+
+void *mxMalloc_m(unsigned int n)
+{
+ void *loc = MALLOC(n);
+ if ( loc != NULL)
+ {
+ int i;
+ for ( i = 0 ; i < rec_size ; i++)
+ {
+ if (calloc_table[i].keep == 0 )
+ {
+ /* sciprint("malloc installed at position %d\n",i); */
+ calloc_table[i].adr = loc;
+ calloc_table[i].keep = 1;
+ return loc ;
+ }
+ }
+ FREE(loc);
+ return NULL;
+ }
+ return NULL;
+}
+
+
+void mexMakeMemoryPersistent(void *ptr)
+{
+ int i;
+ for ( i = 0 ; i < rec_size ; i++)
+ {
+ if (calloc_table[i].adr == ptr)
+ {
+ if (calloc_table[i].keep == 1 )
+ {
+ calloc_table[i].keep = 2;
+ }
+ }
+ }
+}
+
+/* free : explicit free of a mxCalloc_m allocated space
+ * except if space is protected
+ */
+
+void mxFree_m(void *ptr)
+{
+ int i;
+
+ for ( i = 0 ; i < rec_size ; i++)
+ {
+ if (calloc_table[i].adr == ptr)
+ {
+ /* allocated and preserved */
+ if (calloc_table[i].keep != 0 )
+ {
+ /* sciprint("mxFree position %d\n",i); */
+ FREE(ptr);
+ calloc_table[i].keep = 0;
+ calloc_table[i].adr = NULL;
+ return;
+ }
+ }
+ }
+}
+
+/* free : explicit free of all mxCalloc_m allocated space
+ * except if space is protected
+ */
+
+static void mxFree_m_all()
+{
+ int i;
+ for ( i = 0 ; i < rec_size ; i++)
+ {
+ if (calloc_table[i].keep == 1 )
+ {
+ /* sciprint("mxFree all position %d\n",i); */
+ FREE(calloc_table[i].adr);
+ calloc_table[i].keep = 0;
+ calloc_table[i].adr = NULL;
+ }
+ }
+}
+
+
+/*----------------------------------------------------
+ * mxCalloc is supposed to initialize data to 0
+ * but what does it means since size can be anythink
+ * we initialize to zero for double and int data types
+ *----------------------------------------------------*/
+
+bool mxIsCell(const mxArray *ptr)
+{
+ int *header1;
+ int l;
+ int *header = Header(ptr);
+
+ /* mlist(["ce","dims","entries"],[d1,..,dk],list(...)) */
+ if (header[0] == MLIST)
+ {
+ header1 = (int *) listentry(header, 1);
+ l = 8;
+ /* "c"=12, "e"=14 */
+ if (header1[0] == STRINGMATRIX && header1[l] == 12 && header1[l + 1] == 14)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+bool mxIsStruct(const mxArray *ptr)
+{
+ int *header1;
+ int nfplus2, l;
+ int *header = Header(ptr);
+ /* mlist(["st","dims","field1",...,"fieldp"],[d1,..,dk],list1(...),listp(...)) */
+ if (header[0] == MLIST)
+ {
+ header1 = (int *) listentry(header, 1);
+ nfplus2 = header1[1] * header1[2];
+ l = 5 + nfplus2;
+ /* "s"=28, "t"=29 */
+ if (header1[0] == STRINGMATRIX && header1[l] == 28 && header1[l + 1] == 29)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int IsstOrce(mxArray *ptr)
+{
+ int *header1;
+ int l;
+ int nfplus2;
+ int *header = Header(ptr);
+ if (header[0] == MLIST)
+ {
+ header1 = (int *) listentry(header, 1);
+ nfplus2 = header1[1] * header1[2];
+ l = 5 + nfplus2;
+ if (header1[0] == STRINGMATRIX)
+ {
+ if (header1[l] == 12 && header1[l + 1] == 14)
+ {
+ return 1; /* "ce" */
+ }
+ }
+ if (header1[l] == 28 && header1[l + 1] == 29)
+ {
+ return 1; /* "st" */
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+/***************************************************************
+ * Return in str at most strl characters from first element of
+ * string Matrix pointed to by ptr ( ptr is assumed to be a String Matrix )
+ **************************************************************/
+
+int mxGetString(const mxArray *ptr, char *str, int strl)
+{
+ int commonrowlength, totallength, firstchain, nrows;
+ int *header = Header(ptr);
+
+ /* int ncols = header[2]; This is 1 */
+
+ if (header[0] != STRINGMATRIX)
+ {
+ return 1;
+ }
+ nrows = header[1];
+ commonrowlength = header[5] - header[4];
+ totallength = nrows * commonrowlength;
+ firstchain = 5 + nrows;
+ C2F(in2str)(&totallength, &header[firstchain], str, 0L);
+ if (strl < totallength)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+char *mxArrayToString(const mxArray *array_ptr)
+{
+ int commonrowlength, nrows, buflen;
+ char *buf;
+ int *header = Header(array_ptr);
+
+ nrows = header[1];
+ commonrowlength = header[5] - header[4];
+ buflen = nrows * commonrowlength;
+ buf = mxCalloc(buflen, sizeof(char));
+ if (mxGetString(array_ptr, buf, buflen) == 0)
+ {
+ return (char *) buf;
+ }
+ return (char *) 0;
+}
+
+/*-------------------------------------------------
+ * mxFreeMatrix :
+ * mxFreeMatrix will do something only if it is called
+ * in the reverse order of variable allocation
+ * Thus after calling mexCallScilab in order to
+ * free the stack, one has to call mxFree as in the
+ * following example :
+ *
+ * int nlhs = 3; int nrhs = 2;
+ * rhs[0] = mxCreateString(filename);
+ * rhs[1] = mxCreateFull(1,1,REAL);
+ * mexCallMATLAB(nlhs, lhs, nrhs, rhs, "gm_ifile");
+ * free space in reverse order
+ * for (i= nlhs -1 ; i >=0 ; i--) mxFreeMatrix(lhs[i]);
+ * for (i= rhs -1 ; i >=0 ; i--) mxFreeMatrix(rhs[i]);
+ *-------------------------------------------------*/
+
+void mxFreeMatrix(mxArray *ptr)
+{
+ /* If we free the last stored object we can decrement Nbvars */
+ if ( (int)ptr == C2F(vstk).lstk[Top - Rhs + Nbvars - 1])
+ {
+ /* sciprint("XXXX OK %dvar %d\n",(int)ptr,Nbvars); */
+ Nbvars--;
+ }
+ else
+ {
+ /* sciprint("XXXX Fail %d var %d\n",(int)ptr,Nbvars); */
+ }
+ /* Automatically freed when return from mexfunction */
+ return ;
+}
+
+void numberandsize(const mxArray *ptr, int *number, int *size)
+/* utility fct : its number as scilab variable
+ * and its size in Scilab double stack */
+{
+ int kk, lst_k;
+ lst_k = (int) ptr;
+ if (lst_k < *Lstk(Bot))
+ {
+ *number = 0;
+ *size = 0;
+ for (kk = 1; kk <= Nbvars; kk++)
+ {
+ *number = kk;
+ if (lst_k == C2F(vstk).lstk[kk + Top - Rhs - 1])
+ {
+ break;
+ }
+ }
+ *size = C2F(vstk).lstk[*number + Top - Rhs] - lst_k;
+ }
+ else
+ {
+ *number = 0;
+ for (kk = Bot; kk < C2F(vstk).isiz; kk++)
+ {
+ *number = kk;
+ if (lst_k == C2F(vstk).lstk[kk - 1])
+ {
+ break;
+ }
+ }
+ *size = C2F(vstk).lstk[*number] - lst_k;
+ }
+}
+
+
+int arr2num( mxArray *ptr )
+{
+ int kk, lst_k, number;
+ lst_k = (int) ptr;
+ if (lst_k < *Lstk(Bot))
+ {
+ number = 0;
+ for (kk = 1; kk <= Nbvars; kk++)
+ {
+ number = kk;
+ if (lst_k == C2F(vstk).lstk[kk + Top - Rhs - 1])
+ {
+ break;
+ }
+ }
+ return number;
+ }
+ else
+ {
+ number = 0;
+ for (kk = Bot; kk < C2F(vstk).isiz; kk++)
+ {
+ number = kk;
+ if (lst_k == C2F(vstk).lstk[kk - 1])
+ {
+ break;
+ }
+ }
+ return number;
+ }
+}
+
+int arr2numcst(const mxArray *ptr )
+{
+ int kk, lst_k, number;
+ lst_k = (int) ptr;
+ if (lst_k < *Lstk(Bot))
+ {
+ number = 0;
+ for (kk = 1; kk <= Nbvars; kk++)
+ {
+ number = kk;
+ if (lst_k == C2F(vstk).lstk[kk + Top - Rhs - 1])
+ {
+ break;
+ }
+ }
+ return number;
+ }
+ else
+ {
+ number = 0;
+ for (kk = Bot; kk < C2F(vstk).isiz; kk++)
+ {
+ number = kk;
+ if (lst_k == C2F(vstk).lstk[kk - 1])
+ {
+ break;
+ }
+ }
+ return number;
+ }
+}
+
+bool mexIsGlobal(const mxArray *ptr)
+{
+ int pointed;
+ int ret_val;
+ int *header;
+ header = (int *) Header(ptr);
+ /*
+ int *rheader;
+ rheader=(int *) RawHeader(ptr);
+ pointed = arr2numcst(ptr);
+ A FINIR si interface par reference OK
+ printf("POINTED %i Infstk(pointed) %i\n", pointed, *Infstk(pointed));
+ printf("header[2] %i Infstk(pointed) %i\n", header[2], *Infstk(header[2])); */
+ pointed = header[2];
+ if (*Infstk(pointed) == 2)
+ {
+ ret_val = 1;
+ }
+ else
+ {
+ ret_val = 0;
+ }
+ return ret_val;
+}
+
+
+mxArray *mxDuplicateArray(const mxArray *ptr)
+{
+ int start_in;
+ int lw, number, size, k;
+ double *old , *data;
+ start_in = (int) ptr;
+ if ( istk( iadr(start_in) )[0] < 0 )
+ {
+ /* variable is a reference : the reference is copied */
+ size = istk( iadr(start_in) )[2];
+ old = stk( istk(iadr(start_in))[1] );
+ }
+ else
+ {
+ numberandsize(ptr, &number, &size);
+ old = stk(start_in);
+ }
+ Nbvars++;
+ lw = Nbvars;
+ CreateData(lw, size * sizeof(double));
+ data = (double *) GetRawData(lw);
+ for (k = 0; k < size; ++k)
+ {
+ data[k] = old[k];
+ }
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1];
+}
+
+mxArray *UnrefStruct(mxArray *ptr)
+{
+ /* Unreference objects in a struct or cell */
+ int number, k;
+ int list, lindex, offset;
+ int sizeobj;
+ int nb, nbobj, suite, newbot;
+
+ int oldsize, newsize;
+
+ int *header, *headernew;
+ int *headerlist, *headerlistnew;
+ int *headerobj, *headerobjnew;
+ int *headerdims;
+ int proddims;
+ int obj;
+
+ mxArray *mxNew;
+ header = Header(ptr); /* RawHeader ? */
+ mxNew = mxDuplicateArray(ptr);
+ headernew = Header(mxNew); /* RawHeader ? */
+
+ offset = Top - Rhs;
+ newsize = header[4]; /* Initialize */
+ nb = header[1] - 2; /* Number of fields */
+ headerdims = listentry(header, 2);
+ proddims = 1;
+ for (k = 0; k < headerdims[1]*headerdims[2]; k++)
+ {
+ proddims = proddims * headerdims[4 + k];
+ }
+ if (!(proddims == 1))
+ {
+ suite = 0;
+ for (list = 0; list < nb; list++)
+ {
+ headerlist = listentry(header, list + 3); /* pointing to the field list */
+ nbobj = headerlist[1]; /* number of objects in the field */
+ for (lindex = 0; lindex < nbobj; lindex++)
+ {
+ headerobj = listentry( headerlist, lindex + 1);
+ /* pointing to the object in the field */
+ if (headerobj[0] < 0)
+ {
+ sizeobj = headerobj[3];
+ }
+ else
+ {
+ sizeobj = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+ newsize += sizeobj; /* update size of the field */
+ }
+ suite++;
+ newsize += (2 + nbobj / 2); /* size of list = size of inside + ... */
+ headernew[4 + suite] = newsize;
+ }
+ numberandsize( mxNew, &number, &oldsize);
+ newsize += 3; /* taking account begining of list */
+ newbot = *Lstk(number + offset) + newsize + 1;
+ if ( (newbot - *Lstk(Bot)) > 0)
+ {
+ SciError(17);
+ return 0;
+ }
+ *Lstk(number + offset + 1) = newbot;
+ for (list = 0; list < nb; list++)
+ {
+ headerlist = listentry(header, list + 3);
+ headerlistnew = listentry(headernew, list + 3);
+ nbobj = headerlist[1];
+ headerlistnew[0] = 15;
+ headerlistnew[1] = nbobj;
+ headerlistnew[2] = 1;
+ for (lindex = 0; lindex < nbobj; lindex++)
+ {
+ headerobj = listentry( headerlist, lindex + 1);
+ if (headerobj[0] < 0)
+ {
+ sizeobj = headerobj[3]; /* reference (size of ) */
+ }
+ else
+ {
+ sizeobj = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+ headerlistnew[3 + lindex] = headerlistnew[2 + lindex] + sizeobj;
+ }
+ }
+ for (list = 0; list < nb; list++)
+ {
+ headerlist = listentry(header, list + 3);
+ headerlistnew = listentry(headernew, list + 3);
+ nbobj = headerlist[1];
+ for (lindex = 0; lindex < nbobj; lindex++)
+ {
+ headerobj = listentry( headerlist, lindex + 1);
+ headerobjnew = listentry( headerlistnew, lindex + 1);
+ if (headerobj[0] < 0) /* reference */
+ {
+ sizeobj = headerobj[3];
+ headerobj = (int *) stk(headerobj[1]); /* dereference */
+ }
+ else
+ {
+ sizeobj = headerlist[lindex + 3] - headerlist[lindex + 2];
+ }
+ for (k = 0; k < 2 * sizeobj; k++)
+ {
+ headerobjnew[k] = headerobj[k]; /* OUF! */
+ }
+ }
+ }
+ }
+ else
+ {
+ /* 1 x 1 x ... x 1 struct */
+ suite = 0;
+ for (obj = 0; obj < nb; obj++)
+ {
+ headerobj = listentry(header, 3 + obj);
+ if (headerobj[0] < 0)
+ {
+ sizeobj = headerobj[3];
+ }
+ else
+ {
+ sizeobj = header[5 + obj] - header[4 + obj];
+ }
+ newsize += sizeobj;
+ suite++;
+ newsize += sizeobj;
+ headernew[4 + suite] = newsize;
+ }
+ numberandsize( mxNew, &number, &oldsize);
+ newsize += 3;
+ newbot = *Lstk(number + offset) + newsize + 1;
+ if ( (newbot - *Lstk(Bot)) > 0)
+ {
+ SciError(17);
+ return 0;
+ }
+ *Lstk(number + offset + 1) = newbot;
+ for (obj = 0; obj < nb; obj++)
+ {
+ headerobj = listentry(header, 3 + obj);
+ headerobjnew = listentry(headernew, 3 + obj);
+ if (headerobj[0] < 0)
+ {
+ sizeobj = headerobj[3];
+ headerobj = (int *) stk(headerobj[1]);
+ }
+ else
+ {
+ sizeobj = header[5 + obj] - header[4 + obj];
+ }
+ for (k = 0; k < 2 * sizeobj; k++)
+ {
+ headerobjnew[k] = headerobj[k];
+ }
+ }
+ }
+ return mxNew;
+}
+
+void mxDestroyArray(mxArray *ptr)
+{
+ /* No need */
+ return;
+}
+
+void mxFree(void *ptr)
+{
+ double *header;
+ int *iheader;
+ /* If we free the last stored object we can decrement Nbvars */
+ if ( Nbvars >= 1)
+ {
+ iheader = istk(iadr(C2F(intersci).iwhere[Nbvars - 1] ) );
+ /* printf("MxFree iheader,%i %i %i %i\n", iheader[0],iheader[1],iheader[2],iheader[3]); */
+ if ( !(iheader[0] == 1) )
+ {
+ return;
+ }
+ header = stk(C2F(intersci).iwhere[Nbvars - 1]);
+ /* if ( !(C2F(locptr)(stk(C2F(intersci).lad[Nbvars - 1])) == C2F(locptr)((&header[2])))) return; */
+ if ( (vraiptrst) ptr == C2F(locptr)(&header[2]))
+ {
+ /* sciprint("XXXX mxfree OK %d\n",Nbvars); */
+ Nbvars--;
+ }
+ else
+ {
+ /* sciprint("XXXX mxfree NOTOK %d\n",Nbvars); */
+ }
+ }
+ return ;
+}
+
+int mexAtExit(mxArray *ptr)
+{
+ /* XXXXX To be done....*/
+ return 0;
+}
+
+mxArray *mxCreateSparse(int m, int n, int nzmax, mxComplexity cmplx)
+{
+ static int lw, iprov;
+ Nbvars++;
+ lw = Nbvars;
+ iprov = lw + Top - Rhs;
+ if ( ! C2F(mspcreate)(&iprov, &m, &n, &nzmax, (int *) &cmplx))
+ {
+ return (mxArray *) 0;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1]; /* C2F(intersci).iwhere[lw-1]) */
+}
+
+
+/***************************************************************
+ * Create on Scilab Stack a 1x1 string matrix filled with string
+ **************************************************************/
+
+mxArray *mxCreateString(const char *string)
+{
+ static int i, lw;
+ static int one = 1;
+ i = (int)strlen(string);
+ lw = Nbvars + 1;
+ /* we do not increment Nbvars since it is done inside createvar */
+ if ( ! C2F(createvarfromptr)(&lw, STRING_DATATYPE, &one, &i, (double *) &string, 1L) )
+ {
+ return (mxArray *) 0;
+ }
+ /* back conversion to Scilab coding */
+ Convert2Sci(lw);
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw + Top - Rhs - 1];
+}
+
+mxArray *mxCreateLogicalMatrix(int m, int n)
+{
+ int new, k;
+ int *header;
+ Nbvars++;
+ new = Nbvars;
+ CreateData(new, (3 + m * n)*sizeof(int));
+ header = (int *) GetData(new);
+ header[0] = LOGICAL;
+ header[1] = m;
+ header[2] = n;
+ for (k = 0; k < m * n; k++)
+ {
+ header[3 + k] = 0;
+ }
+ return (mxArray *) C2F(intersci).iwhere[new - 1];
+}
+
+mxArray *mxCreateLogicalScalar(mxLOGICAL *value)
+{
+ mxArray *pa;
+ int *header;
+ pa = mxCreateLogicalMatrix(1, 1);
+ header = (int *) stkptr((long int) pa);
+ header[3] = (int) value;
+ return (mxArray *) pa;
+}
+
+bool mxIsLogicalScalarTrue(mxArray *pa)
+{
+ bool retval;
+ retval = mxIsLogical(pa) && mxGetNumberOfElements(pa) == 1 && *mxGetLogicals(pa) == 1;
+ return retval;
+}
+
+
+bool mxIsLogicalScalar(mxArray *pa)
+{
+ bool retval;
+ retval = mxIsLogical(pa) && mxGetNumberOfElements(pa) == 1;
+ return retval;
+}
+/*
+ Print function which prints (format,args,....)
+ in Scilab window
+*/
+
+void mexPrintf (const char *fmt, ...)
+{
+ va_list args;
+ char buf[2048];
+
+ va_start(args, fmt);
+ (void ) vsprintf(buf, fmt, args );
+ sciprint("%s", buf);
+ va_end(args);
+}
+
+
+void mexWarnMsgTxt(const char *error_msg)
+{
+ mexPrintf(_("Warning: "));
+ mexPrintf(error_msg);
+ mexPrintf("\n\n");
+ /* mexPrintf(strcat(_("Warning: "),error_msg)); */
+}
+
+/* 1 is returned in case of failure */
+
+static int mexCallSCI(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs, char *name, int jumpflag)
+{
+ static int i1, i2;
+ static int k, kk, nv;
+ nv = Nbvars;
+ for (k = 1; k <= nrhs; ++k)
+ {
+ for (kk = 1; kk <= nv; ++kk)
+ if ((int) prhs[k - 1] == C2F(vstk).lstk[kk + Top - Rhs - 1])
+ {
+ break;
+ }
+ if (kk == nv + 1)
+ {
+ mexErrMsgTxt(_("mexCallSCILAB: invalid pointer passed to called function."));
+ return 1;
+ }
+ else
+ {
+ ++Nbvars;
+ i1 = Top - Rhs + kk;
+ i2 = Top - Rhs + Nbvars;
+ C2F(vcopyobj)("mexCallSCILAB", &i1, &i2, 13L);
+ }
+ }
+ i1 = nv + 1;
+ if (! C2F(scistring)(&i1, name, &nlhs, &nrhs, (unsigned long) strlen(name) ))
+ {
+ if ( jumpflag == 1)
+ {
+ mexErrMsgTxt(_("mexCallSCILAB: evaluation failed. "));
+ }
+ return 1;
+ /* return 0; */
+ }
+ for (k = 1; k <= nlhs; ++k)
+ {
+ plhs[k - 1] = (mxArray *) C2F(vstk).lstk[nv + k + Top - Rhs - 1];
+ }
+ Nbvars = nv + nlhs;
+ return 0;
+}
+
+
+int mexCallSCILAB(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs, const char *name)
+{
+ return mexCallSCI(nlhs, plhs, nrhs, prhs, (char *) name, 1);
+}
+
+int mexCallMATLAB(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs, const char *name)
+{
+ return mexCallSCI(nlhs, plhs, nrhs, prhs, (char *) name, 1);
+}
+
+int mxCalcSingleSubscript(const mxArray *ptr, int nsubs, const int *subs)
+{
+ int k, retval, coeff;
+ int *dims = mxGetDimensions(ptr);
+ retval = 0;
+ coeff = 1;
+ for (k = 0; k < nsubs; k++)
+ {
+ retval = retval + subs[k] * coeff;
+ coeff = coeff * dims[k];
+ }
+ return retval;
+}
+
+int C2F(mexcallscilab)(int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs, char *name, int namelen)
+{
+ return mexCallSCILAB(*nlhs, plhs, *nrhs, prhs, name);
+}
+
+/** generic mex interface **/
+const char *mexFunctionName(void)
+{
+ return the_current_mex_name;
+}
+
+int mex_gateway(char *fname, GatefuncH F)
+{
+ int nlhs, nrhs;
+ mxArray * plhs[intersiz];
+ mxArray * prhs[intersiz];
+ the_current_mex_name = fname;
+ C2F(initmex)(&nlhs, plhs, &nrhs, prhs);
+ (*F)(nlhs, plhs, nrhs, prhs);
+ C2F(endmex)(&nlhs, plhs, &nrhs, prhs);
+ return 0;
+}
+
+int fortran_mex_gateway(char *fname, FGatefuncH F)
+{
+ int nlhs, nrhs;
+ mxArray * plhs[intersiz];
+ mxArray * prhs[intersiz];
+ C2F(initmex)(&nlhs, plhs, &nrhs, prhs);
+ (*F)( &nlhs, plhs, &nrhs, prhs);
+ C2F(endmex)(&nlhs, plhs, &nrhs, prhs);
+ return 0;
+}
+
+
+
+int mxGetElementSize(const mxArray *ptr)
+{
+ int k, it;
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case SPARSEMATRIX:
+ return sizeof(double);
+ case STRINGMATRIX:
+ return 2 * sizeof(char); /* ? Matlab returns 2 */
+ case MLIST:
+ k = header[4];
+ /* header[6+2*(k-1)] = 1 if double matrix, 8 if int */
+ if (header[6 + 2 * (k - 1)] == DOUBLEMATRIX)
+ {
+ return sizeof(double);
+ }
+ if (header[6 + 2 * (k - 1)] == INTMATRIX)
+ {
+ it = header[6 + 2 * (k - 1) + 3];
+ return( it % 10 );
+ }
+ break;
+ case INTMATRIX:
+ /*[8,m,n,it] it=01 02 04 11 12 14
+ int8 int16 int32 uint8 uint16 uint32 */
+ it = header[3];
+ return( it % 10 );
+ default:
+ mexErrMsgTxt(_("GetElementSize error."));
+ return 0;
+ }
+ return 0;
+}
+
+mxArray *mxCreateCharMatrixFromStrings(int m, const char **str)
+{
+ static int i, lr1, lw, ilocal, n, k, kk, nmax;
+ nmax = (int)strlen(str[0]);
+ for (k = 1; k < m; ++k)
+ {
+ n = (int)strlen(str[k]);
+ if (n > nmax)
+ {
+ nmax = n;
+ }
+ }
+ Nbvars++;
+ lw = Nbvars + Top - Rhs;
+ /* logical function cresmat3(fname,lw,m,n,nchar,lr) */
+ if ( ! C2F(cresmat4)("mxCreateString:", &lw, &m, &nmax, &lr1, 15L))
+ {
+ return (mxArray *) 0;
+ }
+ /* Convert string to int code */
+ /* subroutine cvstr(n,line,str,job) */
+ for (k = 0; k < m; ++k)
+ {
+ n = (int)strlen(str[k]);
+ /* fill with blanks (40) if n<nmax !!*/
+ C2F(cvstr)(&n, istk(lr1), (char *) str[k], (ilocal = 0, &ilocal), i);
+ if (nmax > n)
+ {
+ for (kk = 0; kk < nmax - n; ++kk)
+ {
+ *istk(lr1 + n + kk) = 40;
+ }
+ };
+ lr1 = lr1 + nmax;
+ }
+ C2F(intersci).ntypes[lw - 1] = AsIs;
+ return (mxArray *) C2F(vstk).lstk[lw - 1];
+}
+
+int mexEvalString(const char *name)
+{
+ double *val ;
+ int rep;
+ mxArray *ppr[3];
+ mxArray *ppl[1];
+ int nlhs;
+ int nrhs;
+ ppr[0] = mxCreateString(name);
+ ppr[1] = mxCreateString("errcatch");
+ ppr[2] = mxCreateString("m");
+ nrhs = 3;
+ nlhs = 1;
+ rep = mexCallSCI(nlhs, ppl, nrhs, ppr, "execstr", 0);
+ /* check returned value */
+ val = mxGetPr(ppl[0]);
+ mxFreeMatrix(ppl[0]);
+ mxFreeMatrix(ppr[2]);
+ mxFreeMatrix(ppr[1]);
+ mxFreeMatrix(ppr[0]);
+ if ( rep == 1 || (int) (*val) != 0 )
+ {
+ errjump();
+ }
+ return rep;
+}
+
+mxArray *mexGetArray(char *name, char *workspace)
+{
+ int lw, fin, new ;
+ int *header;
+ /* mxArray *mxPointed; */
+ if (C2F(objptr)(name, &lw, &fin, (unsigned long)strlen(name)))
+ {
+ /* mxPointed = (mxArray *) lw; */
+ Nbvars++;
+ new = Nbvars;
+ CreateData(new, 4 * sizeof(int));
+ header = (int *) GetRawData(new);
+ header[0] = - *istk( iadr(*Lstk(fin)));
+ header[1] = lw;
+ header[2] = fin;
+ header[3] = *Lstk(fin + 1) - *Lstk(fin) ;
+ /* C2F(intersci).ntypes[new-1]=45; */
+ return (mxArray *) C2F(intersci).iwhere[new - 1];
+ }
+ else
+ {
+ return (mxArray *) 0;
+ }
+}
+
+const mxArray *mexGetVariablePtr(const char *workspace, const char *var_name)
+{
+ int lw, fin, new ;
+ int *header;
+ /* mxArray *mxPointed; */
+ if (C2F(objptr)((char*)var_name, &lw, &fin, (unsigned long)strlen(var_name)))
+ {
+ /* mxPointed = (mxArray *) lw; */
+ Nbvars++;
+ new = Nbvars;
+ CreateData(new, 4 * sizeof(int));
+ header = (int *) GetRawData(new);
+ header[0] = - *istk( iadr(*Lstk(fin)));
+ header[1] = lw;
+ header[2] = fin;
+ header[3] = *Lstk(fin + 1) - *Lstk(fin) ;
+ return (mxArray *) C2F(intersci).iwhere[new - 1];
+ }
+ else
+ {
+ return (mxArray *) 0;
+ }
+}
+
+mxArray *mexGetVariable(const char *workspace, const char *name)
+{
+ int lw, fin, new ;
+ int *header;
+ /* mxArray *mxPointed; */
+ if (C2F(objptr)((char*)name, &lw, &fin, (unsigned long)strlen(name)))
+ {
+ /* mxPointed = (mxArray *) lw; */
+ Nbvars++;
+ new = Nbvars;
+ CreateData(new, 4 * sizeof(int));
+ header = (int *) GetData(new);
+ header[0] = - *istk( iadr(*Lstk(fin)));
+ header[1] = lw;
+ header[2] = fin;
+ header[3] = *Lstk(fin + 1) - *Lstk(fin) ;
+ /* C2F(intersci).ntypes[new-1]=45; */
+ return (mxArray *) C2F(intersci).iwhere[new - 1];
+ }
+ else
+ {
+ return (mxArray *) 0;
+ }
+}
+
+int mexPutArray(mxArray *array_ptr, char *workspace)
+{
+ /* TO BE DONE obsolete ? */
+ mexPrintf( _("Function mexPutArray is obsolete, use mexPutVariable!\n"));
+ return 1;
+}
+
+int mexPutVariable(const char *workspace, char *var_name, mxArray *array_ptr)
+{
+ /* workspace ignored: to be done .... */
+ PutVar( arr2num( array_ptr) , var_name);
+ return 0; /* CHECK THIS !!!!!! */
+}
+
+void mxSetName(mxArray *array_ptr, const char *name)
+{
+ mexErrMsgTxt(_("Routine mxSetName not implemented !\n"));
+ exit(1); /* TO BE DONE */
+}
+
+void mxSetData(mxArray *array_ptr, void *data_ptr)
+{
+ mexErrMsgTxt(_("Routine mxSetData not implemented.\n"));
+ exit(1); /* TO BE DONE */
+}
+
+void mxSetPr(mxArray *array_ptr, double *pr_data)
+{
+ double *start_of_pr = mxGetPr(array_ptr);
+ unsigned long mem_size;
+ unsigned long mn = mxGetM(array_ptr) * mxGetN(array_ptr);
+ static int warn_cnt = 0; /* Number of times to warn for memcpy overwrite. */
+ static int warn_cnt2 = 0; /* Number of times to warn for oversized NZMAX. */
+
+ if (mxIsSparse(array_ptr))
+ {
+ int *header = Header(array_ptr);
+ int NZMAX = header[4];
+ if ( (unsigned long)NZMAX <= mn )
+ {
+ mem_size = NZMAX * sizeof(double);
+ }
+ else /* Can't hold more than M*N elements so truncate and warn. */
+ {
+ mem_size = mn * sizeof(double);
+ if (warn_cnt2)
+ {
+ char *prefix = --warn_cnt2 == 0 ? _("Last warning") : _("Warning");
+ fprintf(stderr, "%s: mxSetPr (NZMAX=%i) > (M*N=%i).\n", prefix, (int)NZMAX, (int)mn);
+ }
+ }
+ }
+ else /* Full Matrix */
+ {
+ mem_size = mn * sizeof(double);
+ }
+ if (warn_cnt)
+ {
+ int overwrite = (int)(mem_size - sizeof(double) * (pr_data - start_of_pr));
+ if (overwrite > 0)
+ {
+ char *prefix = --warn_cnt == 0 ? _("Last warning") : _("Warning");
+ fprintf(stderr, _("%s: mxSetPr overwriting destination by %i bytes.\n"), prefix, overwrite);
+ }
+ }
+ memcpy(start_of_pr, pr_data, mem_size);
+}
+
+void mxSetPi(mxArray *array_ptr, double *pi_data)
+{
+ double *start_of_pi = mxGetPi(array_ptr);
+ unsigned long mem_size;
+ unsigned long mn = mxGetM(array_ptr) * mxGetN(array_ptr);
+ static int warn_cnt = 0; /* Number of times to warn for memcpy overwrite.*/
+ static int warn_cnt2 = 0; /* Number of times to warn for oversized NZMAX.*/
+
+ if (mxIsSparse(array_ptr))
+ {
+ int *header = Header(array_ptr);
+ int NZMAX = header[4];
+ if ( (unsigned long)NZMAX <= mn )
+ {
+ mem_size = NZMAX * sizeof(double);
+ }
+ else /* Can't hold more than M*N elements so truncate and warn. */
+ {
+ mem_size = mn * sizeof(double);
+ if (warn_cnt2)
+ {
+ char *prefix = --warn_cnt2 == 0 ? _("Last warning") : _("Warning");
+ fprintf(stderr, "%s: mxSetPi (NZMAX=%i) > (M*N=%i).\n", prefix, (int)NZMAX, (int)mn);
+ }
+ }
+ }
+ else /* Full Matrix */
+ {
+ mem_size = mn * sizeof(double);
+ }
+ if (warn_cnt)
+ {
+ int overwrite = (int)(mem_size - sizeof(double) * (pi_data - start_of_pi));
+ if (overwrite > 0)
+ {
+ char *prefix = --warn_cnt == 0 ? _("Last warning") : _("Warning");
+ fprintf(stderr, _("%s: mxSetPi overwriting destination by %i bytes.\n"), prefix, overwrite);
+ }
+ }
+ memcpy(start_of_pi, pi_data, mem_size);
+}
+
+const char *mxGetName(const mxArray *array_ptr)
+{
+ mexPrintf(_("Routine mxGetName not implemented.\n"));
+ exit(1);
+ return 0;
+}
+
+int mxSetDimensions(mxArray *array_ptr, const int *dims, int ndim)
+{
+ mexPrintf(_("Routine mxSetDimensions not implemented.\n"));
+ exit(1); /* TO BE DONE */
+ return 0;
+}
+
+const char *mxGetClassName(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ return "double";
+ case STRINGMATRIX:
+ return "char";
+ case SPARSEMATRIX:
+ return "sparse";
+ case INTMATRIX:
+ /*[8,m,n,it] it=01 02 04 11 12 14
+ int8 int16 int32 uint8 uint16 uint32 */
+ switch (header[3])
+ {
+ case 1:
+ return "int8";
+ case 2:
+ return "int16";
+ case 4:
+ return "int32";
+ case 11:
+ return "uint8";
+ case 12:
+ return "uint16";
+ case 14:
+ return "uint32";
+ default:
+ return "unknown";
+ }
+ case MLIST:
+ /* to be done return mxCELL_CLASS or mxCHAR_CLASS or mxSTRUCT_CLASS */
+ /* header[6+2*(header[4]-1)] ( = 1, 10, 8) */
+ switch (theMLIST(header))
+ {
+ case CELL:
+ return "cell";
+ case STRUCT:
+ return "struct";
+ case NDARRAY:
+ switch (header[6 + 2 * (header[4] - 1)])
+ {
+ /* listentry(header,3) */
+ case DOUBLEMATRIX:
+ return "double";
+ case STRINGMATRIX:
+ return "char";
+ case INTMATRIX:
+ switch (header[6 + 2 * (header[4] - 1) + 3])
+ {
+ case 1:
+ return "int8";
+ case 2:
+ return "int16";
+ case 4:
+ return "int32";
+ case 11:
+ return "uint8";
+ case 12:
+ return "uint16";
+ case 14:
+ return "uint32";
+ default:
+ return "unknown";
+ }
+ }
+ default:
+ return "unknown";
+ }
+ }
+ return "unknown";
+}
+
+void mxSetCell(mxArray *array_ptr, int lindex, mxArray *value)
+{
+ mxSetFieldByNumber(array_ptr, lindex, 0 , value);
+ return;
+}
+
+int mxGetNzmax(const mxArray *ptr)
+{
+ int *header = Header(ptr);
+ /* ... N=header[2], nzmax=header[4]; then Jc, then Ir */
+ return header[4];
+}
+
+mxLOGICAL *mxGetLogicals(const mxArray *array_ptr)
+{
+ int *header = Header(array_ptr);
+ /* TO BE DONE : ND Arrays */
+ if (header[0] != LOGICAL)
+ {
+ return NULL;
+ }
+ return (mxLOGICAL *) &header[3];
+}
+
+int C2F(initmex)(int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs)
+{
+ int *header;
+ int *header1;
+ static int output, k, RhsVar;
+ static int m, commonlength, line;
+ if (Rhs == -1)
+ {
+ Rhs++;
+ }
+ Nbvars = 0;
+ *nlhs = Lhs;
+ *nrhs = Rhs;
+ for (output = 1; output <= *nlhs ; ++output)
+ {
+ plhs[output - 1] = 0;
+ }
+ for (k = 1; k <= *nrhs ; ++k)
+ {
+ RhsVar = k + Top - Rhs;
+ prhs[k - 1] = (mxArray *) C2F(vstk).lstk[RhsVar - 1];
+ C2F(intersci).ntypes[k - 1] = AsIs;
+ header = (int *) stkptr((long int)prhs[k - 1]);
+ /*
+ Indirect
+ */
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ switch (header[0])
+ {
+ case DOUBLEMATRIX:
+ case INTMATRIX:
+ case SPARSEMATRIX:
+ break;
+ case STRINGMATRIX:
+ if (header[2] != 1)
+ {
+ mexErrMsgTxt(_("Invalid string matrix (at most one column!)"));
+ }
+ m = header[1];
+ commonlength = header[5] - header[4];
+ if (m > 1)
+ {
+ for (line = 1; line < m; line++)
+ {
+ if (header[5 + line] - header[4 + line] != commonlength)
+ {
+ mexErrMsgTxt(_("Column length of string matrix must agree!"));
+ }
+ }
+ }
+ break;
+ case 5:
+ mexErrMsgTxt(_("Use mtlb_sparse(sparse( ))!"));
+ /* scilab sparse should be matlabified */
+ return 0;
+ case MLIST:
+ header1 = (int *) listentry(header, 2);
+ /* m = header1[1]*header1[2]; */
+ /* C2F(entier)(&m, (double *) &header1[4], &header1[4]); */
+ break;
+ case LOGICAL :
+ break;
+ default:
+ mexErrMsgTxt(_("Invalid input"));
+ return 0;
+ }
+ }
+ Nbvars = Rhs ;
+ return 0;
+}
+
+
+/****************************************************
+ * A set of utility functions
+ ****************************************************/
+
+vraiptrst C2F(locptr)(void * x)
+{
+ return((vraiptrst) x);
+}
+
+int C2F(createstkptr)(int *m, vraiptrst *ptr)
+{
+ int lr, n = 1, lw;
+ Nbvars++;
+ lw = Nbvars;
+ if (! C2F(createvar)(&lw, "d", m, &n, &lr, 1L))
+ {
+ return 0;
+ }
+ *ptr = C2F(locptr)(stk(lr));
+ return 1;
+}
+
+int C2F(createptr)(char *type, int *m, int *n, int *it, int *lr, int *ptr, long int type_len)
+{
+ static int lc, lw;
+ Nbvars++;
+ lw = Nbvars;
+ /* sciprint("createptr XXXX %d\n",lw); */
+ if (! C2F(createcvar)(&lw, type, it, m, n, lr, &lc, 1L))
+ {
+ return 0;
+ }
+ *ptr = C2F(vstk).lstk[lw + Top - Rhs - 1];
+ return 1;
+}
+
+int C2F(endmex)(int *nlhs, mxArray **plhs, int *nrhs, mxArray **prhs)
+{
+ int nv, kk, k, plhsk;
+ for (k = 1; k <= *nlhs; k++)
+ {
+ if (IsstOrce(plhs[k - 1]))
+ {
+ plhs[k - 1] = UnrefStruct(plhs[k - 1]);
+ }
+ }
+ nv = Nbvars;
+ for (k = 1; k <= *nlhs; k++)
+ {
+ plhsk = (int) plhs[k - 1];
+ LhsVar(k) = 0;
+ for (kk = 1; kk <= nv; kk++)
+ {
+ if (plhsk == C2F(vstk).lstk[kk + Top - Rhs - 1])
+ {
+ LhsVar(k) = kk;
+ break;
+ }
+ }
+ }
+
+ /** clear mxMalloc_m and mxCalloc_m **/
+ mxFree_m_all();
+ PutLhsVar();
+ return 0;
+}
+
+/* a utility function to recover available Vars position */
+
+void clear_mex(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs)
+{
+ int nv = Nbvars , k;
+ int max = (int) plhs[0] ;
+ for (k = 1; k <= nlhs; k++)
+ if ( (int)plhs[k - 1] > max )
+ {
+ max = (int)plhs[k - 1];
+ }
+ for (k = 1; k <= nrhs; k++)
+ if ( (int) prhs[k - 1] > max )
+ {
+ max = (int) prhs[k - 1];
+ }
+ for (k = 1; k <= nv; k++)
+ if ( max < C2F(vstk).lstk[k + Top - Rhs - 1])
+ {
+ Nbvars--;
+ }
+}
+
+void mexInfo(char *str)
+{
+ fprintf(stderr, "%s %d\n", str, Nbvars);
+ fflush(stderr);
+}
+
+int mexCheck(char *str, int nbvars)
+{
+ if ( nbvars != -1 && Nbvars != nbvars)
+ {
+ fprintf(stderr, "%s %d %d\n", str, Nbvars, nbvars);
+ }
+ return Nbvars ;
+}
+
+
+/****************************************************
+ * C functions for Fortran mexfunctions
+ ****************************************************/
+
+double * C2F(mxgetpr)(mxArray *ptr)
+{
+ /* double *value = (double *) stkptr(*ptr); */
+ double *value;
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ value = (double *) header;
+ if (header[0] == DOUBLEMATRIX)
+ {
+ return &value[2];
+ }
+ else if ( header[0] == SPARSEMATRIX )
+ {
+ /* nnz = header[4]; N = header[2]; */
+ return &value[ i2sadr(5 + header[2] + header[4]) ];
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+
+double * C2F(mxgetpi)(mxArray *ptr)
+{
+ /* double *value = (double *) stkptr(*ptr); */
+ double *value;
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ value = (double *) header;
+ return &value[2 + C2F(mxgetm)(ptr) * C2F(mxgetn)(ptr)];
+}
+
+int C2F(mxgetm)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ return header[1] ;
+}
+
+int C2F(mxgetn)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if ( header[0] == STRINGMATRIX)
+ {
+ return header[5] - 1;
+ }
+ return header[2] ;
+}
+
+int C2F(mxisstring)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if (header[0] == STRINGMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int C2F(mxisnumeric)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if ( header[0] == DOUBLEMATRIX)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int C2F(mxisfull)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if ( header[0] == DOUBLEMATRIX)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+int C2F(mxissparse)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if (header[0] == SPARSEMATRIX)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+
+int C2F(mxiscomplex)(mxArray *ptr)
+{
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ if (header[3] == DOUBLEMATRIX)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+double C2F(mxgetscalar)(mxArray *ptr)
+{
+ static int N, nnz;
+ double *value;
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ value = (double *) header;
+ if (header[0] == DOUBLEMATRIX)
+ {
+ return value[2];
+ }
+ else if (header[0] == SPARSEMATRIX)
+ {
+ nnz = header[4];
+ N = header[2];
+ return value[(5 + nnz + N) / 2 + 1];
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void C2F(mexprintf)(char *error_msg, int len)
+{
+ char * buf;
+ if ((buf = (char *)MALLOC((unsigned)sizeof(char) * (len + 1))) == NULL)
+ {
+ cerro((char *)_("No more memory"));
+ return;
+ }
+ buf[len] = '\0';
+ strncpy(buf, error_msg, (size_t)len);
+ sciprint("%s\n", buf);
+ FREE(buf);
+}
+
+void C2F(mexerrmsgtxt)(char *error_msg, int len)
+{
+ C2F(erro)(error_msg, len);
+ errjump();
+}
+
+mxArray *C2F(mxcreatefull)(int *m, int *n, int *it)
+{
+ static int lr1;
+ int lrd;
+ if (! C2F(createptr)("d", m, n, it, &lr1, &lrd, 1L))
+ {
+ return (mxArray *) 0;
+ }
+ return (mxArray *) lrd ;
+}
+
+mxArray *C2F(mxcreatedoublematrix)(int *m, int *n, int *it)
+{
+ return (mxArray *) mxCreateDoubleMatrix(*m, *n, (mxComplexity) * it);
+}
+
+
+unsigned long int C2F(mxcalloc)(unsigned int *n, unsigned int *size)
+{
+ int m;
+ vraiptrst lrd;
+ m = (*n * *size) / sizeof(double) + 1;
+ if (! C2F(createstkptr)(&m, &lrd))
+ {
+ return 0;
+ }
+ return (unsigned long int) lrd;
+}
+
+int C2F(mxgetstring)(mxArray *ptr, char *str, int *strl)
+{
+ int commonlength;
+ int nrows;
+ int *header = (int *) stkptr(*ptr);
+ if (header[0] < 0)
+ {
+ header = (int *) stk(header[1]);
+ }
+ nrows = header[1];
+ /* int ncols = value[2]; This is 1 */
+ commonlength = nrows * (header[5] - header[4]);
+ C2F(in2str)(&commonlength, &header[5 + nrows], str, 0L);
+ *strl = Min(*strl, commonlength);
+ return 0;
+}
+
+void C2F(mxfreematrix)(mxArray *ptr)
+{
+ return ;
+}
+
+
+mxArray * C2F(mxcreatestring)(char *string, long int l)
+{
+ static int i, lr1, lw, iprov, ilocal;
+ /** i = strlen(string); **/
+ i = l;
+ Nbvars++;
+ lw = Nbvars;
+ iprov = lw + Top - Rhs;
+ if ( ! C2F(cresmat2)("mxCreateString:", &iprov, &i, &lr1, 15L))
+ {
+ return (mxArray *) 0;
+ }
+ C2F(cvstr)(&i, istk(lr1), string, (ilocal = 0, &ilocal), l);
+ C2F(intersci).ntypes[lw - 1] = 36;
+ return (mxArray *) C2F(vstk).lstk[Top - Rhs + lw - 1];
+}
+
+
+int C2F(mxcopyreal8toptr)(double *y, mxArray *ptr, int *n)
+{
+ int one = 1;
+ double *value = ((double *) * ptr);
+ C2F(dcopy)(n, y, &one, value, &one);
+ return 0;
+}
+
+int C2F(mxcopycomplex16toptr)(double *y, mxArray *ptr, mxArray *pti, int *n)
+{
+ int one = 1;
+ int two = 2;
+ double *value = ((double *) * ptr);
+ double *headerm = ((double *) * pti);
+ C2F(dcopy)(n, y, &two, value, &one);
+ C2F(dcopy)(n, ++y, &two, headerm, &one);
+ return 0;
+}
+
+int C2F(mxcopyptrtoreal8)(mxArray *ptr, double *y, int *n)
+{
+ int one = 1;
+ double *value = ((double *) * ptr);
+ C2F(dcopy)(n, value, &one, y, &one);
+ return 0;
+}
+
+int C2F(mxcopyptrtocomplex16)(mxArray *ptr, mxArray *pti, double *y, int *n)
+{
+ int one = 1;
+ int two = 2;
+ double *value = ((double *) * ptr);
+ double *headerm = ((double *) * pti);
+ C2F(dcopy)(n, value, &one, y, &two);
+ C2F(dcopy)(n, headerm, &one, ++y, &two);
+ return 0;
+}
+
+
+/* mxCreateLogicalArray
+ * mxIsLogicalScalarTrue */
+
+/* *mxRealloc(void *ptr, size_t size);
+ mxArray *mxCreateStringFromNChars(const char *str, int n);
+ int mxSetClassName(mxArray *pa, const char *classname);
+ int mxAddField(mxArray *pa, const char *fieldname);
+ void mxRemoveField(mxArray *pa, int field);
+ void mxSetCopyInCell(mxArray *pa, int i, mxArray *value); */
diff --git a/modules/mexlib/src/c/mexlib.h b/modules/mexlib/src/c/mexlib.h
new file mode 100755
index 000000000..544f1d45d
--- /dev/null
+++ b/modules/mexlib/src/c/mexlib.h
@@ -0,0 +1,211 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+/*
+ * Local declaration file for mexlib
+ *
+ */
+
+/**
+ * TODO : comment
+ * @param ptr_lstk
+ * @return
+ */
+vraiptrst stkptr(long int ptr_lstk);
+
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+int *Header(const mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param header
+ * @return
+ */
+mxArray *header2ptr(int *header);
+
+/**
+ * TODO : comment
+ * @param header
+ * @param i
+ * @return
+ */
+int *listentry(int *header, int i);
+
+/**
+ * TODO : comment
+ * @param header
+ * @return
+ */
+int theMLIST(int *header);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+int *RawHeader(const mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+int Is1x1(const mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param m
+ * @return
+ */
+mxArray *mxCreateData(int m);
+
+/**
+ * TODO : comment
+ * @param expr
+ * @param error_message
+ */
+void mxAssert(int expr, char *error_message);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @param nsize
+ */
+void *mxRealloc(void *ptr, size_t nsize);
+
+/**
+ * TODO : comment
+ * @param ptr
+ */
+void mexMakeMemoryPersistent(void *ptr);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+int IsstOrce(mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @param number
+ * @param size
+ */
+void numberandsize(const mxArray *ptr, int *number, int *size);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+bool mexIsGlobal(const mxArray *ptr);
+
+/**
+ * Unreference objects in a struct or cell
+ * @param ptr
+ * @return
+ */
+mxArray *UnrefStruct(mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param m
+ * @param n
+ * @return
+ */
+mxArray *mxCreateLogicalMatrix(int m, int n);
+
+/**
+ * TODO : comment
+ * @param value
+ * @return
+ */
+mxArray *mxCreateLogicalScalar(mxLOGICAL *value);
+
+/**
+ * TODO : comment
+ * @param pa
+ * @return
+ */
+bool mxIsLogicalScalarTrue(mxArray *pa);
+
+/**
+ * TODO : comment
+ * @param pa
+ * @return
+ */
+bool mxIsLogicalScalar(mxArray *pa);
+
+/**
+ * TODO : comment
+ * @return
+ */
+const char *mexFunctionName(void);
+
+/**
+ * TODO : comment
+ * @param array_ptr
+ * @param workspace
+ * @return
+ */
+int mexPutArray(mxArray *array_ptr, char *workspace);
+
+/**
+ * TODO : comment
+ * @param workspace
+ * @param var_name
+ * @param array_ptr
+ * @return
+ */
+int mexPutVariable(const char *workspace, char *var_name, mxArray *array_ptr);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @return
+ */
+const char *mxGetClassName(const mxArray *ptr);
+
+/**
+ * TODO : comment
+ * @param m
+ * @param n
+ * @param it
+ * @return
+ */
+mxArray *C2F(mxcreatedoublematrix)(int *m, int *n, int *it);
+
+/**
+ * TODO : comment
+ * @param y
+ * @param ptr
+ * @param pti
+ * @param n
+ * @return
+ */
+int C2F(mxcopycomplex16toptr)(double *y, mxArray *ptr, mxArray *pti, int *n);
+
+/**
+ * TODO : comment
+ * @param ptr
+ * @param pti
+ * @param y
+ * @param n
+ * @return
+ */
+int C2F(mxcopyptrtocomplex16)(mxArray *ptr, mxArray *pti, double *y, int *n);
diff --git a/modules/mexlib/src/c/sci_gateway.c b/modules/mexlib/src/c/sci_gateway.c
new file mode 100755
index 000000000..5100585d8
--- /dev/null
+++ b/modules/mexlib/src/c/sci_gateway.c
@@ -0,0 +1,41 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Sylvestre LEDRU
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*-----------------------------------------------------------------------------------*/
+#include <string.h>
+#include "BOOL.h"
+#include "stack-c.h"
+#include "sci_gateway.h"
+/*-----------------------------------------------------------------------------------*/
+static int callExternalFunction(char *fname, GatefuncS F, BOOL withPutLhsVar);
+/*-----------------------------------------------------------------------------------*/
+/** generic scilab interface **/
+int sci_gateway(char *fname, GatefuncS F)
+{
+ return callExternalFunction(fname, F, TRUE);
+}
+/*-----------------------------------------------------------------------------------*/
+int sci_gateway_without_putlhsvar(char *fname, GatefuncS F)
+{
+ return callExternalFunction(fname, F, FALSE);
+}
+/*-----------------------------------------------------------------------------------*/
+static int callExternalFunction(char *fname, GatefuncS F, BOOL withPutLhsVar)
+{
+ (*F)(fname, (int)strlen(fname));
+ if (withPutLhsVar)
+ {
+ PutLhsVar();
+ }
+ return 0;
+}
+/*-----------------------------------------------------------------------------------*/
diff --git a/modules/mexlib/src/libmat/Core_f_Import.def b/modules/mexlib/src/libmat/Core_f_Import.def
new file mode 100755
index 000000000..cd35aa2e8
--- /dev/null
+++ b/modules/mexlib/src/libmat/Core_f_Import.def
@@ -0,0 +1,9 @@
+ LIBRARY core_f.dll
+
+
+EXPORTS
+;
+;core_f
+;
+hmcreate_
+
diff --git a/modules/mexlib/src/libmat/libmat.rc b/modules/mexlib/src/libmat/libmat.rc
new file mode 100755
index 000000000..53fa0090b
--- /dev/null
+++ b/modules/mexlib/src/libmat/libmat.rc
@@ -0,0 +1,96 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "mexlib module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "mexlib module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "libmat.dll"
+ VALUE "ProductName", "mexlib module"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/mexlib/src/libmat/libmat.vcxproj b/modules/mexlib/src/libmat/libmat.vcxproj
new file mode 100755
index 000000000..6822c6914
--- /dev/null
+++ b/modules/mexlib/src/libmat/libmat.vcxproj
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8A508625-C2AA-4295-AA76-16E4E456D13D}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmat.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmat.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmat.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmat.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmat.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmat.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c" />
+ <ClCompile Include="..\c\sci_gateway.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h" />
+ <ClInclude Include="..\..\includes\sci_gateway.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmat.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+ <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\core\src\c\core.vcxproj">
+ <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\data_structures\src\c\data_structures.vcxproj">
+ <Project>{b7a168a0-dfc0-4c6d-b0cc-6079912a4a76}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\io\src\c\io.vcxproj">
+ <Project>{80c0f142-184b-4e08-a8ee-5e71437cf904}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+ <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\string\src\c\string.vcxproj">
+ <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Core_f_Import.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/src/libmat/libmat.vcxproj.filters b/modules/mexlib/src/libmat/libmat.vcxproj.filters
new file mode 100755
index 000000000..fd12bec2a
--- /dev/null
+++ b/modules/mexlib/src/libmat/libmat.vcxproj.filters
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{dbeffa4a-5d59-463e-b17a-64883141146b}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\c\sci_gateway.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\sci_gateway.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmat.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Core_f_Import.def">
+ <Filter>Libraries Dependencies</Filter>
+ </None>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/src/libmex/Core_f_Import.def b/modules/mexlib/src/libmex/Core_f_Import.def
new file mode 100755
index 000000000..cd35aa2e8
--- /dev/null
+++ b/modules/mexlib/src/libmex/Core_f_Import.def
@@ -0,0 +1,9 @@
+ LIBRARY core_f.dll
+
+
+EXPORTS
+;
+;core_f
+;
+hmcreate_
+
diff --git a/modules/mexlib/src/libmex/libmex.rc b/modules/mexlib/src/libmex/libmex.rc
new file mode 100755
index 000000000..93f7838c0
--- /dev/null
+++ b/modules/mexlib/src/libmex/libmex.rc
@@ -0,0 +1,96 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "mexlib module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "mexlib module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "libmex.dll"
+ VALUE "ProductName", "mexlib module"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/mexlib/src/libmex/libmex.vcxproj b/modules/mexlib/src/libmex/libmex.vcxproj
new file mode 100755
index 000000000..3965bb6ea
--- /dev/null
+++ b/modules/mexlib/src/libmex/libmex.vcxproj
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{0AEC8745-BB5B-4E66-A59A-7251412C3605}</ProjectGuid>
+ <RootNamespace>libmex</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmex.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmex.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c" />
+ <ClCompile Include="..\c\sci_gateway.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h" />
+ <ClInclude Include="..\..\includes\sci_gateway.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmex.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\mexlib.iss" />
+ <None Include="Core_f_Import.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+ <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\core\src\c\core.vcxproj">
+ <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\data_structures\src\c\data_structures.vcxproj">
+ <Project>{b7a168a0-dfc0-4c6d-b0cc-6079912a4a76}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\io\src\c\io.vcxproj">
+ <Project>{80c0f142-184b-4e08-a8ee-5e71437cf904}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+ <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\string\src\c\string.vcxproj">
+ <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/src/libmex/libmex.vcxproj.filters b/modules/mexlib/src/libmex/libmex.vcxproj.filters
new file mode 100755
index 000000000..3311bd3ac
--- /dev/null
+++ b/modules/mexlib/src/libmex/libmex.vcxproj.filters
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{b4f6f14e-5c21-48ed-9301-c70d1842b175}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\c\sci_gateway.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\sci_gateway.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmex.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\mexlib.iss" />
+ <None Include="Core_f_Import.def">
+ <Filter>Libraries Dependencies</Filter>
+ </None>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/src/libmx/Core_f_Import.def b/modules/mexlib/src/libmx/Core_f_Import.def
new file mode 100755
index 000000000..cd35aa2e8
--- /dev/null
+++ b/modules/mexlib/src/libmx/Core_f_Import.def
@@ -0,0 +1,9 @@
+ LIBRARY core_f.dll
+
+
+EXPORTS
+;
+;core_f
+;
+hmcreate_
+
diff --git a/modules/mexlib/src/libmx/libmx.rc b/modules/mexlib/src/libmx/libmx.rc
new file mode 100755
index 000000000..e70c400a9
--- /dev/null
+++ b/modules/mexlib/src/libmx/libmx.rc
@@ -0,0 +1,96 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "mexlib module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "mexlib module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "libmx.dll"
+ VALUE "ProductName", "mexlib module"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/mexlib/src/libmx/libmx.vcxproj b/modules/mexlib/src/libmx/libmx.vcxproj
new file mode 100755
index 000000000..cddc7ff59
--- /dev/null
+++ b/modules/mexlib/src/libmx/libmx.vcxproj
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CEF88C5F-6820-46D4-BCCD-44D5581481C5}</ProjectGuid>
+ <RootNamespace>libmx</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmx.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmx.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmx.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(Configuration)/libmx.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmx.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Command>setlocal EnableDelayedExpansion
+cd $(ConfigurationName)
+set LIST_OBJ=
+for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f
+"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ%
+copy $(ProjectName).def ..\$(ProjectName).def &gt;nul
+del *.def &gt;nul
+cd ..
+</Command>
+ <Message>Build $(ProjectName).def</Message>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>../../../../bin/libintl.lib;../../../../bin/blasplus.lib;../../../../bin/lapack.lib;../../../../bin/core.lib;../../../../bin/elementary_functions_f.lib;core_f.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <ModuleDefinitionFile>libmx.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ <PreBuildEvent>
+ <Command>lib /DEF:"$(ProjectDir)core_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core_f.lib" 1&gt;NUL 2&gt;NUL</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c" />
+ <ClCompile Include="..\c\sci_gateway.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h" />
+ <ClInclude Include="..\..\includes\sci_gateway.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmx.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+ <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\core\src\c\core.vcxproj">
+ <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\data_structures\src\c\data_structures.vcxproj">
+ <Project>{b7a168a0-dfc0-4c6d-b0cc-6079912a4a76}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\io\src\c\io.vcxproj">
+ <Project>{80c0f142-184b-4e08-a8ee-5e71437cf904}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+ <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\string\src\c\string.vcxproj">
+ <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Core_f_Import.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/src/libmx/libmx.vcxproj.filters b/modules/mexlib/src/libmx/libmx.vcxproj.filters
new file mode 100755
index 000000000..79642948f
--- /dev/null
+++ b/modules/mexlib/src/libmx/libmx.vcxproj.filters
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{2c22b92e-5b27-4912-8680-6ea29684c31b}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\c\mexlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\c\sci_gateway.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\mex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\sci_gateway.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="libmx.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Core_f_Import.def">
+ <Filter>Libraries Dependencies</Filter>
+ </None>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/mexlib/tests/nonreg_tests/bug_5292.dia.ref b/modules/mexlib/tests/nonreg_tests/bug_5292.dia.ref
new file mode 100755
index 000000000..e84f9c1ec
--- /dev/null
+++ b/modules/mexlib/tests/nonreg_tests/bug_5292.dia.ref
@@ -0,0 +1,34 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 5292 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5292
+//
+// <-- Short Description -->
+// There is a conflict between bool and scilab header mex.h
+ilib_verbose(0);
+my_current_directory = pwd();
+cd(TMPDIR);
+mputl('ilib_mex_build(''libmex'',[''mex_5292'',''mexfunction_5292'',''cmex''],[''mexfunction_5292.cpp''],[],'''','''','''','''')','builder.sce');
+mputl(["#include <mex.h>"
+"#include <list>"
+"#include <memory.h>"
+"void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])"
+"{"
+" if(nrhs < 2)"
+" mexErrMsgTxt(""Two input arguments required."");"
+" if (nlhs > 1)"
+" mexErrMsgTxt(""Too many output arguments."");"
+"}"],'mexfunction_5292.cpp');
+exec('builder.sce');
+exec('loader.sce');
+ierr = execstr('mex_5292()','errcatch');
+if ierr <> 999 then bugmes();quit;end
+ierr = execstr('mex_5292(2,2)','errcatch');
+if ierr <> 0 then bugmes();quit;end
+cd(my_current_directory);
diff --git a/modules/mexlib/tests/nonreg_tests/bug_5292.tst b/modules/mexlib/tests/nonreg_tests/bug_5292.tst
new file mode 100755
index 000000000..75be34a55
--- /dev/null
+++ b/modules/mexlib/tests/nonreg_tests/bug_5292.tst
@@ -0,0 +1,43 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 5292 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5292
+//
+// <-- Short Description -->
+// There is a conflict between bool and scilab header mex.h
+
+ilib_verbose(0);
+
+my_current_directory = pwd();
+cd(TMPDIR);
+mputl('ilib_mex_build(''libmex'',[''mex_5292'',''mexfunction_5292'',''cmex''],[''mexfunction_5292.cpp''],[],'''','''','''','''')','builder.sce');
+
+mputl(["#include <mex.h>"
+"#include <list>"
+"#include <memory.h>"
+
+"void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])"
+"{"
+" if(nrhs < 2)"
+" mexErrMsgTxt(""Two input arguments required."");"
+" if (nlhs > 1)"
+" mexErrMsgTxt(""Too many output arguments."");"
+"}"],'mexfunction_5292.cpp');
+
+exec('builder.sce');
+exec('loader.sce');
+
+ierr = execstr('mex_5292()','errcatch');
+if ierr <> 999 then pause,end
+
+ierr = execstr('mex_5292(2,2)','errcatch');
+if ierr <> 0 then pause,end
+
+cd(my_current_directory);
diff --git a/modules/mexlib/tests/nonreg_tests/bug_614.dia.ref b/modules/mexlib/tests/nonreg_tests/bug_614.dia.ref
new file mode 100755
index 000000000..78d4abdda
--- /dev/null
+++ b/modules/mexlib/tests/nonreg_tests/bug_614.dia.ref
@@ -0,0 +1,37 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2006-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 614 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=614
+//
+// <-- Short Description -->
+// mxGetDimensions() from mex.h and mexlib.c do not work
+// properly. The reason is that it returns a pointer to int
+// like Matlab, but in fact, the dimensions in scilab are in
+// double format.
+//
+// Also occur in other OS's.
+ilib_verbose(0);
+my_current_directory = pwd();
+cd(TMPDIR);
+mputl('ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[''mexfunction16.c''],[],[],'''','''','''')','builder.sce');
+mputl([
+'#include ""mex.h""'
+'void mexFunction(nlhs, plhs, nrhs, prhs)'
+' int nlhs, nrhs;'
+' mxArray *plhs[]; mxArray *prhs[];'
+'{'
+' int *dims = mxGetDimensions(prhs[0]);'
+' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);'
+'}'
+],'mexfunction16.c');
+exec('builder.sce');
+exec('loader.sce');
+mexf16(rand(2,3,2))
+2 3 2
+cd(my_current_directory);
diff --git a/modules/mexlib/tests/nonreg_tests/bug_614.tst b/modules/mexlib/tests/nonreg_tests/bug_614.tst
new file mode 100755
index 000000000..ea840d769
--- /dev/null
+++ b/modules/mexlib/tests/nonreg_tests/bug_614.tst
@@ -0,0 +1,43 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2006-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 614 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=614
+//
+// <-- Short Description -->
+// mxGetDimensions() from mex.h and mexlib.c do not work
+// properly. The reason is that it returns a pointer to int
+// like Matlab, but in fact, the dimensions in scilab are in
+// double format.
+//
+// Also occur in other OS's.
+
+ilib_verbose(0);
+
+my_current_directory = pwd();
+cd(TMPDIR);
+mputl('ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[''mexfunction16.c''],[],[],'''','''','''')','builder.sce');
+
+mputl([
+'#include ""mex.h""'
+'void mexFunction(nlhs, plhs, nrhs, prhs)'
+' int nlhs, nrhs;'
+' mxArray *plhs[]; mxArray *prhs[];'
+'{'
+' int *dims = mxGetDimensions(prhs[0]);'
+' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);'
+'}'
+],'mexfunction16.c');
+
+exec('builder.sce');
+exec('loader.sce');
+
+mexf16(rand(2,3,2))
+
+cd(my_current_directory);