No longer needed
[llpp.git] / build.ninja
blob754b509f320dae5cd9fe2bc6053d8b517e6022f0
1 cc = gcc
2 include .config
3 ocamlc = ocamlc.opt
4 ocamlflags = -w a -g
5 libs = -lmupdf $mujs -lpthread -L$mupdf/build/$buildtype
7 cflags =$cflags  -Wall -Werror -I$mupdf/include -I$freetype $
8        -I$mupdf/include -g
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
14      description = cc $out
16 rule ocamlc
17      command = sh $srcdir/doocaml $out $in -c $ocamlflags
18      description = ocamlc $out
20 rule genhelp
21      command = sh $srcdir/mkhelp.sh $srcdir/keystoml.ml $srcdir/KEYS >$out
22      description = genhelp
24 sedcmd = sed -f $srcdir/pp.sed
26 build $builddir/help.ml: genhelp
27 build $builddir/link.o: cc $srcdir/link.c
28       cflags = $cflags -D_GNU_SOURCE -DOBSCURED_OPT -DFFP $
29              -DUSE_FONTCONFIG
30 build $builddir/help.cmo: ocamlc $builddir/help.ml
31 build $builddir/utils.cmo: ocamlc $srcdir/utils.ml
32 build $builddir/bo.cmo: ocamlc $srcdir/le/bo.ml
33 build $builddir/wsi.cmi: ocamlc $srcdir/wsi.mli
34 build $builddir/wsi.cmo: ocamlc $srcdir/wsi.ml | $
35       $builddir/wsi.cmi $builddir/bo.cmo
36 build $builddir/parser.cmo: ocamlc $srcdir/parser.ml
37 build $builddir/config.cmo: ocamlc $srcdir/config.ml
38       ocamlflags = $ocamlflags -I +lablGL
39 build $builddir/main.cmo: ocamlc $srcdir/main.ml | $
40       $builddir/config.cmo $
41       $builddir/wsi.cmi
42       ocamlflags = $ocamlflags -I +lablGL -pp "$sedcmd"
44 cmos = $builddir/help.cmo $
45      $builddir/utils.cmo $
46      $builddir/parser.cmo $
47      $builddir/bo.cmo $
48      $builddir/wsi.cmo $
49      $builddir/config.cmo $
50      $builddir/main.cmo
52 rule linkso
53      command = $cc -o $out -shared $in $libs $lflags
54      description = linkso $out
56 build $builddir/link.so: linkso $builddir/link.o
58 rule link
59      command = $ocamlc -g -o $out -I +lablGL $
60              str.cma unix.cma lablgl.cma $cmos $
61              $absbuilddir/link.so
62      description = link $out
64 build $builddir/llpp: link | $
65       $builddir/help.cmo $
66       $builddir/utils.cmo $
67       $builddir/parser.cmo $
68       $builddir/bo.cmo $
69       $builddir/wsi.cmo $
70       $builddir/config.cmo $
71       $builddir/main.cmo $
72       $builddir/link.so
74 default $builddir/llpp