3 ocamlflags = -warn-error +a -w +a -g -safe-string
4 libs = -lmupdf -lz -lfreetype -ljpeg -ljbig2dec -lopenjpeg $
5 $mujs -lpthread -L$srcdir/mupdf/build/$buildtype
7 cflags = $cflags -Wall -Werror -I$srcdir/mupdf/include -g $
8 -std=c99 -pedantic-errors -Wunused-parameter -Wsign-compare -Wshadow $
9 -I $srcdir/mupdf/thirdparty/freetype/include
14 command = $ocamlc -cc "$cc" -ccopt "$cflags -MMD -MF $out.d -o $out" -c $in
18 command = env incs="$incs" pp="$pp" /bin/sh $srcdir/doocaml.sh $
19 $ocamlc $out $in -c $ocamlflags
20 description = ocamlc $out
23 command = /bin/sh $srcdir/mkhelp.sh $srcdir/KEYS >$out
26 build $builddir/help.ml: genhelp $srcdir/mkhelp.sh $srcdir/KEYS
27 build $builddir/link.o: cc $srcdir/link.c
28 cflags = $cflags -D_GNU_SOURCE -DFFP
29 build $builddir/help$cmo: ocamlc $builddir/help.ml
30 build $builddir/utils$cmo: ocamlc $srcdir/utils.ml
31 build $builddir/bo$cmo: ocamlc $srcdir/le/bo.ml
32 build $builddir/wsi.cmi: ocamlc $srcdir/wsi.mli $
34 build $builddir/wsi$cmo: ocamlc $srcdir/wsi.ml $
35 | $builddir/bo$cmo $builddir/utils$cmo $builddir/wsi.cmi
36 build $builddir/parser$cmo: ocamlc $srcdir/parser.ml
37 build $builddir/config$cmo: ocamlc $srcdir/config.ml $
38 | $builddir/wsi.cmi $builddir/utils$cmo $
39 $builddir/parser$cmo $builddir/help$cmo
41 build $builddir/main$cmo: ocamlc $srcdir/main.ml $
42 | $builddir/wsi.cmi $builddir/utils$cmo $builddir/config$cmo $
43 $builddir/help$cmo $srcdir/doocaml.sh $srcdir/pp.sed
45 pp = sed -f $srcdir/pp.sed
48 command = $cc -g -o $out -shared $in $libs $lflags
49 description = linkso $out
51 build $builddir/link.so: linkso $builddir/link.o
54 command = $ocamlc -g -o $out $lablglcflags $
55 str$cma unix$cma lablgl$cma $in $
57 description = link $out
59 build $builddir/llpp.custom: link $
62 $builddir/parser$cmo $
65 $builddir/config$cmo $
68 ocamllflags = $customflag -cclib "$libs -lX11 $lflags"
70 build $builddir/llpp: link $
73 $builddir/parser$cmo $
76 $builddir/config$cmo $
79 ocamllflags = $linksocclib $builddir/link.so
81 default $builddir/llpp