forked from libgdx/libgdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
256 lines (234 loc) · 10.1 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<project name="gdx" default="all" basedir=".">
<description>libgdx distribution build file</description>
<property environment="env" />
<!-- ndk directory -->
<property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
<!-- library version -->
<property name="version" value="0.9.3"/>
<!-- define distribution/output directory -->
<property name="distDir" value="${basedir}/dist"/>
<!-- should we build natives? -->
<property name="build-natives" value="false"/>
<!-- clean distribution/output directory -->
<target name="clean">
<delete dir="${distDir}"/>
</target>
<!-- build the core of the library plus all backends -->
<!-- gdx jnigen -->
<target name="gdx-jnigen">
<ant antfile="../../build-template.xml" dir="extensions/gdx-jnigen">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-jnigen"/>
<!-- we shouldn't build any natives -->
<property name="build-natives" value="false"/>
</ant>
</target>
<!-- gdx core -->
<target name="gdx-core" depends="gdx-jnigen">
<path id="classpath">
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../build-template.xml" dir="gdx">
<property name="jar" value="gdx"/>
<reference refid="classpath"/>
</ant>
<!-- the ndk clean process deletes all shared libs in libs/armeabi(-v7a), need to copy
the GLES 2.0 bindings manually... -->
<copy tofile="${distDir}/armeabi/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
<copy tofile="${distDir}/armeabi-v7a/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
</target>
<!-- gdx openal, for all desktop backends -->
<target name="gdx-openal" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-openal">
<property name="jar" value="gdx-openal"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx jogl backend -->
<target name="gdx-backend-jogl" depends="gdx-core,gdx-openal">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-openal.jar"/>
</path>
<zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-jogl">
<property name="jar" value="gdx-backend-jogl"/>
<reference refid="classpath"/>
<reference refid="jarfiles"/>
</ant>
</target>
<!-- gdx lwjgl backend -->
<target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-openal.jar"/>
</path>
<zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
<property name="jar" value="gdx-backend-lwjgl"/>
<reference refid="classpath"/>
<reference refid="jarfiles"/>
</ant>
</target>
<!-- gdx android backend -->
<target name="gdx-backend-android" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
<property name="jar" value="gdx-backend-android"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx gwt backend -->
<target name="gdx-backend-gwt" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
<property name="jar" value="gdx-backend-gwt"/>
<reference refid="classpath"/>
<reference refid="jarfiles"/>
</ant>
</target>
<!-- build the extensions -->
<!-- gdx tools -->
<target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-jogl">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
<pathelement location="${distDir}/gdx-backend-jogl.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-tools"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx tiled processor -->
<target name="gdx-tiled-preprocessor" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-jogl.jar"/>
<pathelement location="${distDir}/extensions/gdx-tools.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-tiled-preprocessor"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx stb truetype -->
<target name="gdx-stb-truetype" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-stb-truetype">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-stb-truetype"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx image -->
<target name="gdx-image" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-image">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-image"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx audio -->
<target name="gdx-audio" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-audio"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx freetype -->
<target name="gdx-freetype" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
<property name="distDir" value="${distDir}/extensions"/>
<property name="jar" value="gdx-freetype"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx bullet -->
<target name="gdx-bullet" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
<property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
<property name="jar" value="gdx-bullet"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- generates the javadoc for the core api and the application implementations -->
<target name="docs" depends="clean">
<javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API">
<header><![CDATA[
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
]]></header>
<bottom><![CDATA[
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner ([email protected]), Nathan Sweet ([email protected])
</i></div>
]]></bottom>
<fileset dir="gdx/src" defaultexcludes="yes">
<include name="com/badlogic/gdx/**" />
<exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
<exclude name="com/badlogic/gdx/utils/arial-15.png" />
<exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
<exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
</fileset>
<fileset dir="backends" includes="gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglApplication.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
</javadoc>
</target>
<target name="all" depends="clean,gdx-core,gdx-openal,gdx-backend-jogl,gdx-backend-lwjgl,gdx-backend-android,gdx-backend-gwt,gdx-tools,gdx-tiled-preprocessor,gdx-stb-truetype,gdx-image,gdx-audio,gdx-freetype,docs">
<!-- copy distribution files (licences etc.) -->
<copy tofile="${distDir}/README" file="gdx/dist/README"/>
<copy tofile="${distDir}/LICENSE" file="gdx/dist/LICENSE"/>
<copy tofile="${distDir}/CC-LICENSE" file="gdx/dist/CC-LICENSE"/>
<copy tofile="${distDir}/AUTHORS" file="gdx/dist/AUTHORS"/>
<copy tofile="${distDir}/CONTRIBUTORS" file="gdx/dist/CONTRIBUTORS"/>
<!-- zip dist dir -->
<zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
</target>
</project>