From 2d5d8a253603aaf20e6187107c6c21c85e3e70d1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 8 Oct 2011 14:45:54 +0200 Subject: [PATCH] Slight improvements in Makefile On request the Makefile is made more BSD friendly, and now also uses DESTDIR in constructing the name of the ini files. --- Makefile | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8f259a8..ef2cc0a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ srcdir = . -CC=gcc -CFLAGS += -O2 +CC?=gcc +CFLAGS?= -O2 -s +INI_F?=$(DESTDIR)/usr/share/games/fairymax/fmax.ini +INI_Q?=$(DESTDIR)/usr/share/games/fairymax/qmax.ini ALL= fairymax shamax maxqi fairymax.6.gz @@ -9,13 +11,13 @@ ALL= fairymax shamax maxqi fairymax.6.gz all: ${ALL} fairymax: fairymax.c - $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/fmax.ini\" fairymax.c -o fairymax + $(CC) $(CFLAGS) -DINI_FILE=\"${INI_F}\" fairymax.c -o fairymax shamax: fairymax.c - $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/fmax.ini\" -DSHATRANJ fairymax.c -o shamax + $(CC) $(CFLAGS) -DINI_FILE=\"${INI_F}\" -DSHATRANJ fairymax.c -o shamax maxqi: maxqi.c - $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/qmax.ini\" maxqi.c -o maxqi + $(CC) $(CFLAGS) -DINI_FILE=\"${INI_Q}\" maxqi.c -o maxqi install: ${ALL} ${srcdir}/data/* cp -u ${srcdir}/fairymax $(DESTDIR)/usr/games -- 1.7.0.4