Building the matlab interface of getfem 2.0 on Windows

                             ----------------------------

prerequisites:
 * install mingw 
 * install msys 
 * install gnumex , and use it to create a mexopts.bat file for mingw

Open the msys shell, untar and compile getfem++-2.0 ( ./configure && make ) (no need to do a "make install"), untar getfem-interface-2.0

ensure that you have mex.bat in the PATH. If necessary, add the path
to this file with:

> export PATH=/c/Program\ Files/MATLAB7/bin/win32:$PATH

Run ./configure in the getfem-interface-2.0 directory. I did use the
following options:

> ./configure  --enable-matlab=yes --with-getfem-config=/home/pommier/getfem++-2.0/getfem-config-notinstalled --with-toolbox-dir=$HOME/getfem_toolbox
> make

It should build fine until the "mex" stage. At this point the script
will fail, it is expected..  Build the mex by hand, in a windows shell
(not msys)
 - use short DOS names (i.e. c:\Progra~1\ etc) as the mex.bat of
 matlab does not handle spaces in file names
 - add the -D"MATLAB_RELEASE=14" option

I did use the following command to build the gf_matlab.dll:

> cd getfem-interface-2.0/src/matlab
> "c:/Progra~1/MATLAB704/bin/win32/mex.bat" -v -f c:/path/to/mexopts.bat -output gf_matlab -g -D"MATLAB_RELEASE=14" ./gfm_mex.c ./gfm_common.c -I. -I.. ./../gfi_array.c ../.libs/libgetfemint.a C:/msys/1.0/home/pommier/getfem++-2.0/src/.libs/libgetfem.a c:/MinGW/lib/libstdc++.a

finally go back in msys and type "make install". Everything is
available in c:\msys\1.0\home\yourlogin\getfem_toolbox


REMARKS:
  - When using the graphical interface of matlab, a number of
  intermediate messages of getfem get lost (for example those
  displaying the progression of iterative solvers). You may want to
  launch matlab from the msys shell instead of launching it from its
  shortcut. In that case, those intermediate messages from getfem will
  be displayed in the msys window.