-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
56 lines (43 loc) · 1.45 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 clean tests
OCB=ocamlbuild -use-ocamlfind
CC=gcc -O4
all: build extraction tests queens
build: Makefile.coq
$(MAKE) -f Makefile.coq
Makefile.coq: _CoqProject
coq_makefile -f _CoqProject -o Makefile.coq
extraction: extraction/STAMP
# XXX: This will force the recompilation of refinement/bits.vo
# as it depends on extraction/axioms.vo
extraction/STAMP: build extraction/axioms.v
rm -f test_*.ml test_*.mli extraction/specs.vo
$(MAKE) -f Makefile.coq extraction/specs.vo
mv test_*.ml* extraction/
touch extraction/STAMP
queens: example/QUEENS example/queens_driver.ml
$(OCB) -pkg unix example/queens_driver.native
example/QUEENS: build example/queens.v
rm -f queens.ml queens.mli example/queens.vo
$(MAKE) -f Makefile.coq example/queens.vo
mv queens.ml* example/
touch example/QUEENS
bench: example/queens_driver.ml example/queens.v bench/queens.ml bench/queens.c
rm -f queens_*.dat
$(OCB) -pkg unix bench/queens.native
$(CC) -o queens bench/queens.c
./queens_driver.native
./queens.native
./queens
TEST_FILES=$(addprefix extraction/test_int,8 16 32)
TARGET=native
TEST_BINARIES:=$(TEST_FILES:=.$(TARGET))
test:
mkdir -p test
tests: test extraction $(addsuffix .ml, $(TEST_FILES)) extraction/forall.ml
$(OCB) -package unix $(TEST_BINARIES)
clean: Makefile.coq
$(MAKE) -f Makefile.coq clean
$(OCB) -clean
rm -rf Makefile.coq extraction/test_* extraction/STAMP \
example/QUEENS example/queens.ml* \
example/bloom.ml*