-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
62 lines (48 loc) · 1.63 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
#To run these specs in Python you need to install Python >= 3.6.4
PYTHON?=python3.6
# hacspecs passing compiler checks
FINISHED_SPECS=poly1305 chacha20 aead_chacha20poly1305 curve25519 curve448 \
aes gf128 aead_aes128gcm
# hacspecs that pass all python checks and can be used in any make target.
SPECS=$(FINISHED_SPECS) sha2 sha3 ed25519 p256 rsapss blake2
# Don't use these in test. They take too long.
SLOW_SPECS=wots kyber
# Like SLOW_SPECS and they fail the spec checker.
SLOW_SPECS_FAILING_SPECHECK=frodo argon2i
# These specs run just fine but don't pass the spec checker.
SPECS_FAILING_SPECHECK=
# These specs are broken or work in progress.
BROKEN_SPECS=vrf xmss
.PHONY: test $(SPECS) all compiler
# Python targets. These only require Python.
all: run check test
run: $(SPECS) $(SPECS_FAILING_SPECHECK) $(SLOW_SPECS)
test: $(addsuffix -test, $(SPECS) $(SPECS_FAILING_SPECHECK))
check: $(addsuffix -check, $(SPECS) $(SLOW_SPECS))
$(SPECS) $(SLOW_SPECS) $(SPECS_FAILING_SPECHECK):
PYTHONPATH=. $(PYTHON) -O tests/$@_test.py
%-check: specs/%.py
PYTHONPATH=. $(PYTHON) lib/check.py $<
%-test: tests/%_test.py
PYTHONPATH=. $(PYTHON) $<
# Compiler targets
# NOTE that this requires OCAML.
compiler: checker fstar parse
checker:
make -C compiler
fstar:
make -C compiler
parse: $(addsuffix -parse, $(FINISHED_SPECS))
%-parse: specs/%.py
compiler/checker.native $<
# Documentation targets
# NOTE that this requires hugo (https://gohugo.io)
website:
cd doc/website/ && hugo
cd doc/poly-slides && hugo
website-dev:
cd doc/website/ && hugo serve -D
website-slides-dev:
cd doc/poly-slides && hugo serve -D
python-docs:
make -C build/ docs