-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·39 lines (32 loc) · 992 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
DIRS="-Is src/utils,src/domain,src/main,src/algo,src/frontends,src/effects"
TARGET="src/main/drift "
APRONPKG="apron,apron.boxD,apron.boxMPFR,apron.boxMPQ,apron.octD,apron.octMPQ,apron.polkaMPQ,apron.polkaRll,\
apron.ppl,apron.t1pD,apron.t1pMPFR,apron.t1pMPQ,apron.polkaGrid"
FLAGS="-cflags -g -lflags -g -libs str -pkgs $APRONPKG $DIRS"
OCAMLBUILD=ocamlbuild
MENHIR=menhir
eval `opam config env`
ocb()
{
$OCAMLBUILD -use-ocamlfind $FLAGS $*
}
if [ $# -eq 0 ]; then
action=native
else
action=$1;
shift
fi
case $action in
clean) ocb -clean;;
native) ocb ${TARGET//" "/".native "} ;;
byte) ocb ${TARGET//" "/".byte "} ;;
all) ocb ${TARGET//" "/".native "} ${TARGET//" "/".byte "} ;;
prof) ocb ${TARGET//" "/".p.native "} ;;
*) echo "Unknown action $action";;
esac;
# ./build.sh
# profiling: ./build.sh prof
# run analysis: ./tests.p.native <-file> > out_idc
# check calls: gprof tests.p.native gmon.out > out_count