-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
66 lines (47 loc) · 1.39 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
.PHONY: all test clean mrproper parser check-dependencies
MILL = ./mill
KORN_JAVA = korn/src/korn/c/Parser.java \
korn/src/korn/c/Scanner.java \
korn/src/korn/smt/Parser.java \
korn/src/korn/smt/Scanner.java
KORN_SCALA = $(shell find korn/src -iname "*.scala")
KORN_C = $(shell find examples -iname "*.c")
KORN_SMT = $(KORN_C:.c=.smt2)
BEAVER = ./beaver
JFLEX = ./jflex
KORN_JAR = korn.jar
KORN_SH = ./korn.sh
KORN_FLAGS ?=
ARCHIVES = ../svcomp-archives-2024/2024
KORN_DIST = run korn.jar golem z3 eld eld.jar README.md $(wildcard LICENSE*) __VERIFIER.c __VERIFIER_random.c
all: $(KORN_JAR) $(KORN_SH)
examples: $(KORN_SMT)
parser: $(KORN_JAVA)
archives-2023: $(ARCHIVES)/korn.zip
archives-2024: dist/korn.zip
$(ARCHIVES)/korn.zip: $(KORN_DIST)
@echo $@
@mkdir -p $(ARCHIVES)/korn
@cp $(KORN_DIST) $(ARCHIVES)/korn
@(cd $(ARCHIVES); zip korn.zip -r korn)
dist/korn.zip: $(KORN_DIST)
@echo $@
@mkdir -p ./dist/korn
@cp $(KORN_DIST) ./dist/korn
@(cd dist; zip korn.zip -r korn)
clean:
$(MILL) clean
@rm -f $(KORN_SH)
check-dependencies:
$(MILL) mill.scalalib.Dependency/updates
$(KORN_JAR): $(KORN_JAVA) $(KORN_SCALA)
@echo $@
$(MILL) korn.assembly
@cp out/korn/assembly.dest/out.jar $(KORN_JAR)
%.java: %.grammar
$(BEAVER) -t $^
%.java: %.flex
$(JFLEX) -nobak $^
%.smt2: %.c $(KORN_JAR) $(KORN_SH)
@echo $@
$(KORN_SH) $(KORN_FLAGS) $< > $@