Kill stray line
[llpp.git] / build.ninja
blobd71c09a2ce866eee26116185f910fc63e72f5abd
1 cc = gcc
2 include .config
3 ocamlc = ocamlc.opt
4 ocamlflags = -w a -I $builddir
5 libs = -lmupdf $mujs -lpthread -L$mupdf/build/$buildtype
7 cflags =$cflags  -Wall -Werror -I$mupdf/include -I$freetype $
8        -I$mupdf/include
10 rule cc
11      deps = gcc
12      depfile = $out.d
13      command = $ocamlc -cc $cc -ccopt "$cflags -MMD -MF $out.d -o $out" -c $in
15 rule ocamlc
16      command = sh $srcdir/doocaml $out $in -c $ocamlflags
18 rule helpcmo
19      command = cd $builddir >/dev/null && $
20           $ocamlc $ocamlflags -c -o help.cmo help.ml
22 rule genhelp
23      command = sh $srcdir/mkhelp.sh $srcdir/keystoml.ml $srcdir/KEYS >$out
25 sedcmd = sed -f $srcdir/pp.sed
27 build $builddir/help.ml: genhelp
28 build $builddir/link.o: cc $srcdir/link.c
29       cflags = $cflags -D_GNU_SOURCE -DOBSCURED_OPT -DFFP $
30              -DUSE_FONTCONFIGg
31 build $builddir/help.cmo: helpcmo | $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/wsi.cmi $builddir/bo.cmo
37 build $builddir/parser.cmo: ocamlc $srcdir/parser.ml
38 build $builddir/config.cmo: ocamlc $srcdir/config.ml
39       ocamlflags = $ocamlflags -I +lablGL
40 build $builddir/main.cmo: ocamlc $srcdir/main.ml
41       ocamlflags = $ocamlflags -I +lablGL -pp "$sedcmd"
43 cmos = $builddir/help.cmo $
44      $builddir/utils.cmo $
45      $builddir/parser.cmo $
46      $builddir/bo.cmo $
47      $builddir/wsi.cmo $
48      $builddir/config.cmo $
49      $builddir/main.cmo
51 rule linkso
52      command = $cc -o $out -shared $in $libs
54 build $builddir/link.so: linkso $builddir/link.o
56 rule link
57       command = $ocamlc -custom $
58               -cclib "$builddir/link.so $lflags" $
59               -o $out -I +lablGL str.cma unix.cma lablgl.cma $cmos
61 build $builddir/llpp: link | $
62       $builddir/help.cmo $
63       $builddir/utils.cmo $
64       $builddir/parser.cmo $
65       $builddir/bo.cmo $
66       $builddir/wsi.cmo $
67       $builddir/config.cmo $
68       $builddir/main.cmo $
69       $builddir/link.so
71 default $builddir/llpp