changeset 182:12061ea45c26

build_mingw32.sh: build tarball for mingw64
author Paul Brossier <piem@piem.org>
date Mon, 13 Feb 2017 18:44:16 +0100
parents 06a5ea89982f
children 233c3c1c5cda
files build_mingw64.sh scripts/get_deps_mingw64.sh
diffstat 2 files changed, 72 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build_mingw64.sh	Mon Feb 13 18:44:16 2017 +0100
@@ -0,0 +1,52 @@
+#! /bin/sh
+
+# cross compile vamp-aubio-plugins using mingw32 toolchain
+
+. $PWD/VERSION
+VAMP_AUBIO_VERSION=$VAMP_AUBIO_MAJOR_VERSION.$VAMP_AUBIO_MINOR_VERSION.$VAMP_AUBIO_PATCH_VERSION$VAMP_AUBIO_VERSION_STATUS
+
+set -e
+set -x
+
+if [ "$1" = 'dist' ]
+then
+  rm -rf contrib/
+fi
+
+export CFLAGS="-Os"
+#export CC="i586-mingw32msvc-gcc"
+#export CXX="i586-mingw32msvc-g++"
+export CC="x86_64-w64-mingw32-gcc"
+export CXX="x86_64-w64-mingw32-g++"
+export STRIP="x86_64-w64-mingw32-strip"
+export WAFOPTS="--with-target-platform=win64 --disable-sndfile --disable-samplerate --disable-jack --disable-avcodec --notests"
+
+# get waf
+./scripts/get_waf.sh
+
+# fetch Vamp SDK
+./scripts/get_deps_mingw64.sh
+
+# fetch and build aubio
+./scripts/get_aubio.sh
+
+# configure and build plugin
+./waf configure
+
+./waf build -v
+
+# system-wide installation
+#./waf install --destdir=dist-win
+
+if [ "$1" = 'dist' ]
+then
+  DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-win64
+  rm -rf $DESTDIR $DESTDIR.zip
+  mkdir $DESTDIR
+  cp -prv contrib/aubio*/README.md $DESTDIR/README.aubio.md
+  cp -prv README.md $DESTDIR
+  cp -prv build/vamp-aubio.dll $DESTDIR
+  $STRIP $DESTDIR/vamp-aubio.dll
+  cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR
+  zip -r $DESTDIR.zip $DESTDIR
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/get_deps_mingw64.sh	Mon Feb 13 18:44:16 2017 +0100
@@ -0,0 +1,20 @@
+#! /bin/bash
+
+
+source scripts/resources
+
+#rm -rf contrib/
+mkdir -p contrib/
+
+pushd contrib
+
+for p in $VAMP_PLUGIN_SDK #$VAMP_PLUGIN_SDK_MINGW
+do
+  fetch $p
+done
+
+pushd vamp-plugin-sdk-2.6
+make -f build/Makefile.mingw64
+popd
+
+popd