-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (29 loc) · 948 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (29 loc) · 948 Bytes
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
-include Makefile.local
ifndef HOLMAKE # we need a specific HOL version - see README.md
HOLMAKE = Holmake
endif
SRCDIR = $(CURDIR)/src
EXAMPLES = $(SRCDIR)/tools/lifter/examples \
$(SRCDIR)/tools/cfg/examples \
$(SRCDIR)/tools/wp/examples
BENCHMARKS = $(SRCDIR)/tools/lifter/benchmark \
$(SRCDIR)/tools/wp/benchmark
# recursive wildcard function
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
HOLMAKEFILE_GENS = $(call rwildcard,src/,Holmakefile.gen)
HOLMAKEFILES = $(HOLMAKEFILE_GENS:.gen=)
main: $(HOLMAKEFILES)
cd $(SRCDIR) && $(HOLMAKE)
%Holmakefile: %Holmakefile.gen
@./gen_Holmakefiles.py $<
examples: main $(EXAMPLES)
$(EXAMPLES):
cd $@ && $(HOLMAKE)
benchmarks: main $(BENCHMARKS)
$(BENCHMARKS):
cd $@ && $(HOLMAKE)
cleanslate:
git clean -f -d -x src
.PHONY: main cleanslate
.PHONY: examples $(EXAMPLES)
.PHONY: benchmarks $(BENCHMARKS)