freebsd-ports/games/xorgramana/files/patch-Makefile
Dmitry Marakasov cad7bd51e8 XorGramana is a maze based logical puzzle game where you must escape
each maze by arranging letters to form pre-defined words. XorGramana
is based upon the game Xor which appeared in the early 1990's on
8bit home computers. XorGramana implements a version of Xor too.

WWW:	http://www.jwm-art.net/XorGramana/
2009-04-02 23:45:10 +00:00

40 lines
1 KiB
Text

--- Makefile.orig 2009-04-01 17:46:11.000000000 +0400
+++ Makefile 2009-04-02 20:31:54.000000000 +0400
@@ -1,13 +1,13 @@
-PREFIX=/usr/local/
-BINDIR=$(PREFIX)bin/
-SHAREDIR=$(PREFIX)share/XorGramana/
-MAPDIR=$(SHAREDIR)maps/
+PREFIX?=/usr/local
+BINDIR=$(PREFIX)/bin
+SHAREDIR=$(PREFIX)/share/xorgramana/data
+MAPDIR=$(SHAREDIR)/maps
-SDL_CFLAGS := $(shell sdl-config --cflags)
-SDL_LDFLAGS := $(shell sdl-config --libs)
+SDL_CFLAGS := $(shell ${SDL_CONFIG} --cflags)
+SDL_LDFLAGS := $(shell ${SDL_CONFIG} --libs)
-CFLAGS := -Wall -g2 $(SDL_CFLAGS) -lGLU -lSDL_image -DDATADIR=\"$(SHAREDIR)\"
+CFLAGS += -Wall $(SDL_CFLAGS) -DDATADIR=\"$(SHAREDIR)\"
# -DPLAYER_XY_DEBUG
# -DMAP_DEBUG
@@ -23,14 +23,14 @@
PROG := xorgramana
-CC := gcc
+CC ?= gcc
SRC := $(wildcard *.c)
OBJS := $(patsubst %.c, %.o, $(SRC))
HEADERS:= $(wildcard *.h)
$(PROG): $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(SDL_LDFLAGS)
+ $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(SDL_LDFLAGS) -lGLU -lSDL_image
%.o : %.c $(HEADERS)
$(CC) $(CFLAGS) -c $<