summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-03-22 14:47:37 +0000
committerTim Angus <tim@ngus.net>2013-03-22 19:02:27 +0000
commit0ebeee161f218861892e1b17caf885c58fbdf03c (patch)
treeb1a6d710749228cbcd5e73091a065be8acb89ddb /Makefile
parentc26a4cb3f82692ddc943f891c41d72e3cafce211 (diff)
Fix it more
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index ea3cdb0f..48a1ba9a 100644
--- a/Makefile
+++ b/Makefile
@@ -468,22 +468,24 @@ ifeq ($(PLATFORM),mingw32)
ifeq ($(CROSS_COMPILING),1)
# If CC is already set to something generic, we probably want to use
# something more specific
- ifneq ($(findstring $(CC),cc gcc),)
+ ifneq ($(findstring $(strip $(CC)),cc gcc),)
CC=
endif
- # We need to figure out the correct compiler
- ifeq ($(CC),)
- ifeq ($(ARCH),x86_64)
- MINGW_PREFIXES=amd64-mingw32msvc x86_64-w64-mingw32
- endif
- ifeq ($(ARCH),x86)
- MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32
- endif
+ # We need to figure out the correct gcc and windres
+ ifeq ($(ARCH),x86_64)
+ MINGW_PREFIXES=amd64-mingw32msvc x86_64-w64-mingw32
+ endif
+ ifeq ($(ARCH),x86)
+ MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32
+ endif
+ ifndef CC
CC=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-gcc)))
+ endif
+ ifndef WINDRES
WINDRES=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-windres)))
endif