From: Martin Mares Date: Sat, 28 Apr 2018 19:29:19 +0000 (+0200) Subject: Makefile: Added install target X-Git-Tag: v1.0~4 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e8a4602b9792c5caf19e91f1800fbfd533447244;p=paperjam.git Makefile: Added install target --- diff --git a/Makefile b/Makefile index dd2ec24..5fea59e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,10 @@ YEAR=2018 BUILD_DATE:=$(shell date '+%Y-%m-%d') BUILD_COMMIT:=$(shell if git rev-parse >/dev/null 2>/dev/null ; then git describe --always --tags ; else echo '' ; fi) +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/share/man + CXXFLAGS=-O2 -Wall -Wextra -Wno-parentheses -std=gnu++11 -g all: paperjam paperjam.1 paperjam.1.html @@ -31,6 +35,11 @@ clean: rm -f *.o rm -f paperjam +install: all + install -d $(BINDIR) $(MANDIR)/man1 + install -s paperjam $(BINDIR)/ + install -m 644 paperjam.1 $(MANDIR)/man1/ + release: git tag v$(VERSION) git push --tags