-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
120 lines (95 loc) · 3.3 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
## @author Manuel Gieseking
# dependencies (folders and repos should be equally ordered)
DEPENDENCIES_FOLDERS="libs,examples,framework,synthesizer"
DEPENDENCIES_REPOS="https://github.com/adamtool/libs.git,https://github.com/adamtool/examples.git,https://github.com/adamtool/framework.git,https://github.com/adamtool/synthesizer.git"
DEPENDENCIES_REV="HEAD,HEAD,HEAD,HEAD"
# the build target
FRAMEWORK_TARGETS = tools petrinetwithtransits
SYNTHESIZER_TARGETS = petrigames symbolic bounded
t=javac
# should be executed no matter if a file with the same name exists or not
.PHONY: check_dependencies
.PHONY: pull_dependencies
.PHONY: rm_dependencies
.PHONY: tools
.PHONY: petrinetwithtransits
.PHONY: petrigames
.PHONY: bounded
.PHONY: symbolic
.PHONY: bdd
.PHONY: mtbdd
.PHONY: bounded_deploy_noUI
#.PHONY: javadoc
.PHONY: setJavac
.PHONY: setJar
.PHONY: setStandalone
.PHONY: setClean
.PHONY: setCleanAll
.PHONY: clean
.PHONY: clean-all
.PHONY: src_withlibs
.PHONY: src
define generate_src
mkdir -p adam_src
if [ $(1) = true ]; then\
cp -R ./dependencies/libs ./adam_src/libs/; \
rm -rf ./adam_src/libs/.git; \
fi
for i in $$(find . -type d \( -path ./benchmarks -o -path ./test/lib -o -path ./lib -o -path ./adam_src -o -path ./dependencies -o -path ./.git \) -prune -o -name '*' -not -regex ".*\(class\|qcir\|pdf\|tex\|apt\|dot\|jar\|ods\|txt\|tar.gz\|aux\|log\|res\|aig\|aag\|lola\|cex\|properties\|json\|xml\|out\|pnml\|so\)" -type f); do \
echo "cp" $$i; \
cp --parent $$i ./adam_src/ ;\
done
tar -zcvf adam_src.tar.gz adam_src
rm -r -f ./adam_src
endef
# targets
all: $(FRAMEWORK_TARGETS) $(SYNTHESIZER_TARGETS)
check_dependencies:
@if [ ! -d "dependencies" ]; then \
echo "The dependencies folder is missing. Please execute make pull_dependencies first.";\
fi
pull_dependencies:
./pull_dependencies.sh ${DEPENDENCIES_FOLDERS} ${DEPENDENCIES_REPOS} ${DEPENDENCIES_REV}
rm_dependencies:
$(RM) -rf dependencies
tools: check_dependencies
ant -buildfile ./dependencies/framework/tools/build.xml $(t)
petrinetwithtransits: check_dependencies
ant -buildfile ./dependencies/framework/petrinetWithTransits/build.xml $(t)
petrigames: check_dependencies
ant -buildfile ./dependencies/synthesizer/petriGames/build.xml $(t)
bdd: check_dependencies
ant -buildfile ./dependencies/synthesizer/symbolicalgorithms/bddapproach/build.xml $(t)
mtbdd: check_dependencies
ant -buildfile ./dependencies/synthesizer/symbolicalgorithms/mtbddapproach/build.xml $(t)
symbolic: bdd mtbdd
bounded: check_dependencies
ant -buildfile ./build.xml $(t)
setJavac:
$(eval t=javac)
setStandalone:
$(eval t=jar-standalone)
setDeployBounded:
$(eval t=deploy_bounded)
setClean:
$(eval t=clean)
setCleanAll:
$(eval t=clean-all)
bounded_deploy_noUI: $(FRAMEWORK_TARGETS) petrigames bounded setDeployBounded backend
mkdir -p deploy
echo "$(call create_bashscript, _bounded)" > ./deploy/adam_bounded
chmod +x ./deploy/adam_bounded
cp ./adam_bounded.jar ./deploy/Adam_bounded.jar
cp ./ADAM.properties ./deploy/ADAM.properties
clean: setClean $(FRAMEWORK_TARGETS) $(SYNTHESIZER_TARGETS)
$(RM) -r -f deploy
$(RM) -r -f javadoc
clean-all: setCleanAll $(FRAMEWORK_TARGETS) $(SYNTHESIZER_TARGETS)
$(RM) -r -f deploy
$(RM) -r -f javadoc
#javadoc:
# ant javadoc
src_withlibs: clean-all
$(call generate_src, true)
src: clean-all
$(call generate_src, false)