-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·91 lines (66 loc) · 2.43 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
DIRS = src,test,ext/ucamlib/src
.PHONY: all test clean
# Init submodules if needed and make native version.
# The resulting executable can be found under /bin and /library (symlinks)
all: native
# Compile native version.
native:
@rm -rf bin; mkdir bin
@ocamlbuild -tag use_str -Is $(DIRS) kta.native
@rm -f kta.native
@cd bin; cp ../_build/src/kta.native kta
# Generate all documentation
gendoc: doc/user/manual.html
@ocamlbuild -Is $(DIRS) doc/main.docdir/index.html
@rm -f main.docdir
@cd doc; rm -f api; ln -s ../_build/doc/main.docdir api
# Generate doc for the userguide
doc/user/manual.html: doc/user/manual.txt
@cd doc/user/; asciidoc manual.txt
# Handling subtree for ext/mlvm
MLVM_GIT = https://gitr.sys.kth.se/dbro/code-mlvm.git
MLVM_MSG = 'Updated mlvm'
add_mlvm:
git subtree add --prefix ext/mlvm $(MLVM_GIT) master --squash
pull_mlvm:
git subtree pull --prefix ext/mlvm $(MLVM_GIT) master --squash -m $(MLVM_MSG)
push_mlvm:
git subtree push --prefix ext/mlvm $(MLVM_GIT) master --squash
# Handling subtree for ext/ucamlib
UCAMLIB_GIT = https://github.com/david-broman/ucamlib.git
UCAMLIB_MSG = 'Updated ucamlib'
add_ucamlib:
git subtree add --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash
pull_ucamlib:
git subtree pull --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash -m $(UCAMLIB_MSG)
push_ucamlib:
git subtree push --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash
test: test-main test-mdh test-taclebench test-custom
test-main:
@ocamlbuild -lib str -Is $(DIRS) maintest.native --
@rm -f maintest.native
test-mdh:
@ocamlbuild -lib str -Is $(DIRS) testWCET.native -- -csvfile test/wcet_tests/testWCET_mdh.csv
@rm -f testWCET.native
test-mdh-concrete:
@ocamlbuild -lib str -Is $(DIRS) testWCET.native -- -csvfile test/wcet_tests/testWCET_mdh_concrete.csv
@rm -f testWCET.native
test-custom:
@ocamlbuild -lib str -Is $(DIRS) testWCET.native -- -csvfile test/wcet_tests/testWCET_custom.csv
@rm -f testWCET.native
test-taclebench:
@ocamlbuild -lib str -Is $(DIRS) testWCET.native -- -csvfile test/wcet_tests/testWCET_taclebench.csv
@rm -f testWCET.native
test-failed:
@ocamlbuild -lib str -Is $(DIRS) testWCET.native -- -csvfile test/wcet_tests/testWCET_mdh_failed.csv
@rm -f testWCET.native
dac16: clean
cp -Rf * ~/paper/dac16/kta/.
# Clean all submodules
clean:
@ocamlbuild -clean
@rm -rf bin
@rm -rf doc/api
@rm -f doc/userguide/*.html
@rm -rf runtime/_build
@echo " Finished cleaning up."