[xiph-commits] r15816 - branches/theora-thusnelda/win32/xmingw32

giles at svn.xiph.org giles at svn.xiph.org
Sat Mar 21 00:12:45 PDT 2009


Author: giles
Date: 2009-03-21 00:12:44 -0700 (Sat, 21 Mar 2009)
New Revision: 15816

Modified:
   branches/theora-thusnelda/win32/xmingw32/Makefile
Log:
Try to detect the name of the mingw32 cross tools.

The mingw32 project provides a toolchain for cross compiling Windows
applications from linux. Unfortunately they are not installed with
any consistent executable prefix. Here we try several common prefixes
and use the first one that is in the path. If none is found, we end
up trying to use no-mingw32-gcc, which will hopefully offer a clue.

Corresponds to trunk r15429.


Modified: branches/theora-thusnelda/win32/xmingw32/Makefile
===================================================================
--- branches/theora-thusnelda/win32/xmingw32/Makefile	2009-03-21 07:05:44 UTC (rev 15815)
+++ branches/theora-thusnelda/win32/xmingw32/Makefile	2009-03-21 07:12:44 UTC (rev 15816)
@@ -31,11 +31,15 @@
 ENCODER_EXAMPLE_TARGET = encoder_example.exe
 
 # The compiler tools to use
-CC = i686-mingw32-gcc
-RC = i686-mingw32-windres
-DLLTOOL = i686-mingw32-dlltool
-LD = i686-mingw32-ld
-SDLCONFIG = i686-mingw32-sdl-config
+# The is no standard mingw prefix, so try to guess
+MINGW_PREFIX := $(or $(strip $(foreach exeprefix, \
+	i686-mingw32 i586-mingw32msvc i386-mingw32 no-mingw32, \
+	$(if $(shell which $(exeprefix)-gcc), $(exeprefix) ))))
+CC = $(MINGW_PREFIX)-gcc
+RC = $(MINGW_PREFIX)-windres
+DLLTOOL = $(MINGW_PREFIX)-dlltool
+LD = $(MINGW_PREFIX)-ld
+SDLCONFIG = $(MINGW_PREFIX)-sdl-config
 # The command to use to generate dependency information
 MAKEDEPEND = ${CC} -MM
 #MAKEDEPEND = makedepend -f- -Y --



More information about the commits mailing list