[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Yves Renard |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Sun, 25 Jun 2017 09:12:07 -0400 (EDT) |
branch: devel-yves
commit a9d67a82cdaf65cd411484d51110b6ff03f8872b
Author: Yves Renard <address@hidden>
Date: Sun Jun 25 14:27:11 2017 +0200
small configurations adaptations
---
.gitignore | 1 +
bin/extract_doc | 2 +-
configure.ac | 25 +++++++++++++++++++++++--
interface/src/matlab/Makefile.am | 14 +++++++++-----
interface/src/python/Makefile.am | 2 +-
interface/src/python/setup.py.in | 8 ++++----
6 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index faa78e1..dafc016 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.log
*.lo
*.la
+*.tar.gz
.deps
.libs
*.trs
diff --git a/bin/extract_doc b/bin/extract_doc
index afdff9e..0dedb3e 100755
--- a/bin/extract_doc
+++ b/bin/extract_doc
@@ -466,7 +466,7 @@ option = sys.argv[2]
# List the filenames and extract object and command names.
#
-fl = os.popen('(cd ' + directory + ' ; ls gf_*.cc)');
+fl = os.popen('sh -c "(cd ' + directory + ' ; ls gf_*.cc)"');
lines = fl.readlines();
fl.close()
objects = set()
diff --git a/configure.ac b/configure.ac
index 74e1774..6525491 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,6 +435,9 @@ if test x$usesuperlu = xYES; then
*apple*)
SUPERLU_LIBS="../$SUPERLU_SRC/libsuperlu.la"
;;
+ *mingw*)
+ SUPERLU_LIBS="../$SUPERLU_SRC/.libs/libsuperlu.a"
+ ;;
*)
SUPERLU_LIBS="`readlink -f .`/$SUPERLU_SRC/libsuperlu.la"
;;
@@ -457,7 +460,7 @@ else
])
SUPERLU_LIBS="-lsuperlu"
- LIBS="$LIBS $SUPERLU_LIBS"
+ LIBS="$SUPERLU_LIBS $LIBS"
fi
AC_SUBST([SUPERLU_CPPFLAGS])
@@ -569,8 +572,11 @@ CPPFLAGS="$CPPFLAGS $MUMPSINC"
MUMPS_LIBS=""
case $host in
+ *mingw*)
+ MUMPS_SEQ_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common
-lmpiseq -lpord"
+ ;;
*apple*)
- MUMPS_SEQ_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmpiseq -lpord
-lmumps_common"
+ MUMPS_SEQ_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common
-lmpiseq -lpord"
;;
*)
MUMPS_SEQ_LIBS="-lsmumps_seq -ldmumps_seq -lcmumps_seq -lzmumps_seq"
@@ -983,6 +989,21 @@ if test x$usepython = xYES; then
fi
echo $PYTHON
+case $host in
+ *mingw*)
+ PYTHON_CC_ARG="--compiler=mingw32"
+ PYTHON_EXTRA_EXT_PARAM="extra_compile_args=[['-D MS_WIN64']]"
+ ;;
+ *)
+ PYTHON_CC_ARG=""
+ PYTHON_EXTRA_EXT_PARAM=""
+ ;;
+esac
+
+AC_SUBST(PYTHON_CC_ARG)
+AC_SUBST(PYTHON_EXTRA_EXT_PARAM)
+
+
if test "x$usepython" = "xYES"; then
echo "Building with python support (use --enable-python=no to disable it)"
diff --git a/interface/src/matlab/Makefile.am b/interface/src/matlab/Makefile.am
index 7f37dd7..5275b19 100644
--- a/interface/src/matlab/Makefile.am
+++ b/interface/src/matlab/Makefile.am
@@ -47,12 +47,16 @@ if USE_MINGW_MEX
#command extremely sensitive to any modification! fragile! keep the order of
the files
# (gfm_mex.c must be first, libstdc++.a must be last)
-#virer le -DMATLAB_RELEASE qui marche pas..
address@hidden@ \ the great windows mex does not understand -D ...
+
address@hidden@: gfm_mex.c gfm_common.c ../libgetfemint.la ../gfi_array.c
$(GETFEM_LIB_LA)
- $(GNUMEX) $(GNUMEXOPTS) -output gf_matlab -g @srcdir@/gfm_mex.c \
- @srcdir@/gfm_common.c address@hidden@ \
- @srcdir@/../gfi_array.c ../.libs/libgetfemint.a $(GETFEM_STATIC_LIB)
@STDCPP_STATICLIBS@
+ matlab -nodesktop -nosplash -nojvm -r "mex -v -output gf_matlab -g
./gfm_mex.c ./gfm_common.c -I. -I.. ./../gfi_array.c ../.libs/libgetfemint.a
../../../src/.libs/libgetfem.a ../../../superlu/.libs/libsuperlu.a
/msys/local/lib/libsmumps.a /msys/local/lib/libcmumps.a
/msys/local/lib/libdmumps.a /msys/local/lib/libzmumps.a
/msys/local/lib/libmumps_common.a /msys/local/lib/libmpiseq.a
/msys/local/lib/libpord.a /msys/local/lib/liblapack.a /msys/local/lib/libblas.a
/msys/local/lib/libqhull.a [...]
+
+
+# $(GNUMEX) $(GNUMEXOPTS) -output gf_matlab -g @srcdir@/gfm_mex.c \
+# @srcdir@/gfm_common.c address@hidden@ \
+# @srcdir@/../gfi_array.c ../.libs/libgetfemint.a $(GETFEM_STATIC_LIB)
@STDCPP_STATICLIBS@
+
+
# /c/MinGW/lib/libstdc++.a
# cmd /c "$mexbat -v -f c:/gnumex/mexopts.bat gfm_mex.c -output
gfm_rpc_mexint gfi*.o gf_*.o matlabint*.o
c:\\msys\\1.0\\home\\j\\getfem++-1.5\\src\\.libs\\libgetfem.a getfem_matlab.o
c:\\mingw\\lib\\libstdc++.a -Ic:\\msys\\1.0\\home\\j\\mingw_liboncrpc-4.0"
else !USE_MINGW_MEX
diff --git a/interface/src/python/Makefile.am b/interface/src/python/Makefile.am
index 7a6ae9c..d9fa72c 100644
--- a/interface/src/python/Makefile.am
+++ b/interface/src/python/Makefile.am
@@ -55,7 +55,7 @@ getfem_python_c.c : getfem_python.c
# ARCHFLAGS is set to empty to disable universal binaries with python 2.5 on
macos 10.5
_getfem.so: getfem_python_c.c ../libgetfemint.la $(GETFEM_LIB_LA)
touch _getfem.so && rm _getfem.so
- ARCHFLAGS="" CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py -v build
--build-temp . --build-base . --build-lib . --force
+ ARCHFLAGS="" CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py -v build
@PYTHON_CC_ARG@ --build-temp . --build-base . --build-lib . --force
#LDSHARED="$(CXX) -shared" ARCHFLAGS="" python setup.py -v build --build-temp
. --build-base . --build-lib . --force
diff --git a/interface/src/python/setup.py.in b/interface/src/python/setup.py.in
index 103e54d..2c0d467 100644
--- a/interface/src/python/setup.py.in
+++ b/interface/src/python/setup.py.in
@@ -61,10 +61,10 @@ libdirs = [l for l in libdirs if len(l.strip())]
#print "libdirs = ", libdirs
getfemmod = Extension('_getfem',
include_dirs =
['@top_srcdir@/src/getfem','../../../src/getfem','@srcdir@/..','@srcdir@',npy_include_dir],
- libraries = libnames,
#['getfemint','getfem','stdc++','m'],
- library_dirs = libdirs, #['../src/.libs',
-# '@GETFEM_STATICLIBS@'],
- sources = ['getfem_python_c.c'])
+ libraries = libnames,
+ library_dirs = libdirs,
+ sources = ['getfem_python_c.c'],
+ @PYTHON_EXTRA_EXT_PARAM@)
setup (name = 'getfem-interface',
license='LGPL',