freebsd-ports/games/stonesoup/files/patch-rltiles__Makefile
Pawel Pekala 87a9e4c1e7 - Update to version 0.13.0
- Allow staging
- Fix build on CURRENT

PR:		ports/182913
Submitted by:	maintainer
2013-10-30 21:54:57 +00:00

82 lines
2.4 KiB
Text

--- ./rltiles/Makefile.orig 2013-09-30 20:32:00.000000000 +0200
+++ ./rltiles/Makefile 2013-10-11 22:07:08.176890218 +0200
@@ -1,7 +1,7 @@
uname_S := $(shell uname -s)
ifneq (,$(findstring MINGW,$(uname_S)))
-LDFLAGS += -lmingw32
+L_LDFLAGS += -lmingw32
endif
# Note: since generation of tiles is done on the host, we don't care about
@@ -10,7 +10,7 @@
# Also, cross-compilation with no system libraries for host rather than target
# is not supported. If host=target, contribs are enough.
-CFLAGS := -O2 -g -Wall -Wextra -Wno-parentheses -Wno-unused-parameter
+L_CFLAGS := $(CFLAGS)
ifdef ANDROID
CXXFLAGS :=
@@ -35,24 +35,24 @@
PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a
endif
- CFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE)
- LDFLAGS += $(SDL_LDFLAGS) $(PNG_LIB)
+ L_CFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE)
+ L_LDFLAGS += $(LDFLAGS) $(SDL_LDFLAGS) $(PNG_LIB)
- CFLAGS += -DUSE_TILE
+ L_CFLAGS += -DUSE_TILE
endif
ifdef DEBUG
-CFLAGS += -O0 -DDEBUG -ggdb
+L_CFLAGS += -O0 -DDEBUG -ggdb
endif
ifneq (,$(findstring MINGW,$(uname_S)))
-LDFLAGS += -lgdi32 -lwinmm
+L_LDFLAGS += -lgdi32 -lwinmm
endif
ifeq ($(uname_S),Darwin)
-LDFLAGS += -framework AppKit -framework AudioUnit -framework Carbon -framework IOKit -framework OpenGL
+L_LDFLAGS += -framework AppKit -framework AudioUnit -framework Carbon -framework IOKit -framework OpenGL
endif
ifeq ($(uname_S),Linux)
-LDFLAGS += -ldl -lpthread
+L_LDFLAGS += -ldl -lpthread
endif
# Attempt to use a full compiler name, to make
@@ -64,7 +64,7 @@
ifeq ($(shell which $(LMACH)gcc > /dev/null 2> /dev/null && echo "Yes"),)
LMACH :=
endif
-HOSTCXX ?= $(LMACH)g++
+HOSTCXX ?= $(LMACH)$(CXX)
DELETE = rm -f
@@ -109,7 +109,7 @@
$(QUIET_GEN)$(TILEGEN) -c $<
# CFLAGS difference check
-TRACK_CFLAGS = $(subst ','\'',$(HOSTCXX) $(CFLAGS)) # (stray ' for highlights)
+TRACK_CFLAGS = $(subst ','\'',$(HOSTCXX) $(L_CFLAGS)) # (stray ' for highlights)
.cflags: .force-cflags
@FLAGS='$(TRACK_CFLAGS)'; \
@@ -138,9 +138,9 @@
distclean: clean
%.o: %.cc .cflags
- $(QUIET_HOSTCXX)$(HOSTCXX) $(CFLAGS) -MMD -c $< -o $@
+ $(QUIET_HOSTCXX)$(HOSTCXX) $(L_CFLAGS) -MMD -c $< -o $@
$(TILEGEN): $(OBJECTS)
- $(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(LDFLAGS)
+ $(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(L_LDFLAGS)
.PHONY: all clean distclean