diff options
author | Tim Angus <tim.angus@roslin.ed.ac.uk> | 2013-03-21 15:47:55 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-03-22 18:52:18 +0000 |
commit | e21451f44ce38a2ee6e3d525ef4f7e314092a40e (patch) | |
tree | 837f4b9d6ff366d46965445c31ed34233cc174a6 | |
parent | 7211118efcca3f40ae863be2a764be546098b624 (diff) |
Merge mingw build scripts
-rwxr-xr-x | cross-make-mingw.sh | 13 | ||||
-rwxr-xr-x | cross-make-mingw64.sh | 35 |
2 files changed, 11 insertions, 37 deletions
diff --git a/cross-make-mingw.sh b/cross-make-mingw.sh index 619d9f71..cebf85cd 100755 --- a/cross-make-mingw.sh +++ b/cross-make-mingw.sh @@ -2,7 +2,17 @@ # Note: This works in Linux and cygwin -CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32"; +if [ "$ARCH" = "x86_64" ]; +then + CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32" +else + CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32" +fi + +if [ "$CC" = "cc" ] || [ "$CC" = "gcc" ]; +then + CC= +fi if [ "X$CC" = "X" ]; then for check in $CMD_PREFIX; do @@ -30,6 +40,5 @@ if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then fi export PLATFORM=mingw32 -export ARCH=x86 exec make $* diff --git a/cross-make-mingw64.sh b/cross-make-mingw64.sh deleted file mode 100755 index 778e20d4..00000000 --- a/cross-make-mingw64.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Note: This works in Linux and cygwin - -CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32"; - -if [ "X$CC" = "X" ]; then - for check in $CMD_PREFIX; do - full_check="${check}-gcc" - which "$full_check" > /dev/null 2>&1 - if [ "$?" = "0" ]; then - export CC="$full_check" - fi - done -fi - -if [ "X$WINDRES" = "X" ]; then - for check in $CMD_PREFIX; do - full_check="${check}-windres" - which "$full_check" > /dev/null 2>&1 - if [ "$?" = "0" ]; then - export WINDRES="$full_check" - fi - done -fi - -if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then - echo "Error: Must define or find WINDRES and CC" - exit 1 -fi - -export PLATFORM=mingw32 -export ARCH=x86_64 - -exec make $* |