Nicer?
[llpp.git] / build.sh
blob104efd47e33c6ce2963619f37fbf61f08b8a09e8
1 srcpath=$(dirname $0)
3 mupdf=/home/malc/x/rcs/git/mupdf
5 mupdflibpath=$mupdf/build/release
6 mupdfincpath=$mupdf/fitz:$mupdf/pdf:$mupdf/xps:$mupdf/cbz
8 cclib="-lfitz"
9 cclib="$cclib -lz -ljpeg -lopenjpeg -ljbig2dec -lfreetype"
10 cclib="$cclib -lX11 -lpthread"
11 ccopt="$(freetype-config --cflags) -O -include ft2build.h -D_GNU_SOURCE"
12 export LIBRARY_PATH=$LIBRARY_PATH:$mupdflibpath
13 export CPATH=$CPATH:$mupdfincpath
15 sh $srcpath/mkhelp.sh $srcpath/keystoml.ml $srcpath/KEYS > help.ml
17 ocamlc -c -o link.o -ccopt "$ccopt" $srcpath/link.c
18 ocamlc -c -o help.cmo help.ml
19 ocamlc -c -o utils.cmo $srcpath/utils.ml
20 ocamlc -c -o wsi.cmi $srcpath/wsi.mli
21 ocamlc -c -o wsi.cmo $srcpath/wsi.ml
22 ocamlc -c -o parser.cmo $srcpath/parser.ml
23 ocamlc -c -o main.cmo -I +lablGL $srcpath/main.ml
25 ocamlc -custom -o llpp \
26 -I +lablGL \
27 str.cma unix.cma lablgl.cma \
28 link.o \
29 -cclib "$cclib" \
30 help.cmo \
31 utils.cmo \
32 parser.cmo \
33 wsi.cmo \
34 main.cmo