-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.38 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
MAKEFLAGS += --silent
PAPER_EXAMPLES = paper-examples/blellochproduce paper-examples/list_pi paper-examples/pipeline_pi paper-examples/pipeline_pi_full paper-examples/tree-rev paper-examples/tree
.PHONY: build
build: _build
_build: _opam
echo Building project...
./run-in-opam-switch "dune build"
echo Done.
echo Run "eval \$$(opam env --switch=. --set-switch)" to set up your current shell environment
echo Then run "dune exec -- gml <file>" to run an example
.PHONY: init
init: _opam
_opam:
echo Creating gml switch...
rm -rf _opam
opam switch create . 4.14.0 -y
eval $(opam env --switch=. --set-switch)
echo Installing dependencies...
opam install --deps-only -d -t . -y --switch .
eval $(opam env --switch=. --set-switch)
test: _build
./run-in-opam-switch ./tests.sh
paper-examples/%: _build
echo "Running [email protected]"
./run-in-opam-switch 'dune exec -- gml -nt -u 3 -z [email protected] [email protected]'
./run-in-opam-switch 'dune exec -- gml -nt -u 6 -z [email protected] [email protected]'
dot -Tpng [email protected] > [email protected] || (echo "dot failed. Make sure GraphViz is installed"; exit 1)
dot -Tpng [email protected] > [email protected] || (echo "dot failed. Make sure GraphViz is installed"; exit 1)
vis: $(PAPER_EXAMPLES)
echo "PNG visualizations output to paper-examples/"
clean:
rm -rf ./_build
rm -rf ./_opam
rm -f paper-examples/*.out
rm -f paper-examples/*.png
rm -f testcases/*.out
rm -f testcases/*.png