-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 958 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (29 loc) · 958 Bytes
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
CORE_MODULES := src/Seal.Types.fst src/Seal.Policy.fst src/Seal.Gate.fst src/Seal.Proofs.fst src/Seal.Matrix.fst
.PHONY: toolchain verify extract test clean
toolchain:
./scripts/check-toolchain.sh
verify:
./scripts/verify-core.sh
extract:
@mkdir -p generated/c
@set -e; \
if command -v opam >/dev/null 2>&1 && opam switch list --short 2>/dev/null | grep -qx seal-core; then \
eval "$$(opam env --switch=seal-core --set-switch)"; \
fi; \
if ! command -v krml >/dev/null 2>&1; then \
echo "SEAL_EXTRACTION_NOT_READY"; \
exit 0; \
fi; \
if ! ./scripts/verify-core.sh >/dev/null 2>&1; then \
echo "SEAL_EXTRACTION_NOT_READY"; \
exit 0; \
fi; \
if krml -skip-compilation -tmpdir generated/c -bundle 'Seal.*=SEAL' $(CORE_MODULES) -o generated/c/seal_core.c >/dev/null 2>&1; then \
echo "SEAL_EXTRACTION_SUCCEEDED"; \
else \
echo "SEAL_EXTRACTION_NOT_READY"; \
exit 0; \
fi
test: toolchain verify
clean:
rm -rf build generated/c