-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
57 lines (36 loc) · 981 Bytes
/
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 doc fmt install lock opam release show-deps test utop venv watch
TARGET = electrod
DUNE = opam exec -- dune
os := $(shell opam var os)
arch := $(shell opam var arch)
RELEASE = ./$(TARGET).${os}.${arch}
SWITCH = 4.14.1
all: build
build:
$(DUNE) build bin/$(TARGET).exe
release:
$(DUNE) build --release bin/$(TARGET).exe
watch:
$(DUNE) build --watch @check @fmt --auto-promote --diff-command=-
fmt:
$(DUNE) build @fmt --auto-promote --diff-command=- || true
test:
$(DUNE) test src
regression:
$(DUNE) build @regression
utop:
$(DUNE) utop --profile release
$(TARGET).opam: dune-project
$(DUNE) build $(TARGET).opam
opam: $(TARGET).opam
lock: $(TARGET).opam
opam lock ./$(TARGET).opam
dev-setup:
opam switch create --locked --yes --deps-only --with-test .
setup:
opam switch create --yes --deps-only --with-test .
show-deps:
$(DUNE) external-lib-deps --missing @install
clean:
$(DUNE) clean
-rm -f ./$(TARGET) electrod.install