diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-24 18:16:49 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-24 20:56:33 -0700 |
commit | 098417848a2a31b3f712cd7c645927dfb131aac9 (patch) | |
tree | 0954dccbd589f87029eec13d3ae9f7b64e23dc5c | |
parent | db8d7cf3b53119a5789c73b7f1944bbe0ab43cb9 (diff) | |
download | crawl-ref-098417848a2a31b3f712cd7c645927dfb131aac9.tar.gz crawl-ref-098417848a2a31b3f712cd7c645927dfb131aac9.zip |
rltiles/makefile: fix MinGW build
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
-rw-r--r-- | crawl-ref/source/rltiles/makefile.unix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/rltiles/makefile.unix b/crawl-ref/source/rltiles/makefile.unix index 85ecf07f4d..9cc25f9a1e 100644 --- a/crawl-ref/source/rltiles/makefile.unix +++ b/crawl-ref/source/rltiles/makefile.unix @@ -1,17 +1,20 @@ -SDLCONFIG := $(shell which sdl-config 2> /dev/null) -ifeq ($(SDLCONFIG),) -SDLCONFIG := $(shell pwd)/../contrib/install/bin/sdl-config +ifneq (,$(findstring MINGW,$(uname_S))) +LDFLAGS += -lmingw32 endif -SDL_CFLAGS := $(shell $(SDLCONFIG) --cflags 2> /dev/null) -SDL_LDFLAGS := $(shell $(SDLCONFIG) --libs 2> /dev/null) +SDL_CFLAGS := -I../contrib/install/include/SDL $(shell pkg-config sdl --cflags 2> /dev/null) +SDL_LDFLAGS := $(shell pkg-config sdl --libs 2> /dev/null || echo "-lSDL -lSDLmain") PNG_INCLUDE := $(shell pkg-config libpng --cflags 2> /dev/null) PNG_LIB := $(shell pkg-config libpng --libs 2> /dev/null || echo "-lpng -lz") -CFLAGS := $(SDL_CFLAGS) $(PNG_INCLUDE) -LDFLAGS := $(SDL_LDFLAGS) -lSDL_image $(PNG_LIB) +CFLAGS := -I../contrib/install/include $(SDL_CFLAGS) $(PNG_INCLUDE) +LDFLAGS += -L../contrib/install/lib $(SDL_LDFLAGS) -lSDL_image $(PNG_LIB) + +ifneq (,$(findstring MINGW,$(uname_S))) +LDFLAGS += -lgdi32 -lwinmm +endif # Attempt to use a full compiler name, to make # distcc builds work nicely. |