From: stevenj Date: Tue, 1 Dec 2009 16:42:33 +0000 (-0500) Subject: add mingw build script X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f45ff0bbfb1eed852ba7bb5877234d7493d311bd;p=nlopt.git add mingw build script darcs-hash:20091201164233-c8de0-95bcaaa603da3f3c585f990af8612477c2e2333e.gz --- diff --git a/BUILD-MINGW.sh b/BUILD-MINGW.sh new file mode 100644 index 0000000..5350072 --- /dev/null +++ b/BUILD-MINGW.sh @@ -0,0 +1,36 @@ +./configure --prefix=`pwd`/mingw --host=i586-mingw32msvc --enable-shared --disable-static --without-matlab --without-octave && make -j4 && make install + +cd mingw/bin +for dll in *.dll; do + def=`basename $dll .dll`.def + echo "LIBRARY $dll" > $def + echo EXPORTS >> $def + i586-mingw32msvc-nm $dll | grep ' T _' | sed 's/.* T _//' | grep nlopt >> $def +done +cd ../.. + +perl -pi -e 's,^ * #define NLOPT_DLL,*/\n#define NLOPT_DLL\n/*,' mingw/include/nlopt.h + +cat > README-WINDOWS <> README-WINDOWS + +# grep -v "nlopt-util.h" octave/nlopt_minimize_constrained-mex.c > mingw/nlopt_minimize_constrained.c + +nlopt_vers=`grep PACKAGE_VERSION config.h |cut -d" " -f3 |tr -d \"` +zip=nlopt-${nlopt_vers}-dll.zip +rm -f $zip +zip -vj $zip mingw/bin/*.dll mingw/bin/*.exe octave/*.m mingw/nlopt_minimize_constrained.c +zip -vjgl $zip mingw/bin/*.def mingw/include/* README COPYING COPYRIGHT NEWS README-WINDOWS