X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=Makefile;h=9f5f829904a34acfe632d8ad1369c1ba347d00e1;hb=346212e98d751f6103a9ef076e1b0755e9d06b1a;hp=dd2ec24b528ede12d813a93104d52c5eeb1f0139;hpb=bd6101e9469f271e7e61acff7b74a6fcf13aa21e;p=paperjam.git diff --git a/Makefile b/Makefile index dd2ec24..9f5f829 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ -VERSION=0.1 +VERSION=1.1 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) +DESTDIR= +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 @@ -30,12 +35,20 @@ paperjam.1.html: paperjam.1.txt paperjam.1 clean: rm -f *.o rm -f paperjam + rm -f paperjam.1 paperjam.1.html docbook-xsl.css + rm -f *.tar.gz + +install: all + install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 + install -s paperjam $(DESTDIR)$(BINDIR)/ + install -m 644 paperjam.1 $(DESTDIR)$(MANDIR)/man1/ release: git tag v$(VERSION) git push --tags git archive --format=tar --prefix=paperjam-$(VERSION)/ HEAD | gzip >paperjam-$(VERSION).tar.gz - rsync paperjam-$(VERSION).tar.gz atrey:ftp/linux/ + rsync paperjam-$(VERSION).tar.gz jw:/home/ftp/pub/mj/linux/ + rsync paperjam.1.html jw:web/static/sw/paperjam/ ssh jw 'cd web && bin/release-prog paperjam $(VERSION)' .PHONY: all clean release