diff options
Diffstat (limited to 'crawl-ref/source/rltiles/makefile.unix')
-rw-r--r-- | crawl-ref/source/rltiles/makefile.unix | 19 |
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) |