-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
69 lines (56 loc) · 1.24 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
# Checking for required tools.
ifeq (,$(shell command -v dune 2> /dev/null))
$(error "Compilation requires [dune].")
endif
# GNU vs BSD
ifeq (GNU,$(shell sed --version 2>&1 > /dev/null && echo GNU))
SEDI = sed -i
else
SEDI = sed -i ''
endif
# Trick to avoid printing the commands.
# To enable the printing of commands, use [make Q= ...],
Q = @
.PHONY: default
default: cn
.PHONY: all
all: cn cn-coq
.PHONY: full-build
full-build:
@echo "[DUNE] full-build"
$(Q)dune build
.PHONY: cn
cn:
@echo "[DUNE] $@"
$(Q)dune build -p cn
.PHONY: clean
clean:
$(Q)rm -f cn-coq.install cn.install
$(Q)rm -f coq/*.{glob,vo,vok}
$(Q)rm -rf _build/
.PHONY: install
install: cn
@echo "[DUNE] install cn"
$(Q)dune install cn
.PHONY: uninstall
uninstall:
@echo "[DUNE] uninstall cn"
$(Q)dune uninstall cn
.PHONY: cn-coq
cn-coq:
@echo "[DUNE] cn-coq"
$(Q)dune build -p cn-coq
.PHONY: cn-coq-install
cn-coq-install: cn-coq
@echo "[DUNE] install cn-coq"
$(Q)dune install cn-coq
.PHONY: cn-with-coq
cn-with-coq:
@echo "[DUNE] cn,cn-coq"
$(Q)dune build -p cn,cn-coq
# Development target to watch for changes in cn/lib and rebuild
# e.g. to be used with vscode IDE
.PHONY: cn-dev-watch
cn-dev-watch:
@echo "[DUNE] cn-dev-watch"
$(Q)dune build --watch -p cn,cn-coq