-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
56 lines (45 loc) · 1.46 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY = all,debug,clean,profile
CURDIR=$(shell pwd)
PLIBS=a cma cmi cmo p.cmx p.cmxa
LIBS=a cma cmi cmo cmx cmxa
OCB = ocamlbuild -use-ocamlfind
OPTOPTS = $(OCB) -ocamlopt 'ocamlopt -inline 20'
POPTOPTS = $(OCB) -ocamlopt 'ocamlopt -p -g'
PROFDIR = $(CURDIR)/profile
TIME := $(shell date +"%Y.%m.%d-%H.%M.%S")
all: clean
$(eval $(shell opam config env)) for ext in $(LIBS); do \
eval $$(opam config env) $(OCB) adapton.$$ext || exit 1 ; \
done
test: clean
eval $$(opam config env) $(OCB) src/test/experiments.native
eval $$(opam config env) $(OCB) src/test/testTrie.native
cd script && ./test-oopsla15.sh
./testTrie.native
test-correctness: clean
eval $$(opam config env) $(OCB) src/test/experiments.native
eval $$(opam config env) $(OCB) src/test/testTrie.native
./script/test-correctness.sh
test-mem:
eval $$(opam config env) $(OCB) $(OPTOPTS) src/test/sparseTrie.native
./script/test-mem.sh
src/test/sparseTrie.p.native:
for ext in $(PLIBS); do \
$(POPTOPTS) adapton.$$ext || exit 1 ; \
done
$(POPTOPTS) src/test/sparseTrie.p.native
profile: src/test/sparseTrie.p.native
for ext in $(PLIBS); do \
$(POPTOPTS) adapton.$$ext || exit 1 ; \
done
$(POPTOPTS) src/test/sparseTrie.p.native
./script/test-mem.sh sparseTrie.p.native
if [ ! -d $(PROFDIR) ]; then mkdir $(PROFDIR); fi
gprof sparseTrie.p.native > $(PROFDIR)/$(TIME).gprof
install:
opam pin -y add adapton .
uninstall :
opam pin -y remove adapton
reinstall: uninstall install
clean:
ocamlbuild -clean