3 BUILD_DATE:=$(shell date '+%Y-%m-%d')
4 BUILD_COMMIT:=$(shell if git rev-parse >/dev/null 2>/dev/null ; then git describe --always --tags ; else echo '<unknown>' ; fi)
6 CXXFLAGS=-O2 -Wall -Wextra -Wno-parentheses -std=gnu++11 -g
10 MODULES=paperjam pdf-tools parse cmds pdf
11 OBJS=$(addsuffix .o, $(MODULES))
14 $(LD) -o $@ $^ $(LDLIBS)
15 paperjam: LDLIBS += -lqpdf -lpaper
18 $(OBJS): jam.h pdf-tools.h
20 paperjam.o: CXXFLAGS += -DVERSION='"$(VERSION)"' -DYEAR='"$(YEAR)"' -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_COMMIT='"$(BUILD_COMMIT)"'
29 git archive --format=tar --prefix=paperjam-$(VERSION)/ HEAD | gzip >paperjam-$(VERSION).tar.gz
30 rsync paperjam-$(VERSION).tar.gz atrey:ftp/linux/
31 ssh jw 'cd web && bin/release-prog paperjam $(VERSION)'
33 .PHONY: all clean release