summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/rltiles/makefile.unix
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-16 08:41:44 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-16 09:55:46 -0700
commit37d39dff8f3762ea2b9a03bb8a8b66f7b055327c (patch)
treea678593dac20dddeb1a84d48cdd7ecd02b9849f8 /crawl-ref/source/rltiles/makefile.unix
parent0a624bcd948148817226c9585db7ce16bf5cb599 (diff)
downloadcrawl-ref-37d39dff8f3762ea2b9a03bb8a8b66f7b055327c.tar.gz
crawl-ref-37d39dff8f3762ea2b9a03bb8a8b66f7b055327c.zip
makefiles & contribs: add support for MinGW tiles builds
Incredibly hairy to get this to work, largely because MinGW's GCC is picky about the link order, among other things. But now we have a working build! Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/rltiles/makefile.unix')
-rw-r--r--crawl-ref/source/rltiles/makefile.unix19
1 files changed, 12 insertions, 7 deletions
diff --git a/crawl-ref/source/rltiles/makefile.unix b/crawl-ref/source/rltiles/makefile.unix
index b64c673966..7db3c36823 100644
--- a/crawl-ref/source/rltiles/makefile.unix
+++ b/crawl-ref/source/rltiles/makefile.unix
@@ -18,14 +18,19 @@ LDFLAGS := -F/Library/Frameworks $(SDL_LDFLAGS) $(PNG_LDFLAGS)
else
-SDL_CFLAGS := $(shell sdl-config --cflags)
-SDL_LDFLAGS := $(shell sdl-config --libs)
+SDLCONFIG := $(shell which sdl-config 2> /dev/null)
+ifeq ($(SDLCONFIG),)
+SDLCONFIG := $(shell pwd)/contrib/install/bin/sdl-config
+endif
+
+SDL_CFLAGS := $(shell $(SDLCONFIG) --cflags 2> /dev/null)
+SDL_LDFLAGS := $(shell $(SDLCONFIG) --libs 2> /dev/null)
-PNG_INCLUDE := $(shell pkg-config libpng --cflags)
-PNG_LIB := $(shell pkg-config libpng --libs)
+PNG_INCLUDE := $(shell pkg-config libpng --cflags 2> /dev/null)
+PNG_LIB := $(shell pkg-config libpng --libs 2> /dev/null)
-CFLAGS := $(SDL_CFLAGS) $(PNG_INCLUDE)
-LDFLAGS := $(SDL_LDFLAGS) $(PNGLIB) -lSDL_image -lpng
+CFLAGS := -I../contrib/install/include $(SDL_CFLAGS) $(PNG_INCLUDE)
+LDFLAGS := -L../contrib/install/lib $(SDL_LDFLAGS) -lSDL_image $(PNG_LIB) -lz
endif
@@ -68,4 +73,4 @@ distclean: clean
$(QUIET_CXX)$(CXX) $(CFLAGS) -c $< -o $@
$(TILEGEN): $(OBJECTS)
- $(QUIET_LINK)$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
+ $(QUIET_LINK)$(CXX) $(OBJECTS) -o $@ $(LDFLAGS)