Commit 16f256c5 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

build system: fix bug in build mex on mac

parent 0f12abbe
......@@ -66,15 +66,17 @@ case ${MATLAB_ARCH} in
MACOSX_DEPLOYMENT_TARGET='10.5'
if test "${MATLAB_ARCH}" = "maci"; then
ARCHS='i386'
MATLAB_FFLAGS=''
else
ARCHS='x86_64'
MATLAB_FFLAGS='-m64'
fi
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
MATLAB_CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions -O2"
MATLAB_LDFLAGS="-L$MATLAB/bin/${MATLAB_ARCH} -Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle -Wl,-exported_symbols_list,\$(top_srcdir)/mexFunction-MacOSX.map"
MATLAB_LIBS="-lmx -lmex -lmat -lstdc++ -lmwlapack"
MATLAB_CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -O2"
MATLAB_CXXFLAGS="-fexceptions -fbackslash -g -O2"
MATLAB_FFLAGS="-fexceptions $MATLAB_FFLAGS -fbackslash"
# Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.5], [MATLAB_LIBS="${MATLAB_LIBS} -lmwblas"])
ax_mexopts_ok="yes"
......
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