X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=Makefile;h=485ee61806a4d45e295b1db5c696df1c621e17a5;hb=public;hp=9320b0f6c4025960666237c485c3bfc4f3e86251;hpb=6c72cc8ce61c02978073db629948400ba594cbab;p=hachu.git diff --git a/Makefile b/Makefile index 9320b0f..485ee61 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ srcdir = . CC?=gcc CFLAGS?= -O2 -s +prefix=/usr/local 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 @@ -30,7 +31,7 @@ hachu.6.gz: hachu.pod pod2man -s 6 hachu.pod | gzip -9n > hachu.6.gz clean: - rm -f ${ALL} + rm -f ${ALL} *.o dist-clean: rm -f ${ALL} *~ chu/*~ md5sums @@ -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