summaryrefslogtreecommitdiff
path: root/scripts/build_mingw
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build_mingw')
-rwxr-xr-xscripts/build_mingw28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/build_mingw b/scripts/build_mingw
new file mode 100755
index 0000000..8c02894
--- /dev/null
+++ b/scripts/build_mingw
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+# This script cross compiles aubio for windows using mingw, both for 32 and 64
+# bits. Built binaries will be placed in ./dist-win32 and ./dist-win64.
+
+# On debian or ubuntu, you will want to 'apt-get install gcc-mingw-w64'
+
+set -e
+set -x
+
+WAFOPTS="-v --disable-avcodec --disable-samplerate --disable-jack --disable-sndfile"
+
+[ -d dist-win32 ] && rm -rf dist-win32
+[ -d dist-win64 ] && rm -rf dist-win64
+
+CFLAGS="-Os" \
+ LDFLAGS="" \
+ CC=x86_64-w64-mingw32-gcc \
+ ./waf distclean configure build install --destdir=$PWD/dist-win64 \
+ --testcmd="echo %s" \
+ $WAFOPTS --with-target-platform=win64
+
+CFLAGS="-Os" \
+ LDFLAGS="" \
+ CC=i686-w64-mingw32-gcc \
+ ./waf distclean configure build install --destdir=$PWD/dist-win32 \
+ --testcmd="echo %s" \
+ $WAFOPTS --with-target-platform=win32