From 37d39dff8f3762ea2b9a03bb8a8b66f7b055327c Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Fri, 16 Oct 2009 08:41:44 -0700 Subject: 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 --- crawl-ref/source/rltiles/makefile.unix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/rltiles/makefile.unix') 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) -- cgit v1.2.3-54-g00ecf