-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
68 lines (54 loc) · 2.45 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
# Always run with nproc jobs by default. Can be overridden by the user.
MAKEFLAGS := --jobs=$(shell nproc)
# Comment out the below line if you want to be quiet by default.
VERBOSE ?= 1
ifeq ($(V),1)
E=@true
Q=
else
E=@echo
Q=@
MAKEFLAGS += -s
endif
SRCS := $(shell egrep '^.*\.v$$' _CoqProject | grep -v '^#')
AUXS := $(join $(dir $(SRCS)), $(addprefix ., $(notdir $(SRCS:.v=.aux))))
.PHONY: coq clean summaxlen install uninstall pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed-diff
coq: Makefile.coq
$(E) "MAKE Makefile.coq"
$(Q)$(MAKE) -f Makefile.coq
patch:
$(Q) patch -p1 -N -r - < case_study/patches/RiscvPmp/duplicate_add.patch || true
$(Q) patch -p1 -N -r - < case_study/patches/RiscvPmpBoundedInts/duplicate_add.patch || true
$(Q) patch -p1 -N -r - < case_study/patches/MinimalCaps/duplicate_add.patch || true
unpatch:
$(Q) patch -p1 -NR -r - < case_study/patches/RiscvPmp/duplicate_add.patch || true
$(Q) patch -p1 -NR -r - < case_study/patches/RiscvPmpBoundedInts/duplicate_add.patch || true
$(Q) patch -p1 -NR -r - < case_study/patches/MinimalCaps/duplicate_add.patch || true
Makefile.coq: _CoqProject Makefile $(SRCS)
$(E) "COQ_MAKEFILE Makefile.coq"
$(Q)coq_makefile -f _CoqProject -o Makefile.coq
clean: Makefile.coq
$(Q)$(MAKE) -f Makefile.coq clean
$(Q)rm -f $(AUXS)
$(Q)rm -f Makefile.coq *.bak *.d *.glob *~ result*
install uninstall pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed-diff: Makefile.coq
$(Q)$(MAKE) -f Makefile.coq $@
summaxlen: Makefile.coq
$(Q)rm -f test/SumMaxLen.vo*
$(Q)$(MAKE) -f Makefile.coq test/SumMaxLen.vo
linkedlist: Makefile.coq
$(Q)rm -f test/LinkedList.vo*
$(Q)$(MAKE) -f Makefile.coq test/LinkedList.vo
timings: Makefile.coq
$(Q)rm -f case_study/MinimalCaps/Contracts.vo*
$(Q)rm -f test/SumMaxLen.vo*
$(Q)rm -f test/LinkedList.vo*
$(Q)$(MAKE) -f Makefile.coq test/LinkedList.vo test/SumMaxLen.vo case_study/MinimalCaps/Contracts.vo | ts '%.s' | scripts/timing.sh
Makefile2.coq: _CoqProject Makefile $(SRCS) case_study/MinimalCaps/Shallow.v
$(E) "COQ_MAKEFILE Makefile2.coq"
$(Q)coq_makefile -f _CoqProject -o Makefile2.coq case_study/MinimalCaps/Shallow.v
minimalcaps: Makefile2.coq
$(Q)rm -f case_study/MinimalCaps/Contracts.vo*
$(Q)$(MAKE) -f Makefile.coq case_study/MinimalCaps/Contracts.vo
$(Q)rm -f case_study/MinimalCaps/Shallow.vo*
$(Q)$(MAKE) -f Makefile2.coq case_study/MinimalCaps/Shallow.vo | tr -s '[:space:]' '[\n*]' | scripts/shallow.sh