From 3c06bd2417b0a8d9df6f8141772783c19a1c65c3 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Mon, 20 Oct 2014 11:10:54 +0200 Subject: [PATCH] Add support for destdir to select where to install HaChu --- Makefile | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 792578e..1ff6163 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ srcdir = . CC?=gcc CFLAGS?= -O2 -s +prefix=/usr DATADIR=`xboard --show-config Datadir` ALL= hachu hachu.6.gz @@ -13,10 +14,10 @@ hachu: hachu.c $(CC) $(CFLAGS) $(LDFLAGS) hachu.c -o hachu install: ${ALL} ${srcdir}/svg/* - install -d -m0755 $(DESTDIR)/usr/games - cp -u ${srcdir}/hachu $(DESTDIR)/usr/games - install -d -m0755 $(DESTDIR)/usr/share/man/man6 - cp -u ${srcdir}/hachu.6.gz $(DESTDIR)/usr/share/man/man6 + install -d -m0755 $(DESTDIR)$(prefix)/games + cp -u ${srcdir}/hachu $(DESTDIR)$(prefix)/games + install -d -m0755 $(DESTDIR)$(prefix)/share/man/man6 + cp -u ${srcdir}/hachu.6.gz $(DESTDIR)$(prefix)/share/man/man6 install -d -m0755 $(DESTDIR)$(DATADIR)/themes/chu cp -u ${srcdir}/svg/*.svg $(DESTDIR)$(DATADIR)/themes/chu install -d -m0755 $(DESTDIR)$(DATADIR)/themes/conf @@ -50,8 +51,8 @@ dist: rmdir HaChu uninstall: - rm -f $(DESTDIR)/usr/share/man/man6/hachu.6.gz - rm -f $(DESTDIR)/usr/games/hachu + rm -f $(DESTDIR)$(prefix)/share/man/man6/hachu.6.gz + rm -f $(DESTDIR)$(prefix)/games/hachu rm -f $(DESTDIR)/usr/share/games/plugins/logos/hachu.png rm -f $(DESTDIR)/usr/share/games/plugins/xboard/hachu.eng -- 1.7.0.4