X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=Makefile;h=485ee61806a4d45e295b1db5c696df1c621e17a5;hb=public;hp=d0c91a2e390bbdf6b3d711168388958e9ede5956;hpb=85112632cec4d792fe298834b0d8ea9d38256135;p=hachu.git diff --git a/Makefile b/Makefile index d0c91a2..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 @@ -27,16 +28,13 @@ install: ${ALL} ${srcdir}/svg/* cp -u ${srcdir}/hachu.eng $(DESTDIR)/usr/share/games/plugins/xboard hachu.6.gz: hachu.pod - pod2man -s 6 hachu.pod > hachu.man - cp hachu.man hachu.6 - rm -f hachu.6.gz - gzip hachu.6 + pod2man -s 6 hachu.pod | gzip -9n > hachu.6.gz clean: - rm -f ${ALL} + rm -f ${ALL} *.o dist-clean: - rm -f ${ALL} *~ chu/*~ *.man md5sums + rm -f ${ALL} *~ chu/*~ md5sums dist: install -d -m0755 HaChu @@ -53,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