[quake3-commits] r2095 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jul 18 18:27:25 EDT 2011


Author: thilo
Date: 2011-07-18 18:27:25 -0400 (Mon, 18 Jul 2011)
New Revision: 2095

Modified:
   trunk/cross-make-mingw.sh
   trunk/cross-make-mingw64.sh
Log:
Bug 5084 - [patch] add support for Debian cross compiling, by q3urt.undead at gmail.com


Modified: trunk/cross-make-mingw.sh
===================================================================
--- trunk/cross-make-mingw.sh	2011-07-18 22:04:22 UTC (rev 2094)
+++ trunk/cross-make-mingw.sh	2011-07-18 22:27:25 UTC (rev 2095)
@@ -1,15 +1,30 @@
 #!/bin/sh
 
-if [ !$CC ]
-then
-  export CC=i586-mingw32msvc-gcc
+CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32";
+
+if [ "X$CC" = "X" ]; then
+    for check in $CMD_PREFIX; do
+        full_check="${check}-gcc"
+	if [ ! $(which "$full_check") = "" ]; then
+	    export CC="$full_check"
+	fi
+    done
 fi
 
-if [ !$WINDRES ]
-then
-  export WINDRES=i586-mingw32msvc-windres
+if [ "X$WINDRES" = "X" ]; then
+    for check in $CMD_PREFIX; do
+        full_check="${check}-windres"
+	if [ ! $(which "$full_check") = "" ]; 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
 

Modified: trunk/cross-make-mingw64.sh
===================================================================
--- trunk/cross-make-mingw64.sh	2011-07-18 22:04:22 UTC (rev 2094)
+++ trunk/cross-make-mingw64.sh	2011-07-18 22:27:25 UTC (rev 2095)
@@ -1,15 +1,30 @@
 #!/bin/sh
 
-if [ !$CC ]
-then
-  export CC=amd64-mingw32msvc-gcc
+CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32";
+
+if [ "X$CC" = "X" ]; then
+    for check in $CMD_PREFIX; do
+        full_check="${check}-gcc"
+	if [ ! $(which "$full_check") = "" ]; then
+	    export CC="$full_check"
+	fi
+    done
 fi
 
-if [ !$WINDRES ]
-then
-  export WINDRES=amd64-mingw32msvc-windres
+if [ "X$WINDRES" = "X" ]; then
+    for check in $CMD_PREFIX; do
+        full_check="${check}-windres"
+	if [ ! $(which "$full_check") = "" ]; 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=x64
 



More information about the quake3-commits mailing list