-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (38 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ifeq ($(shell uname), Darwin)
CC=clang
CXX=clang++
AR=ar
endif
.PHONY : all
all : PDFGitPolyglot.pdf
.PHONY : local-clean
local-clean :
rm -f PDFGitPolyglot.pdf article.pdf article.log article.aux *~ RazvodityeKrolikov_small.jpg kolskaya.pdf
.PHONY : clean
clean : git-submodule local-clean
$(MAKE) -C git clean
.PHONY : git-submodule
git-submodule :
git submodule init
git submodule update --recursive
git/configure : | git-submodule
$(MAKE) -C git configure
cd git && ./configure
git/git : | git/configure
$(MAKE) CC=$(CC) CXX=$(CXX) AR=$(AR) -C git
kolskaya.pdf : kolskaya.tex
pdflatex $<
article.pdf : article.tex RazvodityeKrolikov_small.jpg kolskaya.pdf
pdflatex article
pdflatex article
%_small.jpg : %.jpg
convert $< -define jpeg:extent=63kb $@
%_injected.pdf %.pdf.block_offsets : %.pdf fix_oversize_pdf.py
python fix_oversize_pdf.py $*.pdf $*_injected.pdf
PDFGitPolyglot.pdf : article_injected.pdf article.pdf.block_offsets git/git update_deflate_headers.py
./make_polyglot.sh article_injected.pdf $@
mv $@ [email protected]
./update_deflate_headers.py [email protected] $@ article.pdf.block_offsets
# Ignore any errors given by verify_xrefs, since it's not 100% accurate
./verify_xrefs.py $@ || true