Build system:

* always set -DNO_OPENMP
* fix for MEX/Octave with MinGW


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2945 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2009-09-17 16:35:33 +00:00
parent e83d44a063
commit 612cf9fa9b
3 changed files with 7 additions and 6 deletions

View File

@ -31,7 +31,7 @@ MATLAB_DEFS="-DNO_OPENMP" # Don't use OpenMP (flag used by S. Adjemian in some D
case ${MATLAB_ARCH} in
glnx86 | glnxa64)
MATLAB_DEFS="-D_GNU_SOURCE -DNDEBUG"
MATLAB_DEFS="$MATLAB_DEFS -D_GNU_SOURCE -DNDEBUG"
MATLAB_CFLAGS="-ansi -fexceptions -fPIC -pthread -g -O2"
MATLAB_CXXFLAGS="-ansi -fPIC -pthread -g -O2"
MATLAB_LDFLAGS="-shared -Wl,--version-script,$MATLAB/extern/lib/${MATLAB_ARCH}/mexFunction.map -Wl,--no-undefined -Wl,-rpath-link,$MATLAB/bin/${MATLAB_ARCH} -L$MATLAB/bin/${MATLAB_ARCH}"
@ -51,8 +51,8 @@ case ${MATLAB_ARCH} in
case ${host_os} in
*cygwin*)
# MATLAB can't use native Cygwin DLLs
MATLAB_CFLAGS="$MATLAB_CFLAGS -mno-cygwin"
MATLAB_CXXFLAGS="$MATLAB_CXXFLAGS -mno-cygwin"
MATLAB_CFLAGS="$MATLAB_CFLAGS -mno-cygwin"
MATLAB_CXXFLAGS="$MATLAB_CXXFLAGS -mno-cygwin"
;;
esac
ax_mexopts_ok="yes"

View File

@ -2,7 +2,7 @@ EXEEXT = .mex
CPPFLAGS = $(shell $(MKOCTFILE) -p CPPFLAGS)
DEFS = -DNO_BLAS_H -DNO_LAPACK_H -DOCTAVE
DEFS = -DNO_BLAS_H -DNO_LAPACK_H -DOCTAVE -DNO_OPENMP
CC = $(shell $(MKOCTFILE) -p CC)
CFLAGS = $(shell $(MKOCTFILE) -p CPICFLAG)
@ -21,6 +21,7 @@ LIBS += $(shell $(MKOCTFILE) -p BLAS_LIBS)
LIBS += $(shell $(MKOCTFILE) -p FFTW_LIBS)
LIBS += $(shell $(MKOCTFILE) -p LIBS)
LIBS += $(shell $(MKOCTFILE) -p FLIBS)
LIBS += $(shell $(MKOCTFILE) -p CXXLIBS) # Only used for Octave/MinGW
all-local:
cd $(top_srcdir)/mex/octave && \

View File

@ -1,6 +1,6 @@
% Build file for Dynare MEX Librairies for Octave
% Copyright (C) 2008 Dynare Team
% Copyright (C) 2008-2009 Dynare Team
%
% This file is part of Dynare.
%
@ -17,7 +17,7 @@
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
COMPILE_OPTIONS = '-DNO_BLAS_H -DNO_LAPACK_H -DOCTAVE';
COMPILE_OPTIONS = '-DNO_BLAS_H -DNO_LAPACK_H -DOCTAVE -DNO_OPENMP';
% Comment next line to suppress compilation debugging info
COMPILE_OPTIONS = [ COMPILE_OPTIONS ' -v' ];