X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/8eb627705bcfb8aa2079d3c553621aa024d79819..e2da526db9f410194cbb67a8ec207545879939b5:/Makefile diff --git a/Makefile b/Makefile index a7ff69b..6d595f4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -PREFIX = $(HOME) +prefix = $(HOME) +bindir= $(prefix)/bin +mandir = $(prefix)/man +# DESTDIR= + LDLIBS = -lcurses CFLAGS = -Wall -O2 DFLAGS = -g -DDEBUG -Werror @@ -19,14 +23,15 @@ doc: $(DOCS) install: all for prog in $(PROGS); do \ - install $$prog $(PREFIX)/bin; \ + install $$prog $(DESTDIR)$(bindir); \ done install-doc: doc + mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 for doc in $(DOCS); do \ case "$$doc" in \ - *.1) install $$doc $(PREFIX)/man/man1 ;; \ - *.5) install $$doc $(PREFIX)/man/man5 ;; \ + *.1) install $$doc $(DESTDIR)$(mandir)/man1 ;; \ + *.5) install $$doc $(DESTDIR)$(mandir)/man5 ;; \ esac \ done @@ -37,6 +42,9 @@ clean: spell-check: aspell --lang=en --check tig.1.txt tigrc.5.txt manual.txt +strip: all + strip $(PROGS) + .PHONY: all all-debug doc install install-doc clean spell-check tig: tig.c