From 4923d0e532c3c88f0e0cbf515305028911f0fdb9 Mon Sep 17 00:00:00 2001 From: stevenj Date: Fri, 20 Jul 2012 14:19:42 -0400 Subject: [PATCH] add mingw64 script Ignore-this: 69f407cb300bf42be51d72a4a1f96f53 darcs-hash:20120720181942-c8de0-4e8a55a7ffc4b46422ba190dc10f993562aa11de.gz --- BUILD-MINGW64.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 BUILD-MINGW64.sh diff --git a/BUILD-MINGW64.sh b/BUILD-MINGW64.sh new file mode 100755 index 0000000..c0ffc31 --- /dev/null +++ b/BUILD-MINGW64.sh @@ -0,0 +1,78 @@ +#!/bin/sh +set -e + +rm -rf mingw64 + +./configure --prefix=`pwd`/mingw64 --host=amd64-mingw32msvc --enable-shared --disable-static --without-matlab --without-octave --without-python --without-guile --without-threadlocal && make -j4 && make install + +cd mingw64/bin +for dll in *.dll; do + def=`basename $dll .dll`.def + echo "LIBRARY $dll" > $def + echo EXPORTS >> $def + amd64-mingw32msvc-nm $dll | grep ' T _' | sed 's/.* T _//' | egrep 'nlopt|nlo_' >> $def +done +cd ../.. + +perl -pi -e 's,^ * #define NLOPT_DLL,*/\n#define NLOPT_DLL\n/*,' mingw64/include/nlopt.h + +cat > README-WINDOWS <> README-WINDOWS + +# grep -v "nlopt-util.h" octave/nlopt_minimize_constrained-mex.c > mingw64/nlopt_minimize_constrained.c + +nlopt_vers=`grep PACKAGE_VERSION config.h |cut -d" " -f3 |tr -d \"` + +mkdir mingw64/matlab +cd octave +cp `grep 'MFILES =' Makefile.am | cut -d= -f2` ../mingw64/matlab +cp `grep 'm_DATA =' Makefile.am | cut -d\) -f2` ../mingw64/matlab +cp nlopt_optimize-mex.c ../mingw64/matlab/nlopt_optimize.c +cd .. + +mkdir mingw64/python +cp swig/nlopt.py swig/nlopt-python.cpp mingw64/python +cat > mingw64/python/setup.py <