Fix typo
[llpp.git] / build.ninja
blob160d3d0b91ca6286d03315dbd1909fc9ea3289b5
1 cc = gcc
2 include .config
3 ocamlc = ocamlc.opt
4 ocamlflags = -warn-error +a -w +a-6-4 -g
5 libs = -lmupdf $mujs -lpthread -L$mupdf/build/$buildtype
7 cflags =$cflags  -Wall -Werror -I$mupdf/include -I$freetype -g
9 rule cc
10      deps = gcc
11      depfile = $out.d
12      command = $ocamlc -cc "$cc" -ccopt "$cflags -MMD -MF $out.d -o $out" -c $in
13      description = cc $out
15 rule ocamlc
16      deps = gcc
17      depfile = $out.d
18      command = sh $srcdir/doocaml $ocamlc $out $in -c $ocamlflags
19      description = ocamlc $out
21 rule genhelp
22      command = sh $srcdir/mkhelp.sh $srcdir/keystoml.ml $srcdir/KEYS >$out
23      description = genhelp
25 sedcmd = sed -f $srcdir/pp.sed
27 build $builddir/help.ml: genhelp $
28       $srcdir/mkhelp.sh $srcdir/keystoml.ml $srcdir/KEYS
29 build $builddir/link.o: cc $srcdir/link.c
30       cflags = $cflags -D_GNU_SOURCE -DOBSCURED_OPT -DFFP
31 build $builddir/help.cmo: ocamlc $builddir/help.ml
32 build $builddir/utils.cmo: ocamlc $srcdir/utils.ml
33 build $builddir/bo.cmo: ocamlc $srcdir/le/bo.ml
34 build $builddir/wsi.cmi: ocamlc $srcdir/wsi.mli
35 build $builddir/wsi.cmo: ocamlc $srcdir/wsi.ml $
36       || $builddir/bo.cmo $builddir/utils.cmo $builddir/wsi.cmi
37 build $builddir/parser.cmo: ocamlc $srcdir/parser.ml
38 build $builddir/config.cmo: ocamlc $srcdir/config.ml $
39       || $builddir/wsi.cmi $builddir/utils.cmo $builddir/parser.cmo
40       ocamlflags = $ocamlflags -I +lablGL
41 build $builddir/main.cmo: ocamlc $srcdir/main.ml $
42       || $builddir/wsi.cmi $builddir/utils.cmo $builddir/config.cmo $
43         $builddir/help.cmo
44       ocamlflags = $ocamlflags -I +lablGL -pp "$sedcmd"
46 cmos = $builddir/help.cmo $
47      $builddir/utils.cmo $
48      $builddir/parser.cmo $
49      $builddir/bo.cmo $
50      $builddir/wsi.cmo $
51      $builddir/config.cmo $
52      $builddir/main.cmo
54 rule linkso
55      command = $cc -o $out -shared $in $libs $lflags
56      description = linkso $out
58 build $builddir/link.so: linkso $builddir/link.o
60 rule link
61      command = $ocamlc -g -o $out -I +lablGL $
62              str.cma unix.cma lablgl.cma $cmos $
63              $builddir/link.so
64      description = link $out
66 build $builddir/llpp: link $
67       $builddir/help.cmo $
68       $builddir/utils.cmo $
69       $builddir/parser.cmo $
70       $builddir/bo.cmo $
71       $builddir/wsi.cmo $
72       $builddir/config.cmo $
73       $builddir/main.cmo $
74       $builddir/link.so
76 default $builddir/llpp