-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
145 lines (114 loc) · 4.91 KB
/
build.xml
File metadata and controls
145 lines (114 loc) · 4.91 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?xml version="1.0" ?>
<!--
Copyright (C) 2013 Quoc-Sang Phan
This file is part of aZ3, an All-SMT solver based on z3.
aZ3 is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
aZ3 is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
aZ3. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
build.xml - generic JPF extension build script
using Ant (http://jakarta.apache.org/ant)
public targets:
compile compile JPF and its specific (modeled) environment libraries
test run all JPF tests
jar build JPF jar files
dist build binary distribution
clean remove the files that have been generated by the build process
-->
<project name="aZ3" default="build" basedir=".">
<!-- ========================== COMMON SECTION ========================== -->
<!-- compiler settings -->
<property name="src_level" value="7"/>
<property name="debug" value="on"/>
<property name="deprecation" value="on"/>
<property environment="aZ3env"/>
<!-- generic classpath settings -->
<path id="lib.path">
<!-- our own classes and libs come first -->
<pathelement location="build/main"/>
<!-- <pathelement path="${aZ3env.Z3_HOME}/com.microsoft.z3.jar" /> -->
<pathelement path="lib/com.microsoft.z3.jar" />
</path>
<!-- init: common initialization -->
<target name="-init">
<tstamp/>
<mkdir dir="build"/> <!-- the build root -->
<!-- the things that have to be in the classpath of whatever runs Ant -->
<available property="have_javac" classname="com.sun.tools.javac.Main"/>
<fail unless="have_javac">no javac found</fail>
<available file="src/main" type="dir" property="have_main"/>
<available file="src/tests" type="dir" property="have_tests"/>
<available file="src/examples" type="dir" property="have_examples"/>
<condition property="have_jvm_code">
<or>
<isset property="have_main"/>
</or>
</condition>
</target>
<!-- ======================= COMPILE SECTION ============================= -->
<!-- public compile -->
<target name="compile" depends="-init,-compile-main,-compile-tests,-compile-examples"
description="compile all JPF core sources" >
</target>
<target name="-compile-main" if="have_main">
<mkdir dir="build/main"/>
<!--TODO: remove src/examples from srcdir after configuring dynamically program inputs-->
<javac srcdir="src/main" destdir="build/main" includeantruntime="false"
debug="${debug}" source="${src_level}" deprecation="${deprecation}"
classpathref="lib.path"/>
</target>
<target name="-compile-tests" if="have_tests" depends="-compile-main">
<mkdir dir="build/tests"/>
<javac srcdir="src/tests" destdir="build/tests" includeantruntime="false"
debug="${debug}" source="${src_level}" deprecation="${deprecation}">
<classpath>
<path refid="lib.path"/>
<pathelement location="build/classes"/>
<pathelement location="build/annotations"/>
</classpath>
</javac>
</target>
<target name="-compile-examples" if="have_examples" depends="-compile-main">
<mkdir dir="build/examples" />
<javac srcdir="src/examples" destdir="build/examples" includeantruntime="false"
debug="${debug}" source="${src_level}" deprecation="${deprecation}">
<classpath>
<path refid="lib.path"/>
<pathelement location="build/classes"/>
<pathelement location="build/annotations"/>
</classpath>
</javac>
</target>
<!-- ======================= MISC SECTION ================================ -->
<!-- build jars -->
<target name="build" depends="compile,-jar-tool"
description="generate the ${ant.project.name} jar files" >
</target>
<target name="-jar-tool" if="have_jvm_code">
<jar jarfile="build/aZ3.jar">
<fileset dir="build/main">
</fileset>
<manifest>
<attribute name="Main-Class" value="qs.phan.allsmt.tool.RunAllZ3" />
<attribute name="Class-PATH" value="${aZ3env.Z3_HOME}/com.microsoft.z3.jar" />
</manifest>
</jar>
<chmod file="build/aZ3.jar" perm="ugo+rx"/>
</target>
<!-- public clean: cleanup from previous tasks/builds -->
<target name="clean">
<delete dir="build" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no" />
<fileset dir="." includes="**/*.bak" defaultexcludes="no" />
<fileset dir="." includes="**/error.xml" />
</delete>
</target>
</project>