X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/tweak/blobdiff_plain/d28a47991fa3bd3af743ed37cd840e17eecd441c..2a70072129b9e56f6de9f29eb5b035947337d388:/Makefile diff --git a/Makefile b/Makefile index a2286ec..3f35cd5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,10 @@ LINK := gcc LFLAGS := LIBS := +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man/man1 + TWEAK := main.o keytab.o actions.o search.o rcfile.o buffer.o btree.o ifeq ($(SLANG),yes) @@ -34,12 +38,18 @@ btree.html: btree.but # command like `make release VERSION=3.00'. release: tweak.1 btree.html mkdir -p reltmp/tweak-$(VERSION) - for i in *.c *.h *.but tweak.1 btree.html Makefile; do \ + for i in LICENCE *.c *.h *.but tweak.1 btree.html Makefile; do \ ln -s ../../$$i reltmp/tweak-$(VERSION); \ done (cd reltmp; tar chzvf ../tweak-$(VERSION).tar.gz tweak-$(VERSION)) rm -rf reltmp +install: tweak tweak.1 + mkdir -p $(BINDIR) + install tweak $(BINDIR)/tweak + mkdir -p $(MANDIR) + install -m 0644 tweak.1 $(MANDIR)/tweak.1 + clean: rm -f *.o tweak tweak.1 btree.html