-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMakefile
58 lines (44 loc) · 1.26 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
DAPP_DIR = $(CURDIR)/dss
SRC_DIR = $(CURDIR)/src
SRCS = $(addprefix $(SRC_DIR)/, dss.md lemmas.k.md storage.k.md prelude.smt2.md)
DAPP_SRCS = $(wildcard $(DAPP_DIR)/src/*)
# if KLAB_OUT isn't defined, default is to use out/
ifdef KLAB_OUT
OUT_DIR = $(KLAB_OUT)
else
OUT_DIR = $(CURDIR)/out
endif
TMPDIR ?= $(CURDIR)/tmp
ifndef KLAB_EVMS_PATH
$(error $(red)Error$(reset): KLAB_EVMS_PATH must be defined and point to evm-semantics!)
endif
SPECS_DIR = $(OUT_DIR)/specs
ACTS_DIR = $(OUT_DIR)/acts
DOC_DIR = $(OUT_DIR)/doc
KLAB_FLAGS = KLAB_OUT=$(OUT_DIR)
SMT_PRELUDE = $(OUT_DIR)/prelude.smt2
RULES = $(OUT_DIR)/rules.k
SPEC_MANIFEST = $(SPECS_DIR)/specs.manifest
all: dapp spec
dapp:
dapp --version
git submodule update --init --recursive
cd $(DAPP_DIR) && dapp --use solc:0.5.9 build && cd ../
dapp-clean:
cd $(DAPP_DIR) && dapp clean && cd ../
$(SPEC_MANIFEST): $(SRCS) $(DAPP_SRCS)
mkdir -p $(SPECS_DIR)
$(KLAB_FLAGS) klab build
spec: $(SPEC_MANIFEST)
spec-clean:
rm -f $(SPECS_DIR)/* $(ACTS_DIR)/* $(SPEC_MANIFEST)
$(DOC_DIR)/dss.html: $(SRCS)
$(info Generating html documentation: $@)
mkdir -p $(DOC_DIR)
$(KLAB_FLAGS) klab report > $@
doc: $(DOC_DIR)/dss.html
doc-clean:
rm -rf $(DOC_DIR)/*
log-clean:
rm -rf $(TMPDIR)/klab
clean: dapp-clean spec-clean doc-clean