forked from EasyCrypt/easycrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (54 loc) · 1.5 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
# -*- Makefile -*-
# --------------------------------------------------------------------
DUNE ?= dune
ECARGS ?=
ECTOUT ?= 10
ECJOBS ?= 0
ECEXTRA ?= --report=report.log
CHECKPY ?=
CHECK := $(CHECKPY) scripts/testing/runtest
CHECK += --bin=./ec.native
CHECK += --jobs="$(ECJOBS)"
CHECK += --bin-args=-timeout --bin-args="$(ECTOUT)"
CHECK += $(foreach arg,$(ECARGS),--bin-args="$(arg)")
CHECK += $(ECEXTRA) config/tests.config
NIX ?= nix --extra-experimental-features "nix-command flakes"
# --------------------------------------------------------------------
UNAME_P = $(shell uname -p)
UNAME_S = $(shell uname -s)
# --------------------------------------------------------------------
.PHONY: default build byte native tests check examples
.PHONY: nix-build nix-build-with-provers nix-develop
.PHONY: clean install uninstall
default: build
@true
build:
rm -f src/ec.exe ec.native
dune build
ln -sf src/ec.exe ec.native
ifeq ($(UNAME_P)-$(UNAME_S),arm-Darwin)
-codesign -f -s - src/ec.exe
endif
install: build
$(DUNE) install
uninstall:
$(DUNE) uninstall
unit: build
$(CHECK) unit
stdlib: build
$(CHECK) prelude stdlib
examples: build
$(CHECK) examples mee-cbc
check: unit stdlib examples
@true
nix-build:
$(NIX) build
nix-build-with-provers:
$(NIX) build .#with_provers
nix-develop:
$(NIX) develop
clean:
rm -f ec.native && $(DUNE) clean
find theories examples -name '*.eco' -exec rm '{}' ';'
clean_eco:
find theories examples -name '*.eco' -exec rm '{}' ';'