forked from LCBH/UKano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (48 loc) · 1.56 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
# This Makefile only combines the UKano's and Proverif's Makefile
#### BUILD#####
PROVERIF =proverif1.92
UKANO =./ukano
UKANO_S =src
all: ukano proverif
ukano:
@echo "#### Building UKano v0.2 ...."
$(MAKE) all -C $(UKANO_S)
cp $(UKANO_S)/ukano .
ukano-short:
@echo "#### Building UKano v0.2 ...."
$(MAKE) short -C $(UKANO_S)
cp $(UKANO_S)/ukano .
proverif:
@echo "#### Building ProVerif v1.92 ...."
cd $(PROVERIF) && ./build && cd ..
cp $(PROVERIF)/proverif .
#### CLEAN ####
GEN_FILES=$(shell find -type f -name '*FOpa.pi' -o -name '*WAuth.pi')
clean: clean-ukano clean-proverif
clean-ukano:
@echo "#### Cleaning UKano ...."
$(MAKE) clean -C $(UKANO_S)
clean-proverif:
@echo "#### Cleaning ProVerif ...."
$(MAKE) clean -C $(PROVERIF)
clean-all: clean force
rm $(GEN_FILES)
#### TEST ####
TESTS=$(shell find examples/tests -type f -name '*_ok.pi' ! -name '*FOpa.pi' ! -name '*WAuth.pi')
TESTS_ERROR=$(shell find examples/tests -type f -name '*_error.pi' ! -name '*FOpa.pi' ! -name '*WAuth.pi')
OBJS =$(TESTS:.pi=.ok)
OBJS_ERROR =$(TESTS_ERROR:.pi=.error)
test: $(OBJS_ERROR) $(OBJS)
examples/tests/%.error: examples/tests/%.pi
@echo "============= UKANO RUN ============="
@echo "Should return an error !"
@echo "$$./ukano --less-verbose $<"
# we check that ukano returns an error:
@$(UKANO) --less-verbose $< ; test $$? -eq 2
examples/tests/%.ok: examples/tests/%.pi
@echo "============= UKANO RUN ============="
@echo "Should not return any error !"
@echo "$$./ukano --less-verbose $<"
@$(UKANO) --less-verbose $<
force:
.PHONY: clean proverif ukano