summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/contrib/Makefile2
-rw-r--r--crawl-ref/source/makefile8
2 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/contrib/Makefile b/crawl-ref/source/contrib/Makefile
index 23b7936b87..328000a023 100644
--- a/crawl-ref/source/contrib/Makefile
+++ b/crawl-ref/source/contrib/Makefile
@@ -1,4 +1,4 @@
-uname_S := $(shell uname -s)
+uname_S ?= $(shell uname -s)
PREFIX:=$(shell pwd)/install
all: lua sqlite sdl sdl-image freetype libpng pcre zlib
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 0bdf29920b..ce208ff970 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -52,6 +52,7 @@ export CXX
export CFLAGS
export MAKEFLAGS
export CONFIGURE_FLAGS
+export uname_S
LIBPCRE := contrib/install/lib/libpcre.a
LIBSDL := contrib/install/lib/libSDL.a
@@ -78,6 +79,13 @@ ifdef CROSSHOST
NEED_STATIC = YesPlease
CONFIGURE_FLAGS += --host=$(CROSSHOST)
SDLCONFIG := $(shell pwd)/contrib/install/bin/sdl-config
+
+ # If needed, override uname_S so we get the appropriate
+ # things compiled.
+ ifneq (,$(findstring mingw,$(CROSSHOST)))
+ uname_S=MINGW32
+ endif
+
endif
ifneq (,$(findstring MINGW,$(uname_S)))
GAME = crawl.exe