Makefile 1.34 KB
Newer Older
Benoit Viguier's avatar
Benoit Viguier committed
1
2
3
4
5
6
7
8
9
10
11
12
DIST=coq-verif-tweetnacl

all: coq-tweetnacl-spec coq-tweetnacl-vst

readme:
	less README.md


# DEFINE GENERIC ROUTINES (hidden via . prefix)
.configure1 .configure2:
	cd $P && $(SHELL) configure.sh

13
14
.building1: .configure1
.building2: .configure2
Benoit Viguier's avatar
Benoit Viguier committed
15
.building1 .building2:
16
	cd $P && $(MAKE) -j all
Benoit Viguier's avatar
Benoit Viguier committed
17
18
	cd $P && $(MAKE) install

19
20
.dusting1: .configure1
.dusting2: .configure2
Benoit Viguier's avatar
Benoit Viguier committed
21
22
23
24
25
26
27
28
.dusting1 .dusting2:
	cd $P && $(MAKE) clean
	cd $P && rm _CoqProject
	cd $P && rm Makefile
	cd $P && rm Makefile.conf

# DEFINE REAL TARGETS
coq-tweetnacl-spec: P=proofs/spec
29
coq-tweetnacl-spec: .building1
Benoit Viguier's avatar
Benoit Viguier committed
30
31

clean-spec: P=proofs/spec
32
clean-spec: .dusting1
Benoit Viguier's avatar
Benoit Viguier committed
33
34

coq-tweetnacl-vst: P=proofs/vst
35
coq-tweetnacl-vst: coq-tweetnacl-spec .building2
Benoit Viguier's avatar
Benoit Viguier committed
36
37

clean-vst: P=proofs/vst
38
clean-vst: .dusting2
Benoit Viguier's avatar
Benoit Viguier committed
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

clean: clean-spec clean-vst clean-dist

# build paper
paper:
	cd paper && $(MAKE)

clean-paper:
	cd paper && $(MAKE) clean

# generate artefact
$(DIST):
	mkdir $(DIST)

dist: $(DIST)
	cp -r proofs $(DIST)
	mkdir $(DIST)/packages
	cp -r packages/coq-compcert $(DIST)/packages/
	cp -r packages/coq-reciprocity $(DIST)/packages/
	cp -r packages/coq-ssr-elliptic-curves $(DIST)/packages/
	cp -r packages/coq-vst $(DIST)/packages/
	cp repo $(DIST)/
	cp version $(DIST)/
	cp README.md $(DIST)/
	cp Makefile $(DIST)/
Benoit Viguier's avatar
Benoit Viguier committed
64
	cp opam $(DIST)/
Benoit Viguier's avatar
Benoit Viguier committed
65
66
67
68
69
	tar -czvf $(DIST).tar.gz $(DIST)

clean-dist: $(DIST)
	rm -r $(DIST)
	-rm $(DIST).tar.gz