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 <ant antfile="../build-template.xml" dir="gdx">
\r
45 <property name="jar" value="gdx"/>
\r
46 <reference refid="classpath"/>
\r
48 <!-- the ndk clean process deletes all shared libs in libs/armeabi(-v7a), need to copy
\r
49 the GLES 2.0 bindings manually... -->
\r
50 <copy tofile="${distDir}/armeabi/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
51 <copy tofile="${distDir}/armeabi-v7a/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
54 <!-- gdx openal, for all desktop backends -->
\r
55 <target name="gdx-openal" depends="gdx-core">
\r
56 <path id="classpath">
\r
57 <pathelement location="${distDir}/gdx.jar"/>
\r
59 <ant antfile="../../build-template.xml" dir="backends/gdx-openal">
\r
60 <property name="jar" value="gdx-openal"/>
\r
61 <reference refid="classpath"/>
\r
65 <!-- gdx lwjgl backend -->
\r
66 <target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
\r
67 <path id="classpath">
\r
68 <pathelement location="${distDir}/gdx.jar"/>
\r
69 <pathelement location="${distDir}/gdx-openal.jar"/>
\r
71 <zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
\r
72 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
\r
73 <property name="jar" value="gdx-backend-lwjgl"/>
\r
74 <reference refid="classpath"/>
\r
75 <reference refid="jarfiles"/>
\r
79 <!-- gdx android backend -->
\r
80 <target name="gdx-backend-android" depends="gdx-core">
\r
81 <path id="classpath">
\r
82 <pathelement location="${distDir}/gdx.jar"/>
\r
84 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
\r
85 <property name="jar" value="gdx-backend-android"/>
\r
86 <reference refid="classpath"/>
\r
90 <!-- gdx gwt backend -->
\r
91 <target name="gdx-backend-gwt" depends="gdx-core">
\r
92 <path id="classpath">
\r
93 <pathelement location="${distDir}/gdx.jar"/>
\r
95 <ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
\r
96 <property name="jar" value="gdx-backend-gwt"/>
\r
97 <reference refid="classpath"/>
\r
101 <!-- gdx ios-monotouch backend -->
\r
102 <target name="gdx-backend-iosmonotouch" depends="gdx-core">
\r
103 <path id="classpath">
\r
104 <pathelement location="${distDir}/gdx.jar"/>
\r
105 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/monotouch-5.4.0.jar"/>
\r
106 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/mscorlib-4.0.jar"/>
\r
107 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/opentk-5.4.0.jar"/>
\r
108 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-2.1.jar"/>
\r
109 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-core-2.1.jar"/>
\r
110 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-data-2.1.jar"/>
\r
111 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/objectal/libObjectAL.jar"/>
\r
113 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-iosmonotouch">
\r
114 <property name="jar" value="gdx-backend-iosmonotouch"/>
\r
115 <reference refid="classpath"/>
\r
119 <!-- build the extensions -->
\r
121 <target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
\r
122 <path id="classpath">
\r
123 <pathelement location="${distDir}/gdx.jar"/>
\r
124 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
126 <ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
\r
127 <property name="distDir" value="${distDir}/extensions/gdx-tools"/>
\r
128 <property name="jar" value="gdx-tools"/>
\r
129 <reference refid="classpath"/>
\r
133 <!-- gdx tiled processor -->
\r
134 <target name="gdx-tiled-preprocessor" depends="gdx-core">
\r
135 <path id="classpath">
\r
136 <pathelement location="${distDir}/gdx.jar"/>
\r
137 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
138 <pathelement location="${distDir}/extensions/gdx-tools/gdx-tools.jar"/>
\r
140 <ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
\r
141 <property name="distDir" value="${distDir}/extensions/gdx-tiled-preprocessor"/>
\r
142 <property name="jar" value="gdx-tiled-preprocessor"/>
\r
143 <reference refid="classpath"/>
\r
147 <!-- gdx controllers -->
\r
148 <target name="gdx-controllers" depends="gdx-core">
\r
149 <path id="classpath">
\r
150 <pathelement location="${distDir}/gdx.jar"/>
\r
152 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers">
\r
153 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
154 <property name="jar" value="gdx-controllers"/>
\r
155 <reference refid="classpath"/>
\r
159 <target name="gdx-controllers-desktop" depends="gdx-core,gdx-backend-lwjgl,gdx-jnigen,gdx-controllers">
\r
160 <path id="classpath">
\r
161 <pathelement location="${distDir}/gdx.jar"/>
\r
162 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
163 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
164 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
166 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-desktop">
\r
167 <property name="distDir" value="${distDir}/extensions/gdx-controllers/"/>
\r
168 <property name="jar" value="gdx-controllers-desktop"/>
\r
169 <reference refid="classpath"/>
\r
173 <target name="gdx-controllers-android" depends="gdx-core,gdx-backend-android,gdx-controllers">
\r
174 <path id="classpath">
\r
175 <pathelement location="${distDir}/gdx.jar"/>
\r
176 <pathelement location="${distDir}/gdx-backend-android.jar"/>
\r
177 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
178 <pathelement location="${basedir}/backends/gdx-backend-android/libs/android-4.2.jar"/>
\r
180 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-android">
\r
181 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
182 <property name="jar" value="gdx-controllers-android"/>
\r
183 <reference refid="classpath"/>
\r
187 <target name="gdx-controllers-gwt" depends="gdx-core,gdx-backend-gwt,gdx-controllers">
\r
188 <path id="classpath">
\r
189 <pathelement location="${distDir}/gdx.jar"/>
\r
190 <pathelement location="${distDir}/gdx-backend-gwt.jar"/>
\r
191 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
193 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-gwt">
\r
194 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
195 <property name="jar" value="gdx-controllers-gwt"/>
\r
196 <reference refid="classpath"/>
\r
201 <target name="gdx-image" depends="gdx-core">
\r
202 <path id="classpath">
\r
203 <pathelement location="${distDir}/gdx.jar"/>
\r
204 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
206 <ant antfile="../../build-template.xml" dir="extensions/gdx-image">
\r
207 <property name="distDir" value="${distDir}/extensions/gdx-image"/>
\r
208 <property name="jar" value="gdx-image"/>
\r
209 <reference refid="classpath"/>
\r
214 <target name="gdx-audio" depends="gdx-core">
\r
215 <path id="classpath">
\r
216 <pathelement location="${distDir}/gdx.jar"/>
\r
217 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
219 <ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
\r
220 <property name="distDir" value="${distDir}/extensions/gdx-audio"/>
\r
221 <property name="jar" value="gdx-audio"/>
\r
222 <reference refid="classpath"/>
\r
226 <!-- gdx freetype -->
\r
227 <target name="gdx-freetype" depends="gdx-core">
\r
228 <path id="classpath">
\r
229 <pathelement location="${distDir}/gdx.jar"/>
\r
230 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
232 <ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
\r
233 <property name="distDir" value="${distDir}/extensions/gdx-freetype"/>
\r
234 <property name="jar" value="gdx-freetype"/>
\r
235 <reference refid="classpath"/>
\r
239 <!-- gdx bullet -->
\r
240 <target name="gdx-bullet" depends="gdx-core">
\r
241 <path id="classpath">
\r
242 <pathelement location="${distDir}/gdx.jar"/>
\r
243 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
246 <pathelement location="extensions/gdx-bullet/src"/>
\r
247 <pathelement location="extensions/gdx-bullet/jni/swig-src"/>
\r
249 <ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
\r
250 <property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
\r
251 <property name="jar" value="gdx-bullet"/>
\r
252 <reference refid="classpath"/>
\r
253 <reference refid="src"/>
\r
257 <!-- generates the javadoc for the core api and the application implementations -->
\r
258 <target name="docs" depends="clean">
\r
259 <javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
\r
260 windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API" useexternalfile="true">
\r
264 body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
\r
265 pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
\r
266 h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
\r
267 .TableHeadingColor { background:#EEEEFF; }
\r
268 a { text-decoration:none }
\r
269 a:hover { text-decoration:underline }
\r
270 a:link, a:visited { color:blue }
\r
271 table { border:0px }
\r
272 .TableRowColor td:first-child { border-left:1px solid black }
\r
273 .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
\r
274 hr { border:0px; border-bottom:1px solid #333366; }
\r
278 <div style="font-size:9pt"><i>
\r
279 Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
\r
282 <fileset dir="gdx/src" defaultexcludes="yes">
\r
283 <include name="com/badlogic/gdx/**" />
\r
284 <exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
\r
285 <exclude name="com/badlogic/gdx/utils/arial-15.png" />
\r
286 <exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
\r
287 <exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
\r
289 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
\r
290 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
\r
291 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
\r
292 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
\r
293 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
\r
294 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java"/>
\r
295 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplicationConfiguration.java"/>
\r
296 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java"/>
\r
297 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java"/>
\r
301 <!-- assumes that all the .dll and .a files have been compiled on a Mac and copied on top
\r
302 of the current libgdx folder -->
\r
303 <target name="copy-iosfiles">
\r
304 <!-- copy dll and .a files as well as IKVM, monotouch and ObjectAL binaries to ios folder-->
\r
305 <copy todir="${distDir}/ios" flatten="true" failonerror="false">
\r
306 <fileset dir="gdx/libs/ios32/">
\r
307 <include name="*.a"/>
\r
308 <include name="*.dll"/>
\r
309 <include name="*.dll.mdb"/>
\r
311 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ios32">
\r
312 <include name="*.dll"/>
\r
313 <include name="*.dll.mdb"/>
\r
314 <include name="*.a"/>
\r
317 <copy todir="${distDir}/ios/ikvm" failonerror="false">
\r
318 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ikvm"/>
\r
320 <copy todir="${distDir}/ios/monotouch-jars" failonerror="false">
\r
321 <fileset dir="backends/gdx-backend-iosmonotouch/libs/monotouch-jars"/>
\r
323 <copy todir="${distDir}/ios/objectal" failonerror="false">
\r
324 <fileset dir="backends/gdx-backend-iosmonotouch/libs/objectal"/>
\r
327 <!-- copy freetype extension dll and .a files -->
\r
328 <copy todir="${distDir}/extensions/gdx-freetype/ios" failonerror="false">
\r
329 <fileset dir="extensions/gdx-freetype/libs/ios32">
\r
330 <include name="*.a"/>
\r
331 <include name="*.dll"/>
\r
332 <include name="*.dll.mdb"/>
\r
336 <!-- copy bullet extension dll and .a files -->
\r
337 <copy todir="${distDir}/extensions/gdx-bullet/ios" failonerror="false">
\r
338 <fileset dir="extensions/gdx-bullet/libs/ios32">
\r
339 <include name="*.a"/>
\r
340 <include name="*.dll"/>
\r
341 <include name="*.dll.mdb"/>
\r
346 <target name="jars"
\r
347 depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-android,gdx-backend-gwt,gdx-backend-iosmonotouch,gdx-tools,gdx-tiled-preprocessor,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet"/>
\r
349 <target name="all" depends="jars,docs,copy-iosfiles">
\r
350 <!-- copy distribution files (licences etc.) -->
\r
351 <copy tofile="${distDir}/README" file="gdx/dist/README"/>
\r
352 <copy tofile="${distDir}/LICENSE" file="gdx/dist/LICENSE"/>
\r
353 <copy tofile="${distDir}/CC-LICENSE" file="gdx/dist/CC-LICENSE"/>
\r
354 <copy tofile="${distDir}/AUTHORS" file="gdx/dist/AUTHORS"/>
\r
355 <copy tofile="${distDir}/CONTRIBUTORS" file="gdx/dist/CONTRIBUTORS"/>
\r
357 <!-- zip dist dir -->
\r
358 <zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
\r