1 # builds "hard" prerequisites and llpp
8 lablgl
=http
://wwwfun.kurims.kyoto-u.ac.jp
/soft
/lsl
/dist
/lablgl-1.04.
tar.gz
9 mupdf
=git
://git.ghostscript.com
/mupdf.git
10 mupdf3p
=http
://mupdf.com
/download
/mupdf-thirdparty.
zip
11 mupdfrev
=50dbc1a356577f3df15a876f6adb716dea29bdc5
13 test -d lablGL-1.04 ||
(wget
-nc $lablgl && tar -xzf lablgl-1.04.
tar.gz
)
14 if ! test -d mupdf
; then
16 (cd mupdf
; git checkout
$mupdfrev)
18 : #(cd mupdf; git pull $mupdf; git checkout $mupdfrev)
21 test -d mupdf
/thirdparty ||
(wget
-nc $mupdf3p && unzip -d mupdf mupdf-thirdparty.
zip)
23 make=$
(gmake
-v >/dev
/null
2>&1 && echo gmake ||
echo make)
26 && cat Makefile.config.linux.mdk
> Makefile.config \
27 && $make glut glutopt \
30 LIBDIR
=$root/lib
/ocaml \
31 DLLDIR
=$root/lib
/ocaml
/stublibs \
32 INSTALLDIR
=$root/lib
/ocaml
/lablGL
)
34 (cd mupdf
&& $make build
=release
)
40 sh mkhelp.sh
$srcpath/keystoml.ml
$srcpath/KEYS
> help.ml
42 tp
=$root/mupdf
/thirdparty
45 ccopt
="$ccopt -I $tp/jbig2dec"
46 ccopt
="$ccopt -I $tp/jpeg-8c"
47 ccopt
="$ccopt -I $tp/freetype-2.4.4/include"
48 ccopt
="$ccopt -I $tp/openjpeg-1.4/libopenjpeg"
49 ccopt
="$ccopt -I $tp/zlib-1.2.5"
50 ccopt
="$ccopt -I $root/mupdf/fitz -I $root/mupdf/pdf"
52 ccopt
="$ccopt -include ft2build.h -D_GNU_SOURCE"
54 cclib
="$cclib -L$root/mupdf/build/release"
55 cclib
="$cclib -lmupdf -lfitz -lz -ljpeg -lopenjpeg -ljbig2dec -lfreetype"
57 if test "$1" = "opt"; then
58 cclib
="$cclib -lpthread"
59 ocamlopt
-c -o link.o
-ccopt "$ccopt" $srcpath/link.c
60 ocamlopt
-c -o help.cmx
help.ml
61 ocamlopt
-c -o parser.cmx
$srcpath/parser.ml
62 ocamlopt
-c -o main.cmx
-I $root/lib
/ocaml
/lablGL
$srcpath/main.ml
65 -I $root/lib
/ocaml
/lablGL \
66 str.cmxa unix.cmxa lablgl.cmxa lablglut.cmxa \
73 ocamlc
-c -o link.o
-ccopt "$ccopt" $srcpath/link.c
74 ocamlc
-c -o help.cmo
help.ml
75 ocamlc
-c -o parser.cmo
$srcpath/parser.ml
76 ocamlc
-c -o main.cmo
-I $root/lib
/ocaml
/lablGL
$srcpath/main.ml
78 ocamlc
-custom -o llpp \
79 -I $root/lib
/ocaml
/lablGL \
80 str.cma unix.cma lablgl.cma lablglut.cma \