1 <project name="gdx" default="all" basedir=".">
\r
2 <description>libgdx distribution build file</description>
\r
3 <property environment="env" />
\r
5 <!-- ndk directory -->
\r
6 <property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
\r
8 <!-- library version -->
\r
9 <property name="version" value="0.9.9-SNAPSHOT"/>
\r
11 <!-- define distribution/output directory -->
\r
12 <property name="distDir" value="${basedir}/dist"/>
\r
14 <!-- should we build natives? -->
\r
15 <property name="build-natives" value="false"/>
\r
17 <!-- clean distribution/output directory -->
\r
18 <target name="clean">
\r
19 <delete dir="${distDir}"/>
\r
22 <!-- build the core of the library plus all backends -->
\r
24 <target name="gdx-jnigen">
\r
25 <ant antfile="../../build-template.xml" dir="extensions/gdx-jnigen">
\r
26 <property name="distDir" value="${distDir}/extensions/gdx-jnigen"/>
\r
27 <property name="jar" value="gdx-jnigen"/>
\r
28 <!-- we shouldn't build any natives -->
\r
29 <property name="build-natives" value="false"/>
\r
33 <!-- gdx setup ui, custom target -->
\r
34 <target name="gdx-setup-ui">
\r
35 <ant antfile="build.xml" dir="extensions/gdx-setup-ui/"/>
\r
36 <copy tofile="${distDir}/gdx-setup-ui.jar" file="extensions/gdx-setup-ui/gdx-setup-ui.jar"/>
\r
40 <target name="gdx-core" depends="gdx-jnigen">
\r
41 <path id="classpath">
\r
42 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
44 <fileset id="resourcefiles" dir="gdx/src">
\r
45 <include name="com/badlogic/gdx/graphics/g3d/shaders/default.fragment.glsl"/>
\r
46 <include name="com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl"/>
\r
47 <include name="com/badlogic/gdx/utils/arial-15.png"/>
\r
48 <include name="com/badlogic/gdx/utils/arial-15.fnt"/>
\r
50 <ant antfile="../build-template.xml" dir="gdx">
\r
51 <property name="jar" value="gdx"/>
\r
52 <reference refid="classpath"/>
\r
53 <reference refid="resourcefiles"/>
\r
55 <!-- the ndk clean process deletes all shared libs in libs/armeabi(-v7a), need to copy
\r
56 the GLES 2.0 bindings manually... -->
\r
57 <copy tofile="${distDir}/armeabi/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
58 <copy tofile="${distDir}/armeabi-v7a/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
61 <!-- gdx openal, for all desktop backends -->
\r
62 <target name="gdx-openal" depends="gdx-core">
\r
63 <path id="classpath">
\r
64 <pathelement location="${distDir}/gdx.jar"/>
\r
66 <ant antfile="../../build-template.xml" dir="backends/gdx-openal">
\r
67 <property name="jar" value="gdx-openal"/>
\r
68 <reference refid="classpath"/>
\r
72 <!-- gdx lwjgl backend -->
\r
73 <target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
\r
74 <path id="classpath">
\r
75 <pathelement location="${distDir}/gdx.jar"/>
\r
76 <pathelement location="${distDir}/gdx-openal.jar"/>
\r
78 <zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
\r
79 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
\r
80 <property name="jar" value="gdx-backend-lwjgl"/>
\r
81 <reference refid="classpath"/>
\r
82 <reference refid="jarfiles"/>
\r
86 <!-- gdx jglfw backend -->
\r
87 <target name="gdx-backend-jglfw" depends="gdx-core">
\r
88 <mkdir dir="backends/gdx-backend-jglfw/libs"/>
\r
89 <get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw.jar" dest="backends/gdx-backend-jglfw/libs/jglfw.jar"/>
\r
90 <get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw-natives.jar" dest="backends/gdx-backend-jglfw/libs/gdx-backend-jglfw-natives.jar"/>
\r
91 <path id="classpath">
\r
92 <pathelement location="${distDir}/gdx.jar"/>
\r
94 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-jglfw">
\r
95 <property name="jar" value="gdx-backend-jglfw"/>
\r
96 <reference refid="classpath"/>
\r
100 <!-- gdx android backend -->
\r
101 <target name="gdx-backend-android" depends="gdx-core">
\r
102 <path id="classpath">
\r
103 <pathelement location="${distDir}/gdx.jar"/>
\r
105 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
\r
106 <property name="jar" value="gdx-backend-android"/>
\r
107 <reference refid="classpath"/>
\r
111 <!-- gdx gwt backend -->
\r
112 <target name="gdx-backend-gwt" depends="gdx-core">
\r
113 <path id="classpath">
\r
114 <pathelement location="${distDir}/gdx.jar"/>
\r
116 <ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
\r
117 <property name="jar" value="gdx-backend-gwt"/>
\r
118 <reference refid="classpath"/>
\r
122 <!-- gdx ios-monotouch backend -->
\r
123 <target name="gdx-backend-iosmonotouch" depends="gdx-core">
\r
124 <path id="classpath">
\r
125 <pathelement location="${distDir}/gdx.jar"/>
\r
126 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/monotouch-5.4.0.jar"/>
\r
127 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/mscorlib-4.0.jar"/>
\r
128 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/opentk-5.4.0.jar"/>
\r
129 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-2.1.jar"/>
\r
130 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-core-2.1.jar"/>
\r
131 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-data-2.1.jar"/>
\r
132 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/objectal/libObjectAL.jar"/>
\r
134 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-iosmonotouch">
\r
135 <property name="jar" value="gdx-backend-iosmonotouch"/>
\r
136 <reference refid="classpath"/>
\r
140 <!-- build the extensions -->
\r
142 <target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
\r
143 <path id="classpath">
\r
144 <pathelement location="${distDir}/gdx.jar"/>
\r
145 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
147 <fileset id="resourcefiles" dir="extensions/gdx-tools/assets"/>
\r
148 <ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
\r
149 <property name="distDir" value="${distDir}/extensions/gdx-tools"/>
\r
150 <property name="jar" value="gdx-tools"/>
\r
151 <reference refid="classpath"/>
\r
152 <reference refid="resourcefiles"/>
\r
156 <!-- gdx tiled preprocessor -->
\r
157 <target name="gdx-tiled-preprocessor" depends="gdx-core,gdx-backend-lwjgl,gdx-tools">
\r
158 <path id="classpath">
\r
159 <pathelement location="${distDir}/gdx.jar"/>
\r
160 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
161 <pathelement location="${distDir}/extensions/gdx-tools/gdx-tools.jar"/>
\r
163 <ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
\r
164 <property name="distDir" value="${distDir}/extensions/gdx-tiled-preprocessor"/>
\r
165 <property name="jar" value="gdx-tiled-preprocessor"/>
\r
166 <reference refid="classpath"/>
\r
170 <!-- gdx controllers -->
\r
171 <target name="gdx-controllers" depends="gdx-core">
\r
172 <path id="classpath">
\r
173 <pathelement location="${distDir}/gdx.jar"/>
\r
175 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers">
\r
176 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
177 <property name="jar" value="gdx-controllers"/>
\r
178 <reference refid="classpath"/>
\r
182 <target name="gdx-controllers-desktop" depends="gdx-core,gdx-jnigen,gdx-controllers">
\r
183 <path id="classpath">
\r
184 <pathelement location="${distDir}/gdx.jar"/>
\r
185 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
186 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
188 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-desktop">
\r
189 <property name="distDir" value="${distDir}/extensions/gdx-controllers/"/>
\r
190 <property name="jar" value="gdx-controllers-desktop"/>
\r
191 <reference refid="classpath"/>
\r
195 <target name="gdx-controllers-android" depends="gdx-core,gdx-backend-android,gdx-controllers">
\r
196 <path id="classpath">
\r
197 <pathelement location="${distDir}/gdx.jar"/>
\r
198 <pathelement location="${distDir}/gdx-backend-android.jar"/>
\r
199 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
200 <pathelement location="${basedir}/backends/gdx-backend-android/libs/android-4.2.jar"/>
\r
202 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-android">
\r
203 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
204 <property name="jar" value="gdx-controllers-android"/>
\r
205 <reference refid="classpath"/>
\r
209 <target name="gdx-controllers-gwt" depends="gdx-core,gdx-backend-gwt,gdx-controllers">
\r
210 <path id="classpath">
\r
211 <pathelement location="${distDir}/gdx.jar"/>
\r
212 <pathelement location="${distDir}/gdx-backend-gwt.jar"/>
\r
213 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
215 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-gwt">
\r
216 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
217 <property name="jar" value="gdx-controllers-gwt"/>
\r
218 <reference refid="classpath"/>
\r
223 <target name="gdx-image" depends="gdx-core">
\r
224 <path id="classpath">
\r
225 <pathelement location="${distDir}/gdx.jar"/>
\r
226 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
228 <ant antfile="../../build-template.xml" dir="extensions/gdx-image">
\r
229 <property name="distDir" value="${distDir}/extensions/gdx-image"/>
\r
230 <property name="jar" value="gdx-image"/>
\r
231 <reference refid="classpath"/>
\r
236 <target name="gdx-audio" depends="gdx-core">
\r
237 <path id="classpath">
\r
238 <pathelement location="${distDir}/gdx.jar"/>
\r
239 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
241 <ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
\r
242 <property name="distDir" value="${distDir}/extensions/gdx-audio"/>
\r
243 <property name="jar" value="gdx-audio"/>
\r
244 <reference refid="classpath"/>
\r
248 <!-- gdx freetype -->
\r
249 <target name="gdx-freetype" depends="gdx-core">
\r
250 <path id="classpath">
\r
251 <pathelement location="${distDir}/gdx.jar"/>
\r
252 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
254 <ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
\r
255 <property name="distDir" value="${distDir}/extensions/gdx-freetype"/>
\r
256 <property name="jar" value="gdx-freetype"/>
\r
257 <reference refid="classpath"/>
\r
261 <!-- gdx bullet -->
\r
262 <target name="gdx-bullet" depends="gdx-core">
\r
263 <path id="classpath">
\r
264 <pathelement location="${distDir}/gdx.jar"/>
\r
265 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
268 <pathelement location="extensions/gdx-bullet/src"/>
\r
269 <pathelement location="extensions/gdx-bullet/jni/swig-src"/>
\r
271 <ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
\r
272 <property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
\r
273 <property name="jar" value="gdx-bullet"/>
\r
274 <reference refid="classpath"/>
\r
275 <reference refid="src"/>
\r
279 <!-- generates the javadoc for the core api and the application implementations -->
\r
280 <target name="docs" depends="clean">
\r
281 <javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
\r
282 windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API" useexternalfile="true">
\r
286 body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
\r
287 pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
\r
288 h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
\r
289 .TableHeadingColor { background:#EEEEFF; }
\r
290 a { text-decoration:none }
\r
291 a:hover { text-decoration:underline }
\r
292 a:link, a:visited { color:blue }
\r
293 table { border:0px }
\r
294 .TableRowColor td:first-child { border-left:1px solid black }
\r
295 .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
\r
296 hr { border:0px; border-bottom:1px solid #333366; }
\r
300 <div style="font-size:9pt"><i>
\r
301 Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
\r
304 <fileset dir="gdx/src" defaultexcludes="yes">
\r
305 <include name="com/badlogic/gdx/**" />
\r
306 <exclude name="com/badlogic/gdx/**/*.glsl"/>
\r
307 <exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
\r
308 <exclude name="com/badlogic/gdx/utils/arial-15.png" />
\r
309 <exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
\r
310 <exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
\r
312 <fileset dir="backends" includes="gdx-backend-jglfw/src/com/badlogic/gdx/backends/jglfw/JglfwApplication.java"/>
\r
313 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
\r
314 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
\r
315 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
\r
316 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
\r
317 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
\r
318 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java"/>
\r
319 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplicationConfiguration.java"/>
\r
320 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java"/>
\r
321 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java"/>
\r
325 <!-- assumes that all the .dll and .a files have been compiled on a Mac and copied on top
\r
326 of the current libgdx folder -->
\r
327 <target name="copy-iosfiles">
\r
328 <!-- copy dll and .a files as well as IKVM, monotouch and ObjectAL binaries to ios folder-->
\r
329 <copy todir="${distDir}/ios" flatten="true" failonerror="false">
\r
330 <fileset dir="gdx/libs/ios32/">
\r
331 <include name="*.a"/>
\r
332 <include name="*.dll"/>
\r
333 <include name="*.dll.mdb"/>
\r
335 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ios32">
\r
336 <include name="*.dll"/>
\r
337 <include name="*.dll.mdb"/>
\r
338 <include name="*.a"/>
\r
341 <copy todir="${distDir}/ios/ikvm" failonerror="false">
\r
342 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ikvm"/>
\r
344 <copy todir="${distDir}/ios/monotouch-jars" failonerror="false">
\r
345 <fileset dir="backends/gdx-backend-iosmonotouch/libs/monotouch-jars"/>
\r
347 <copy todir="${distDir}/ios/objectal" failonerror="false">
\r
348 <fileset dir="backends/gdx-backend-iosmonotouch/libs/objectal"/>
\r
351 <!-- copy freetype extension dll and .a files -->
\r
352 <copy todir="${distDir}/extensions/gdx-freetype/ios" failonerror="false">
\r
353 <fileset dir="extensions/gdx-freetype/libs/ios32">
\r
354 <include name="*.a"/>
\r
355 <include name="*.dll"/>
\r
356 <include name="*.dll.mdb"/>
\r
360 <!-- copy bullet extension dll and .a files -->
\r
361 <copy todir="${distDir}/extensions/gdx-bullet/ios" failonerror="false">
\r
362 <fileset dir="extensions/gdx-bullet/libs/ios32">
\r
363 <include name="*.a"/>
\r
364 <include name="*.dll"/>
\r
365 <include name="*.dll.mdb"/>
\r
370 <target name="jars"
\r
371 depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-android,gdx-backend-gwt,gdx-backend-iosmonotouch,gdx-tools,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet"/>
\r
373 <target name="all" depends="jars,docs,copy-iosfiles">
\r
374 <!-- copy distribution files (licences etc.) -->
\r
375 <copy tofile="${distDir}/README" file="gdx/dist/README"/>
\r
376 <copy tofile="${distDir}/LICENSE" file="gdx/dist/LICENSE"/>
\r
377 <copy tofile="${distDir}/CC-LICENSE" file="gdx/dist/CC-LICENSE"/>
\r
378 <copy tofile="${distDir}/AUTHORS" file="gdx/dist/AUTHORS"/>
\r
379 <copy tofile="${distDir}/CONTRIBUTORS" file="gdx/dist/CONTRIBUTORS"/>
\r
381 <!-- zip dist dir -->
\r
382 <zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
\r