Commit 2c43941d authored by sebastien's avatar sebastien
Browse files

Build system: fix for MinGW 4.4

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3128 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 8bfc9762
......@@ -32,4 +32,4 @@ dist-hook: clean-local
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir)/mex/sources -name *.o`
rm -f $(distdir)/matlab/dynare_m$(EXEEXT)
$(MKDIR_P) $(distdir)/mex/2007a $(distdir)/mex/2007b $(distdir)/mex/2009a-64bit $(distdir)/mex/octave
$(MKDIR_P) $(distdir)/mex/matlab $(distdir)/mex/octave
......@@ -25,6 +25,13 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_PROG_CXX
AC_CANONICAL_HOST
case ${host_os} in
*mingw32*)
LDFLAGS="$LDFLAGS -static-libgcc" # On mingw32, we don't want dynamic libgcc
;;
esac
# Use C++ for testing headers
AC_LANG([C++])
......
......@@ -50,7 +50,7 @@ case ${MATLAB_ARCH} in
MATLAB_CFLAGS="-fexceptions -g -O2"
MATLAB_CXXFLAGS="-g -O2"
LIBLOC="$MATLAB/extern/lib/${MATLAB_ARCH}/microsoft"
MATLAB_LDFLAGS="-shared \$(top_srcdir)/mex.def"
MATLAB_LDFLAGS="-static-libgcc -shared \$(top_srcdir)/mex.def"
MATLAB_LIBS="$LIBLOC/libmex.lib $LIBLOC/libmx.lib $LIBLOC/libmwlapack.lib -lstdc++"
# Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.5], [MATLAB_LIBS="${MATLAB_LIBS} $LIBLOC/libmwblas.lib"])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment