X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=blobdiff_plain;f=Makefile;h=d77636adf73d408ad8cda23845056a251b0fa56c;hp=6adf5c6b52b9518b6e62ae0b5325ab308f45a418;hb=HEAD;hpb=f8e0474483b999f156e24ee5a161fad03d4f04a3 diff --git a/Makefile b/Makefile index 6adf5c6..d77636a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ srcdir = . +prefix = /usr/local +exec_prefix=$(prefix) +bindir=$(exec_prefix)/bin +datadir=$(prefix)/share CC?=gcc CFLAGS?= -O2 -s @@ -10,13 +14,14 @@ ALL= uci2wb uci2wb.6.gz all: ${ALL} uci2wb: UCI2WB.c - $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb + $(CC) $(CFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb $(LDFLAGS) install: ${ALL} - install -d -m0755 $(DESTDIR)/usr/games - cp -u ${srcdir}/uci2wb $(DESTDIR)/usr/games - install -d -m0755 $(DESTDIR)/usr/share/man/man6 - cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)/usr/share/man/man6 + install -d -m0755 $(DESTDIR)$(bindir) + cp -u ${srcdir}/uci2wb $(DESTDIR)$(bindir) + install -d -m0755 $(DESTDIR)$(datadir)/man/man6 + cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)$(datadir)/man/man6 + xboard -ncp -uxiAdapter {uci2wb -%variant "%fcp" "%fd"} -autoClose || true uci2wb.6.gz: uci2wb.pod pod2man -s 6 uci2wb.pod | gzip -9n > uci2wb.6.gz @@ -30,7 +35,7 @@ dist-clean: dist: install -d -m0755 UCI2WB rm -f uci2wb.tar uci2wb.tar.gz - cp UCI2WB.c uci2wb.pod Makefile README.txt UCI2WB + cp UCI2WB.c UCI2WB.rc rosetta.ico uci2wb.pod Makefile README.txt UCI2WB md5sum UCI2WB/* > UCI2WB/md5sums tar -cvvf uci2wb-$(VERSION).tar UCI2WB gzip uci2wb-$(VERSION).tar @@ -38,6 +43,6 @@ dist: rmdir UCI2WB uninstall: - rm -f $(DESTDIR)/usr/share/man/man6/uci2wb.6.gz - rm -f $(DESTDIR)/usr/games/uci2wb + rm -f $(DESTDIR)$(datadir)/man/man6/uci2wb.6.gz + rm -f $(DESTDIR)$(bindir)/uci2wb