-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
179 lines (169 loc) · 6.34 KB
/
build.xml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?xml version="1.0" encoding="UTF-8"?>
<project name="aster" default="dist">
<!--
Initialization
-->
<target name="init">
<property file="local.properties"/>
<property file="build.properties"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
</target>
<!--
JavaCV
-->
<target name="-compile-javacv" depends="init" unless="${useprebuilt}">
<subant target="jar">
<fileset dir="external" includes="*/build.xml"/>
</subant>
</target>
<target name="-jar-javacv" depends="-compile-javacv,-jar-javacv-build,-jar-javacv-prebuilt" unless="${useprebuilt}"/>
<target name="-jar-javacv-build" unless="${useprebuilt}">
<copy file="external/javacv/dist/javacv.jar" todir="${dist.dir}"/>
<copy file="external/javacpp/dist/javacpp.jar" todir="${dist.dir}"/>
</target>
<target name="-jar-javacv-prebuilt" if="${useprebuilt}">
<copy todir="${dist.dir}/jar">
<fileset dir="${prebuilt.dir}/javacv" includes="**/*.jar"/>
</copy>
<!-- need windows/macos support -->
<copy todir="${dist.dir}/lib/linux-${arch}">
<fileset dir="${prebuilt.dir}/opencv/linux-${arch}" includes="*"/>
</copy>
</target>
<target name="-clean-javacv" unless="${useprebuilt}">
<subant target="clean">
<fileset dir="external" includes="*/build.xml"/>
</subant>
</target>
<!--
ddmlib
-->
<target name="-compile-ddmlib" depends="init">
<javac includeantruntime="false"
srcdir="src/com/android/ddmlib"
destdir="${build.classes.dir}">
<classpath>
<fileset dir="${framework.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-jar-ddmlib" depends="-compile-ddmlib">
<jar destfile="${dist.dir}/jar/ddmlib.jar"
basedir="${build.classes.dir}"
includes="com/android/ddmlib/**/*.class"/>
</target>
<!--
ChimpChat
-->
<target name="-compile-chimpchat" depends="init">
<javac includeantruntime="false"
srcdir="src/com/android/chimpchat"
destdir="${build.classes.dir}">
<classpath>
<fileset dir="${framework.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-jar-chimpchat" depends="-compile-chimpchat">
<jar destfile="${dist.dir}/jar/chimpchat.jar"
basedir="${build.classes.dir}"
includes="com/android/chimpchat/**/*.class"/>
</target>
<!--
NinePatch
-->
<target name="-compile-ninepatch" depends="init">
<javac includeantruntime="false"
srcdir="src/com/android/ninepatch"
destdir="${build.classes.dir}">
<classpath>
<fileset dir="${framework.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-jar-ninepatch" depends="-compile-ninepatch">
<jar destfile="${dist.dir}/jar/ninepatch.jar"
basedir="${build.classes.dir}"
includes="com/android/ninepatch/**/*.class"/>
</target>
<!--
Owl
-->
<target name="-compile-owl" depends="init">
<javac includeantruntime="false"
srcdir="src/org/zeroxlab/owl"
destdir="${build.classes.dir}">
<classpath>
<fileset dir="${prebuilt.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-jar-owl" depends="-compile-owl">
<jar destfile="${dist.dir}/jar/owl.jar"
basedir="${build.classes.dir}"
includes="org/zeroxlab/owl/**/*.class"
manifest="etc/owl/manifest.txt"/>
</target>
<!--
WookieeRunner
-->
<target name="-compile-wookieerunner" depends="init">
<javac includeantruntime="false"
srcdir="src/org/zeroxlab/wookieerunner"
destdir="${build.classes.dir}">
<classpath>
<fileset dir="${prebuilt.dir}" includes="**/*.jar"/>
<fileset dir="${framework.dir}" includes="**/*.jar"/>
</classpath>
</javac>
<copy file="src/python/WookieeRunnerWrapper.py" todir="${build.classes.dir}"/>
</target>
<target name="-jar-wookieerunner" depends="-compile-wookieerunner">
<jar destfile="${dist.dir}/jar/wookieerunner.jar"
basedir="${build.classes.dir}"
includes="org/zeroxlab/wookieerunner/**/*.class,**/*.py"
manifest="etc/wookieerunner/manifest.txt"/>
</target>
<!--
Aster IDE
-->
<target name="-compile-aster" depends="init">
<javac includeantruntime="false"
debug="true"
srcdir="src/org/zeroxlab/aster"
destdir="${build.classes.dir}">
<!-- <compilerarg value="-Xlint"/> -->
<classpath>
<fileset dir="${framework.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-jar-aster" depends="-compile-aster">
<jar destfile="${dist.dir}/jar/aster.jar"
manifest="etc/aster/manifest.txt">
<fileset dir="${build.classes.dir}"
includes="org/zeroxlab/aster/**/*.class"/>
<fileset dir="res"
includes="*.png"/>
</jar>
</target>
<!--
Targets
-->
<target name="compile" depends="init,-compile-javacv,-compile-ddmlib,-compile-chimpchat,-compile-ninepatch,-compile-owl,-compile-wookieerunner,-compile-aster"/>
<target name="jar" depends="init,-jar-javacv,-jar-ddmlib,-jar-chimpchat,-jar-ninepatch,-jar-owl,-jar-wookieerunner,-jar-aster"/>
<target name="dist" depends="jar">
<copy file="bin/adb" todir="${dist.dir}/bin"/>
<copy file="etc/wookieerunner/wookieerunner" todir="${dist.dir}"/>
<copy file="etc/aster/aster" todir="${dist.dir}"/>
<chmod file="${dist.dir}/bin/adb" perm="ugo+x"/>
<chmod file="${dist.dir}/wookieerunner" perm="ugo+x"/>
<chmod file="${dist.dir}/aster" perm="ugo+x"/>
</target>
<target name="clean" depends="init,-clean-javacv">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}" />
</target>
</project>
<!-- vim: set ts=4 sts=4 sw=4 expandtab: -->