-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
59 lines (48 loc) · 2.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
50
51
52
53
54
55
56
57
58
59
# Build coherentpdf.js
PDFMODS = pdfe pdfutil pdfio pdftransform pdfunits pdfpaper pdfcryptprimitives \
pdf pdfcrypt pdfflate pdfcodec pdfwrite pdfgenlex pdfread pdfjpeg pdfops \
pdfdest pdfmarks pdfpagelabels pdfpage pdfannot pdffun pdfspace pdfimage \
pdfafm pdfafmdata pdfglyphlist pdftext pdfstandard14 \
pdfdate pdfocg pdfmerge \
cpdfyojson cpdfxmlm \
cpdfunicodedata cpdferror cpdfdebug cpdfjson cpdfstrftime cpdfcoord \
cpdfattach cpdfpagespec cpdfposition cpdfpresent cpdfmetadata \
cpdfbookmarks cpdfpage cpdftruetype cpdfremovetext cpdfextracttext \
cpdfembed cpdffont cpdftype cpdfaddtext cpdfpad cpdfocg \
cpdfsqueeze cpdfdraft cpdfspot cpdfpagelabels cpdfcreate cpdfannot \
cpdfxobject cpdfimpose cpdfchop cpdftweak cpdftexttopdf cpdftoc \
cpdfjpeg cpdfjpeg2000 cpdfpng cpdfimage cpdfdraw cpdfcomposition \
cpdfshape cpdfcolours cpdfdrawcontrol cpdfcommand \
cpdf
SOURCES = flatestubs.c rijndael-alg-fst.c stubs-aes.c sha2.c stubs-sha2.c \
$(foreach x,$(PDFMODS),$(x).ml $(x).mli) exports.ml
PACKS = unix js_of_ocaml js_of_ocaml-ppx
OCAMLBCFLAGS = -g
OCAMLLDFLAGS = -g
RESULT = coherentpdf.byte
all : byte-code js
-include OCamlMakefile
js :
js_of_ocaml -q nodestubs.js cpdfzlib.js cpdfcrypt.js coherentpdf.byte
jsdebug :
js_of_ocaml -q --pretty --debuginfo \
--disable inline --source-map-inline \
nodestubs.js cpdfzlib.js cpdfcrypt.js \
coherentpdf.byte
distrib :
cp coherentpdf.js dist/
js_of_ocaml -o coherentpdf.min.js -q \
nodestubs.js cpdfzlib.js cpdfcrypt.js coherentpdf.byte
uglifyjs coherentpdf.min.js --compress --mangle --output dist/coherentpdf.min.js
browserify coherentpdf.js -s coherentpdf -o coherentpdf.browser.js
browserify coherentpdf.min.js -s coherentpdf -o coherentpdf.browser.formin.js
uglifyjs coherentpdf.browser.formin.js --compress --mangle \
--output coherentpdf.browser.min.js
cp coherentpdf.browser.min.js coherentpdf.browser.js dist/
browser :
browserify coherentpdf.js -s coherentpdf -o coherentpdf.browser.js
cp coherentpdf.browser.js dist/
clean ::
rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf decomp.pdf *.cmt *.cmti \
test/*.pdf debug/*.pdf *.ps *.aux *.idx *.log *.out *.toc \
*.cut cpdflib.js all.js coherentpdf-browser.js coherentpdf.*.js