2023-03-02 17:29:14 +00:00
|
|
|
# Build the cpdf command line tools
|
2023-03-23 19:24:50 +00:00
|
|
|
NONDOC = cpdfyojson cpdfxmlm
|
2022-09-11 14:52:08 +01:00
|
|
|
|
|
|
|
DOC = cpdfunicodedata cpdferror cpdfdebug cpdfjson cpdfstrftime cpdfcoord \
|
|
|
|
cpdfattach cpdfpagespec cpdfposition cpdfpresent cpdfmetadata \
|
2022-09-27 19:58:27 +01:00
|
|
|
cpdfbookmarks cpdfpage cpdftruetype cpdfremovetext cpdfextracttext \
|
2023-03-22 19:29:12 +00:00
|
|
|
cpdfembed cpdfaddtext cpdffont cpdftype cpdfpad cpdfocg \
|
2022-09-27 19:58:27 +01:00
|
|
|
cpdfsqueeze cpdfdraft cpdfspot cpdfpagelabels cpdfcreate cpdfannot \
|
2022-12-23 13:14:24 +00:00
|
|
|
cpdfxobject cpdfimpose cpdftweak cpdftexttopdf cpdftoc cpdfjpeg \
|
2023-03-22 19:29:12 +00:00
|
|
|
cpdfpng cpdfimage cpdfdraw cpdfcommand
|
2022-09-11 14:52:08 +01:00
|
|
|
|
|
|
|
MODS = $(NONDOC) $(DOC)
|
2013-08-20 21:00:17 +01:00
|
|
|
|
2020-07-21 12:28:32 +01:00
|
|
|
SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml
|
2013-08-20 15:32:57 +01:00
|
|
|
|
|
|
|
RESULT = cpdf
|
2013-09-16 13:17:40 +01:00
|
|
|
ANNOTATE = true
|
2020-12-02 13:31:23 +00:00
|
|
|
PACKS = camlpdf
|
2013-08-20 15:32:57 +01:00
|
|
|
|
2020-07-21 12:28:32 +01:00
|
|
|
CFLAGS = -fPIC
|
2019-09-15 17:29:23 +01:00
|
|
|
OCAMLFLAGS = -bin-annot
|
2022-04-09 14:13:12 +02:00
|
|
|
OCAMLNCFLAGS = -g -safe-string
|
|
|
|
OCAMLBCFLAGS = -g -safe-string
|
2013-08-20 15:32:57 +01:00
|
|
|
OCAMLLDFLAGS = -g
|
|
|
|
|
2023-03-02 17:29:14 +00:00
|
|
|
TARGETS := byte-code-library htdoc
|
2022-08-02 19:24:05 +02:00
|
|
|
|
|
|
|
LIBINSTALL_FILES = cpdf.cma \
|
|
|
|
$(foreach x,$(MODS),$x.mli) $(foreach x,$(MODS),$x.cmi) \
|
|
|
|
$(foreach x,$(MODS),$x.cmti)
|
|
|
|
|
|
|
|
ifneq ($(shell ocamlopt -version),)
|
|
|
|
TARGETS += native-code native-code-library
|
2022-09-24 11:58:09 +01:00
|
|
|
LIBINSTALL_FILES += cpdf.a cpdf.cmxa $(foreach x,$(MODS),$x.cmx)
|
2022-08-02 19:24:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
all : $(TARGETS)
|
2013-08-20 21:00:17 +01:00
|
|
|
|
2014-09-16 16:12:58 +01:00
|
|
|
clean ::
|
2021-12-21 15:00:17 +00:00
|
|
|
rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf decomp.pdf *.cmt *.cmti \
|
2022-10-05 15:14:53 +01:00
|
|
|
*.json test/*.pdf debug/*.pdf *.ps *.aux *.idx *.log *.out *.toc *.cut \
|
2023-03-20 21:02:10 +00:00
|
|
|
*.ttf *.ttx out.png
|
2014-09-16 16:12:58 +01:00
|
|
|
|
2022-12-23 13:18:39 +00:00
|
|
|
DOC_FILES = $(foreach x,$(DOC),$(x).mli)
|
2021-10-05 18:28:28 +01:00
|
|
|
|
2013-08-20 21:00:17 +01:00
|
|
|
install : libinstall
|
2013-08-20 15:32:57 +01:00
|
|
|
|
|
|
|
-include OCamlMakefile
|