Merge lp:~xranby/ubuntu/precise/libjogl2-java/fix-for-908765 into lp:ubuntu/precise/libjogl2-java

Proposed by Xerxes Rånby
Status: Needs review
Proposed branch: lp:~xranby/ubuntu/precise/libjogl2-java/fix-for-908765
Merge into: lp:ubuntu/precise/libjogl2-java
Diff against target: 9331 lines (+66/-9002)
22 files modified
.pc/applied-patches (+0/-9)
.pc/arch_naming.diff/make/build-nativewindow.xml (+0/-901)
.pc/disable_android.diff/make/build-newt.xml (+0/-762)
.pc/disable_android.diff/make/build-test.xml (+0/-495)
.pc/disable_android_2.diff/make/build-common.xml (+0/-486)
.pc/disable_git_call.diff/make/build-common.xml (+0/-498)
.pc/linker.cfg.id.os.diff/make/build-jogl.xml (+0/-1655)
.pc/otherArchsoswin.diff/make/build-nativewindow.xml (+0/-865)
.pc/otherArchsoswin_2.diff/make/build-nativewindow.xml (+0/-901)
.pc/otherArchsoswin_2.diff/make/build-newt.xml (+0/-762)
.pc/swt.diff/make/build-common.xml (+0/-504)
.pc/variousFixes.diff/make/build-common.xml (+0/-501)
.pc/variousFixes.diff/make/build.xml (+0/-502)
debian/changelog (+6/-0)
debian/patches/otherArchsoswin_armv7.patch (+18/-0)
debian/patches/series (+1/-0)
make/build-common.xml (+26/-11)
make/build-jogl.xml (+2/-38)
make/build-nativewindow.xml (+6/-43)
make/build-newt.xml (+6/-66)
make/build-test.xml (+0/-2)
make/build.xml (+1/-1)
To merge this branch: bzr merge lp:~xranby/ubuntu/precise/libjogl2-java/fix-for-908765
Reviewer Review Type Date Requested Status
Sylvestre Ledru Pending
Review via email: mp+86907@code.launchpad.net

Description of the change

The jogl2 ant build script took a different code path on armv7 builders, the new otherArchsoswin_armv7.patch removes the use of dir="${env.TARGET_PLATFORM_LIBS}" in similar spirit of the already existing otherArchsoswin_2.diff.

To post a comment you must log in.

Unmerged revisions

14. By Xerxes Rånby

debian/patches/otherArchsoswin_armv7.patch: Fix armv7 FTBFS (LP: #908765)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file '.pc/applied-patches'
--- .pc/applied-patches 2011-11-22 00:42:13 +0000
+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1variousFixes.diff
2swt.diff
3otherArchsoswin.diff
4disable_android.diff
5disable_git_call.diff
6disable_android_2.diff
7arch_naming.diff
8linker.cfg.id.os.diff
9otherArchsoswin_2.diff
100
=== removed directory '.pc/arch_naming.diff'
=== removed directory '.pc/arch_naming.diff/make'
=== removed file '.pc/arch_naming.diff/make/build-nativewindow.xml'
--- .pc/arch_naming.diff/make/build-nativewindow.xml 2011-10-09 19:26:30 +0000
+++ .pc/arch_naming.diff/make/build-nativewindow.xml 1970-01-01 00:00:00 +0000
@@ -1,901 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 - Ant build for the NativeWindow package. This build has been tested with ANT 1.7.0. The
4 - optional.jar that contains the optional ANT tasks must be in the ANT
5 - classpath (typically the ant/lib directory).
6 -
7 - A clean download of the NativeWindow sources is required for this build.
8 -
9 - This build has no dependence on environment variables; the needed
10 - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
11 - script, by the virtual machine, or elsewhere. However, on all platforms,
12 - the C compiler and linker should be in the path. All other paths that
13 - need to be set are in host.properties.
14 -
15 - NOTE: because the GlueGen config files have their own relative paths
16 - which cannot be overridden by GlueGen, GlueGen MUST be run from
17 - the "make" directory. This also means that this build.xml MUST
18 - be run from the "make" directory.
19 -
20 - Public targets:
21 - all: (default; autodetects OS and chooses C compiler from gluegen.properties)
22 - clean: clean all built
23 - javadoc: create the standard developer Javadoc (recommended)
24 - (Note: should build all first - may be dependence in the future)
25 - javadoc.spec: create the standard developer Javadoc but exclude com.jogamp.* classes
26 - javadoc.dev: create the internal developer Javadoc. This includes the
27 - Java and C file generators. Note that it is only supported
28 - to create the Javadoc for the platform on which you are
29 - currently running.
30 -
31 - Note: on Windows the "win32.c.compiler" property in gluegen.properties
32 - is required to select the appropriate C compiler. See the example
33 - gluegen.properties in the gluegen workspace for valid values. On Mac OS X
34 - universal binaries may also be built by setting the "macosxfat"
35 - property in gluegen.properties; again see the example file in this
36 - directory.
37 -
38 - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
39 - ANT build, including the GlueGen tasks, the building of
40 - the Java generated sources, the first and second phase Java compiles, and
41 - the building of the jar file. Thanks to Alex Radeski for the bulk of the
42 - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
43 - the original OS detection code.
44 -
45 - Some environment defs affecting native compilation
46 setup.noNativeAWT
47
48 - Internal settings, may not be necessary to set them manually,
49 since all JAR archives are orthogonal.
50 setup.noAWT
51 -->
52<project name="NativeWindow" basedir="." default="all">
53
54 <import file="build-common.xml"/>
55
56 <!-- needed for outofdate task -->
57 <taskdef resource="net/sf/antcontrib/antlib.xml">
58 <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
59 </taskdef>
60
61 <!-- ================================================================== -->
62 <!--
63 - Base initialization and detection of operating system.
64 -->
65 <target name="base.init" depends="common.init">
66
67 <!-- partitioning -->
68
69 <property name="java.part.swt"
70 value="jogamp/nativewindow/swt/**"/>
71
72 <property name="java.part.core"
73 value="javax/media/nativewindow/* javax/media/nativewindow/util/* javax/media/nativewindow/egl/* com/jogamp/nativewindow/* jogamp/nativewindow/* jogamp/nativewindow/jvm/* ${java.part.swt}"/>
74
75 <property name="java.part.awt"
76 value="javax/media/nativewindow/awt/* jogamp/nativewindow/jawt/** jogamp/nativewindow/**/awt/**"/>
77
78 <property name="java.part.x11"
79 value="jogamp/nativewindow/x11/** javax/media/nativewindow/x11/*" />
80
81 <property name="java.part.windows"
82 value="jogamp/nativewindow/windows/** javax/media/nativewindow/windows/*" />
83
84 <property name="java.part.macosx"
85 value="jogamp/nativewindow/macosx/** javax/media/nativewindow/macosx/*" />
86
87 <!-- condition excludes -->
88
89 <condition property="java.excludes.awt"
90 value="${java.part.awt}">
91 <isset property="setup.noAWT"/>
92 </condition>
93
94 <property name="java.excludes.all" value="${java.excludes.awt}" />
95 <echo message="java.excludes.all: ${java.excludes.all}" />
96 </target>
97
98
99 <!-- ================================================================== -->
100 <!--
101 - Declare all paths and user defined variables.
102 -->
103 <target name="declare.common" description="Declare properties" depends="base.init">
104
105 <property name="config.nativewindow" value="${config}/nativewindow" />
106
107 <property name="rootrel.src" value="src/nativewindow" />
108 <property name="rootrel.src.java" value="${rootrel.src}/classes" />
109 <property name="rootrel.src.c" value="${rootrel.src}/native" />
110
111 <property name="rootrel.src.generated" value="${rootrel.build}/nativewindow/gensrc" />
112 <property name="rootrel.generated.c" value="${rootrel.src.generated}/native" />
113
114 <!-- The source directories. -->
115 <property name="src.java" value="${project.root}/${rootrel.src.java}" />
116 <property name="src.c" value="${project.root}/${rootrel.src.c}" />
117
118 <!-- The generated source directories. -->
119 <property name="src.generated" value="${build.nativewindow}/gensrc" />
120 <property name="src.generated.java" value="${src.generated}/classes" />
121 <property name="src.generated.c" value="${src.generated}/native" />
122
123 <!-- The compiler output directories. -->
124 <property name="classes" value="${build.nativewindow}/classes" />
125
126 <property name="javah.classpath" value="${gluegen-rt.jar}:${classes}" />
127
128 <!-- The headers from which Java files are generated -->
129 <dirset id="stub.includes.fileset.all" dir=".">
130 <include name="${stub.includes}/macosx/**" />
131 <include name="${stub.includes}/win32/**" />
132 <include name="${stub.includes}/x11/**" />
133 <include name="${stub.includes}/gluegen/**" />
134 <include name="${stub.includes}/khr/**" />
135 <include name="${stub.includes}/jni/**" />
136 </dirset>
137 <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}">
138 <include name="macosx/**" />
139 <include name="win32/**" />
140 <include name="x11/**" />
141 <include name="common/**" />
142 <include name="jni/**" />
143 </fileset>
144 <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
145 <fileset id="stub.includes.dependencies.fileset.3" dir="${config.nativewindow}">
146 <include name="*.cfg" />
147 <include name="*.java" />
148 <include name="*.c" />
149 </fileset>
150
151 <!-- The javadoc dirs. -->
152 <property name="javadoc" value="${project.root}/javadoc_nativewindow_public" />
153 <property name="javadoc.spec" value="${project.root}/javadoc_nativewindow_spec" />
154 <property name="javadoc.dev" value="${project.root}/javadoc_nativewindow_dev" />
155 <property name="javadoc.windowtitle" value="Native Windowing Interface (NativeWindow) API -- ${nativewindow_base_version} Specification" />
156 <property name="javadoc.overview" value="../src/nativewindow/classes/javax/media/nativewindow/package.html" />
157 <property name="javadoc.spec.packagenames" value="javax.media.nativewindow.*" />
158
159 <property name="javadoc.packagenames" value="${javadoc.spec.packagenames}" />
160
161 <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},com.jogamp.nativewindow.util.*,jogamp.nativewindow.*,com.jogamp.gluegen,com.jogamp.gluegen.runtime" />
162 <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=231&quot;&gt;license terms&lt;/a&gt;." />
163 </target>
164
165 <!-- ================================================================== -->
166 <!--
167 - Initialize all parameters required for the build and create any
168 - required directories.
169 -->
170 <target name="init" depends="declare.common">
171 <!-- Create the required output directories. -->
172 <mkdir dir="${src.generated.java}" />
173 <mkdir dir="${src.generated.c}" />
174 <mkdir dir="${src.generated.c}/MacOSX" />
175 <mkdir dir="${src.generated.c}/Windows" />
176 <mkdir dir="${src.generated.c}/X11" />
177 <mkdir dir="${classes}" />
178 <mkdir dir="${obj.nativewindow}" />
179 </target>
180
181 <!--
182 - Check to see whether we need to rebuild the generated sources.
183 -->
184 <target name="java.generate.check">
185 <!-- Blow away all target files if any dependencies are violated
186 (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
187 <!--
188 <dependset>
189 <srcfileset refid="stub.includes.dependencies.fileset.1" />
190 <srcfileset refid="stub.includes.dependencies.fileset.2" />
191 <srcfileset refid="stub.includes.dependencies.fileset.3" />
192 <targetfileset dir="${src.generated}">
193 <include name="**/*.java" />
194 <include name="**/*.c" />
195 </targetfileset>
196 </dependset>
197 -->
198
199 <!-- Now check for the presence of one well-known file -->
200 <uptodate property="java.generate.skip.x11windowlib"
201 targetfile="${src.generated.java}/jogamp/nativewindow/x11/X11Lib.java">
202 <srcfiles refid="stub.includes.dependencies.fileset.1" />
203 <srcfiles refid="stub.includes.dependencies.fileset.2" />
204 <srcfiles refid="stub.includes.dependencies.fileset.3" />
205 </uptodate>
206 <uptodate property="java.generate.skip.jawt"
207 targetfile="${src.generated.java}/jogamp/nativewindow/jawt/JAWT.java">
208 <srcfiles refid="stub.includes.dependencies.fileset.1" />
209 <srcfiles refid="stub.includes.dependencies.fileset.2" />
210 <srcfiles refid="stub.includes.dependencies.fileset.3" />
211 </uptodate>
212
213 <condition property="java.generate.skip">
214 <and>
215 <isset property="java.generate.skip.x11windowlib"/>
216 <isset property="java.generate.skip.jawt"/>
217 </and>
218 </condition>
219
220 <!--property name="java.generate.skip" value="true"/-->
221 </target>
222
223 <target name="java.generate.windowlib" if="windowlib.os.cfg">
224 <echo message="Generating Windowing Lib implementation class" />
225 <gluegen src="${stub.includes}/${window.os.system}/window-lib.c"
226 outputRootDir="${build.nativewindow}"
227 config="${windowlib.os.cfg}"
228 includeRefid="stub.includes.fileset.platform"
229 literalInclude="${stub.includes.gluegen.gg}"
230 emitter="com.jogamp.gluegen.JavaEmitter"
231 debug="false"
232 dumpCPP="false">
233 <classpath refid="gluegen.classpath" />
234 </gluegen>
235 </target>
236
237 <target name="java.generate.jawt" unless="setup.noAWT">
238 <!-- NOTE: the "literalInclude" in this GlueGen call is simply to
239 - get around the fact that neither FileSet nor DirSet can
240 - handle different drives in an effective manner. -->
241 <echo message="Generating JAWT interface class" />
242 <echo message="java.home.dir=${java.home.dir}" />
243 <gluegen src="${jawt.platform.header}"
244 outputRootDir="${build.nativewindow}"
245 config="${jawt.cfg}"
246 includeRefid="stub.includes.fileset.platform"
247 literalInclude="${stub.includes.gluegen.gg}, ${stub.includes}/jni"
248 emitter="com.jogamp.gluegen.JavaEmitter">
249 <classpath refid="gluegen.classpath" />
250 </gluegen>
251 </target>
252
253 <target name="java.generate.platforms" >
254 <echo message="Generating platform-specifics: os: ${window.os.system}, cfgs: ${windowlib.os.cfg}, ${jawt.cfg}" />
255 <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.os.system}/** ${stub.includes}/gluegen/** ${stub.includes}/khr/**" />
256 <antcall target="java.generate.windowlib" inheritRefs="true" />
257 <antcall target="java.generate.jawt" inheritRefs="true" />
258 </target>
259
260 <!--
261 - Setup the generating ANT tasks and use it to generate the Java files
262 - from the C GL headers. This involves setting the taskdef and creating
263 - the classpath reference id then running the task on each header.
264 -->
265 <target name="java.generate" depends="init, common.gluegen.build, java.generate.check" unless="java.generate.skip">
266
267 <!-- Add the GlueGen task to ANT -->
268 <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
269 classpathref="gluegen.classpath" />
270
271 <!-- Use the GlueGen task to generate the Java files -->
272
273 <echo message="Generating platform-specifics: X11" />
274 <antcall target="java.generate.platforms" inheritRefs="true">
275 <param name="window.os.system" value="x11"/>
276 <param name="windowlib.os.cfg" value="${config.nativewindow}/x11-lib.cfg" />
277 <param name="jawt.cfg" value="${config.nativewindow}/jawt-x11.cfg" />
278 <param name="jawt.platform.header" value="${stub.includes}/jni/x11/jawt_md.h" />
279 </antcall>
280
281 <echo message="Generating platform-specifics: Win32" />
282 <antcall target="java.generate.platforms" inheritRefs="true">
283 <param name="window.os.system" value="win32"/>
284 <param name="windowlib.os.cfg" value="${config.nativewindow}/win32-lib.cfg" />
285 <param name="jawt.cfg" value="${config.nativewindow}/jawt-win32.cfg" />
286 <param name="jawt.platform.header" value="${stub.includes}/jni/win32/jawt_md.h" />
287 </antcall>
288
289 <echo message="Generating platform-specifics: MaxOsX" />
290 <antcall target="java.generate.platforms" inheritRefs="true">
291 <param name="window.os.system" value="macosx"/>
292 <param name="jawt.cfg" value="${config.nativewindow}/jawt-macosx.cfg" />
293 <param name="jawt.platform.header" value="${stub.includes}/jni/macosx/jawt_md.h" />
294 </antcall>
295
296 <!-- Inform the user that the generators have successfully created
297 - the necessary Java files -->
298 <echo message="" />
299 <echo message="GlueGen has successfully generated files." />
300
301 </target>
302
303 <!-- ================================================================== -->
304 <!--
305 - Compile the original and generated source. The composable pipelines
306 - will be generated.
307 -->
308 <target name="java.compile.javase" depends="java.generate">
309 <!-- Perform the second pass Java compile; everything. -->
310 <javac destdir="${classes}"
311 excludes="${java.excludes.all}"
312 source="${target.sourcelevel}"
313 fork="yes"
314 includeAntRuntime="false"
315 memoryMaximumSize="${javac.memorymax}"
316 debug="${javacdebug}" debuglevel="${javacdebuglevel}">
317 <classpath refid="swt_gluegen.classpath"/>
318 <src path="${src.java}" />
319 <src path="${src.generated.java}" />
320 </javac>
321 </target>
322
323 <target name="java.compile" depends="java.compile.javase" />
324
325 <!-- ================================================================== -->
326 <!--
327 - Compile the native C code for JOGL (and optionally the Cg binding).
328 -->
329
330 <target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
331 <!-- compiler configuration -->
332
333 <!-- Note that we can use the base setups in the gluegen-cpptasks for most of these -->
334 <compiler id="compiler.cfg.freebsd.nativewindow" extends="compiler.cfg.freebsd">
335 <!-- Need to force X11R6 headers on to include path after stub_includes -->
336 <includepath path="/usr/local/include" />
337 </compiler>
338
339 <compiler id="compiler.cfg.linux.armv7.nativewindow.x11" extends="compiler.cfg.linux.armv7">
340 <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
341 <compilerarg value="-idirafter" />
342 <compilerarg value="/usr/include" />
343 </compiler>
344
345 <!-- linker configuration -->
346
347 <linker id="linker.cfg.freebsd.nativewindow.x11" extends="linker.cfg.freebsd">
348 <syslibset dir="/usr/local/lib" libs="X11"/>
349 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
350 <syslibset dir="/usr/local/lib" libs="Xinerama"/>
351 <syslibset dir="/usr/local/lib" libs="Xrender"/>
352 </linker>
353
354 <linker id="linker.cfg.freebsd.amd64.nativewindow.x11" extends="linker.cfg.freebsd.amd64">
355 <syslibset dir="/usr/local/lib" libs="X11" />
356 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
357 <syslibset dir="/usr/local/lib" libs="Xinerama"/>
358 <syslibset dir="/usr/local/lib" libs="Xrender"/>
359 </linker>
360
361 <linker id="linker.cfg.linux.nativewindow.x11" extends="linker.cfg.linux">
362 <syslibset libs="X11"/>
363 <syslibset libs="Xxf86vm" />
364 <syslibset libs="Xinerama"/>
365 <syslibset libs="Xrender"/>
366 </linker>
367
368 <linker id="linker.cfg.linux.x86.nativewindow.x11" extends="linker.cfg.linux.x86">
369 <syslibset libs="X11"/>
370 <syslibset libs="Xxf86vm" />
371 <syslibset libs="Xinerama"/>
372 <syslibset libs="Xrender"/>
373 </linker>
374
375 <linker id="linker.cfg.linux.amd64.nativewindow.x11" extends="linker.cfg.linux.amd64">
376 <syslibset libs="X11"/>
377 <syslibset libs="Xxf86vm" />
378 <syslibset libs="Xinerama"/>
379 <syslibset libs="Xrender"/>
380 </linker>
381
382 <linker id="linker.cfg.linux.armv7.nativewindow.x11" extends="linker.cfg.linux.armv7">
383 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
384 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
385 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xinerama" />
386 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrender" />
387 </linker>
388
389 <linker id="linker.cfg.solaris.nativewindow.x11" extends="linker.cfg.solaris">
390 <syslibset libs="X11"/>
391 </linker>
392
393 <linker id="linker.cfg.solaris.sparcv9.nativewindow.x11" extends="linker.cfg.solaris.sparcv9">
394 <syslibset dir="/usr/lib/sparcv9" libs="X11"/>
395 </linker>
396
397 <linker id="linker.cfg.solaris.amd64.nativewindow.x11" extends="linker.cfg.solaris.amd64">
398 <syslibset dir="/usr/lib/amd64" libs="X11"/>
399 </linker>
400
401 <linker id="linker.cfg.win32.mingw.nativewindow" extends="linker.cfg.win32.mingw">
402 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
403 <syslibset libs="gdi32, kernel32"/>
404 </linker>
405
406 <linker id="linker.cfg.win64.mingw.nativewindow" extends="linker.cfg.win64.mingw">
407 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
408 <syslibset libs="gdi32, kernel32"/>
409 </linker>
410
411 <linker id="linker.cfg.win32.msvc.nativewindow" extends="linker.cfg.win32.msvc">
412 <syslibset libs="gdi32, user32, kernel32" />
413 </linker>
414
415 <linker id="linker.cfg.macosx.nativewindow" extends="linker.cfg.macosx">
416 <linkerarg value="-framework" />
417 <linkerarg value="Cocoa" />
418 </linker>
419
420 <linker id="linker.cfg.hpux.nativewindow" extends="linker.cfg.hpux">
421 <syslibset dir="/usr/lib" libs="X11"/>
422 <syslibset dir="/usr/lib" libs="Xinerama"/>
423 </linker>
424 </target>
425
426 <target name="c.configure.win32.vc" if="isVCFamily">
427 <echo message="Win32.VC" />
428 <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" />
429 <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.nativewindow" />
430 </target>
431
432 <target name="c.configure.win32.mingw" if="isMingW32">
433 <echo message="Win32.MingW" />
434 <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" />
435 <property name="linker.cfg.id.oswin" value="linker.cfg.win32.mingw.nativewindow" />
436 </target>
437
438 <target name="c.configure.win64.mingw" if="isMingW64">
439 <echo message="Win64.MingW" />
440 <property name="compiler.cfg.id" value="compiler.cfg.win64.mingw" />
441 <property name="linker.cfg.id.oswin" value="linker.cfg.win64.mingw.nativewindow" />
442 </target>
443
444 <target name="c.configure.linux.x86" if="isLinuxX86">
445 <echo message="Linux.x86" />
446 <property name="compiler.cfg.id" value="compiler.cfg.linux.x86" />
447 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.x86.nativewindow.x11" />
448 </target>
449
450 <target name="c.configure.linux.amd64" if="isLinuxAMD64">
451 <echo message="Linux.AMD64" />
452 <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" />
453 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.amd64.nativewindow.x11" />
454 </target>
455
456 <target name="c.configure.linux.armv7" if="isLinuxARMv7">
457 <echo message="Linux.armv7" />
458 <property name="compiler.cfg.id" value="compiler.cfg.linux.armv7.nativewindow.x11" />
459 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.armv7.nativewindow.x11" />
460 </target>
461
462 <target name="c.configure.linux.ia64" if="isLinuxIA64">
463 <echo message="Linux.IA64" />
464 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
465 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
466 </target>
467
468 <target name="c.configure.linux.hppa" if="isLinuxHPPA">
469 <echo message="Linux.HPPA" />
470 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
471 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
472 </target>
473
474 <target name="c.configure.linux.mips" if="isLinuxMIPS">
475 <echo message="Linux.MIPS" />
476 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
477 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
478 </target>
479
480 <target name="c.configure.linux.mipsel" if="isLinuxMIPSEL">
481 <echo message="Linux.MIPSEL" />
482 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
483 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
484 </target>
485
486 <target name="c.configure.linux.ppc" if="isLinuxPPC">
487 <echo message="Linux.PPC" />
488 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
489 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
490 </target>
491
492 <target name="c.configure.linux.s390" if="isLinuxS390">
493 <echo message="Linux.S390" />
494 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
495 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
496 </target>
497
498 <target name="c.configure.linux.sparc" if="isLinuxSPARC">
499 <echo message="Linux.SPARC" />
500 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
501 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
502 </target>
503
504 <target name="c.configure.linux" depends="c.configure.linux.armv7,c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.linux.hppa,c.configure.linux.mips,c.configure.linux.mipsel,c.configure.linux.ppc,c.configure.linux.s390,c.configure.linux.sparc,c.configure.x11" if="isLinux" />
505
506 <target name="c.configure.android" if="isAndroid">
507 <echo message="Android" />
508 <property name="compiler.cfg.id" value="compiler.cfg.android" />
509 <property name="linker.cfg.id.oswin" value="linker.cfg.android" />
510 </target>
511
512 <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
513 <echo message="Solaris" />
514 <property name="compiler.cfg.id" value="compiler.cfg.solaris" />
515 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.nativewindow.x11" />
516 </target>
517
518
519 <target name="c.configure.solaris.sparcv9" depends="c.configure.x11" if="isSolarisSparcv9">
520 <echo message="SolarisSparcv9" />
521 <property name="compiler.cfg.id" value="compiler.cfg.solaris.sparcv9" />
522 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.sparcv9.nativewindow.x11" />
523 </target>
524
525
526 <target name="c.configure.solaris.amd64" depends="c.configure.x11" if="isSolarisAMD64">
527 <echo message="SolarisAMD64" />
528 <property name="compiler.cfg.id" value="compiler.cfg.solaris.amd64" />
529 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.amd64.nativewindow.x11" />
530 </target>
531
532 <target name="c.configure.freebsd.x86" if="isFreeBSDX86">
533 <echo message="FreeBSD.x86" />
534 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.nativewindow" />
535 <property name="linker.cfg.id.oswin" value="linker.cfg.freebsd.nativewindow.x11" />
536 </target>
537
538 <target name="c.configure.freebsd.amd64" if="isFreeBSDAMD64">
539 <echo message="FreeBSD.AMD64" />
540 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.nativewindow" />
541 <property name="linker.cfg.id.oswin" value="linker.cfg.freebsd.amd64.nativewindow.x11" />
542 </target>
543
544 <target name="c.configure.freebsd" depends="c.configure.freebsd.x86,c.configure.freebsd.amd64,c.configure.x11" if="isFreeBSD" />
545
546 <target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
547 <echo message="HP-UX" />
548 <property name="compiler.cfg.id" value="compiler.cfg.hpux" />
549 <property name="linker.cfg.id.oswin" value="linker.cfg.hpux.nativewindow.x11" />
550 </target>
551
552 <target name="c.configure.win32" depends="c.configure.win32.vc,c.configure.win32.mingw,c.configure.win64.mingw" if="isWindows" />
553
554 <target name="c.configure.x11" if="isX11" />
555
556 <target name="c.configure.macosx" if="isOSX">
557 <property name="compiler.cfg.id" value="compiler.cfg.macosx" />
558 <property name="linker.cfg.id.oswin" value="linker.cfg.macosx.nativewindow" />
559 </target>
560
561 <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
562
563 <target name="c.configure" depends="c.configure.1,c.configure.2" />
564
565 <target name="rename.mingw.dll" if="isMingW">
566 <move file="${src}" tofile="${dest}" />
567 </target>
568
569 <target name="rename.dylib" if="isOSX">
570 <move file="${src}" tofile="${dest}" />
571 </target>
572
573 <macrodef name="c.build">
574 <attribute name="c.compiler.src.files" />
575 <attribute name="compiler.cfg.id" />
576 <attribute name="linker.cfg.id" />
577 <attribute name="output.lib.name" />
578 <attribute name="c.compiler.use-jawt" default="false"/>
579 <sequential>
580 <echo message="Output lib name = @{output.lib.name}" />
581
582 <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
583 <property name="c.compiler.debug" value="false" />
584 <!-- Optimise flags one of { none, size, speed, minimal, full, aggressive, extreme, unsafe } -->
585 <property name="c.compiler.optimise" value="none" />
586
587 <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
588
589 <!-- since properties are immutable, we need one for each target -->
590 <condition property="@{output.lib.name}.useLibJAWT">
591 <istrue value="@{c.compiler.use-jawt}" />
592 </condition>
593 <echo message="c.compiler.use-jawt @{c.compiler.use-jawt}"/>
594 <echo message="@{output.lib.name}.useLibJAWT ${@{output.lib.name}.useLibJAWT}"/>
595
596 <condition property="@{output.lib.name}.useLibJVM">
597 <and>
598 <isset property="isHPUX"/>
599 <isset property="@{output.lib.name}.useLibJAWT"/>
600 </and>
601 </condition>
602
603 <patternset id="c.src.files.awt">
604 <include name="${rootrel.src.c}/JAWT*.c"/>
605 <include name="${rootrel.generated.c}/X11/JAWT*.c" if="isX11"/>
606 <include name="${rootrel.generated.c}/MacOSX/JAWT*.c" if="isOSX"/>
607 <include name="${rootrel.generated.c}/Windows/JAWT*.c" if="isWindows"/>
608 </patternset>
609
610 <patternset id="c.src.files.x11">
611 <include name="${rootrel.generated.c}/X11/X11*.c"/>
612 <include name="${rootrel.src.c}/x11/Xmisc.c"/>
613 <include name="${rootrel.src.c}/x11/XineramaHelper.c"/>
614 <include name="${rootrel.src.c}/NativewindowCommon.c"/>
615 </patternset>
616
617 <patternset id="c.src.files.windows">
618 <include name="${rootrel.generated.c}/Windows/GDI*.c"/>
619 <include name="${rootrel.src.c}/windows/GDImisc.c"/>
620 <include name="${rootrel.src.c}/windows/WindowsDWM.c"/>
621 <include name="${rootrel.src.c}/NativewindowCommon.c"/>
622 </patternset>
623
624 <patternset id="c.src.files.macosx">
625 <include name="${rootrel.src.c}/macosx/OSXmisc.c"/>
626 <include name="${rootrel.src.c}/NativewindowCommon.c"/>
627 </patternset>
628
629 <echo message="Compiling @{output.lib.name}" />
630
631 <!-- have to wrap cc task with outofdate, because otherwise cc links a new library
632 even when no files have been compiled -->
633 <outofdate>
634 <sourcefiles>
635 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
636 </sourcefiles>
637 <targetfiles>
638 <fileset dir="${obj.nativewindow}" includes="lib@{output.lib.name}.so"/>
639 <fileset dir="${obj.nativewindow}" includes="@{output.lib.name}.dll"/>
640 <fileset dir="${obj.nativewindow}" includes="lib@{output.lib.name}.jnilib"/>
641 </targetfiles>
642 <sequential>
643 <cc outtype="shared"
644 objdir="${obj.nativewindow}"
645 outfile="${obj.nativewindow}/@{output.lib.name}"
646 optimize="${c.compiler.optimise}"
647 debug="${c.compiler.debug}"
648 multithreaded="true"
649 exceptions="false"
650 rtti="false">
651
652 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
653
654 <compiler extends="@{compiler.cfg.id}" >
655 <sysincludepath path="${java.includes.dir}"/>
656 <sysincludepath path="${java.includes.dir.platform}"/>
657 <sysincludepath path="${stub.includes.gluegen.cc}"/>
658 <!-- This is for the generated headers for handwritten C code -->
659 <includepath path="${src.generated.c}" />
660 <includepath path="${src.generated.c}/X11" if="isX11"/>
661 <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
662 <includepath path="${src.generated.c}/Windows" if="isWindows"/>
663 <includepath path="${src.c}/windows" if="isWindows"/>
664 <includepath path="${src.c}"/>
665
666 <!-- This must come last to not override real include paths -->
667 <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
668 </compiler>
669
670 <linker extends="@{linker.cfg.id}">
671 <syslibset dir="${java.lib.dir.platform}" libs="jawt" if="@{output.lib.name}.useLibJAWT"/>
672 <syslibset dir="${java.lib.dir.platform}/server" libs="jvm" if="@{output.lib.name}.useLibJVM"/>
673 </linker>
674 </cc>
675
676 <!-- FIXME: this is a hack; the cpptask should have an option to change the
677 suffix or at least understand the override from dylib to jnilib -->
678 <antcall target="rename.dylib" inheritRefs="true">
679 <param name="src" value="${obj.nativewindow}/lib@{output.lib.name}.dylib" />
680 <param name="dest" value="${obj.nativewindow}/lib@{output.lib.name}.jnilib" />
681 </antcall>
682
683 <!-- FIXME: this is a hack; the cpptask should have an option to change the
684 suffix or at least understand the override from dylib to jnilib -->
685 <antcall target="rename.mingw.dll" inheritRefs="true">
686 <param name="src" value="${obj.nativewindow}/lib@{output.lib.name}.so" />
687 <param name="dest" value="${obj.nativewindow}/@{output.lib.name}.dll" />
688 </antcall>
689
690 <!-- this stripping may be called more than once on the same library dir,
691 but that should cause no harm, and doing it here inside outofdate
692 prevents the JARs from always being rebuilt even if no source code changes -->
693 <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
694 <param name="libdir" value="${obj.nativewindow}"/>
695 </antcall>
696
697 </sequential>
698 </outofdate>
699 </sequential>
700 </macrodef>
701
702 <target name="c.fixup.jawt.version.macosx" if="isOSX" unless="setup.noNativeAWT">
703 <!-- Edit the link to the JAWT version in the resulting jnilib
704 file; this isn't strictly needed but seems to allow the
705 universal binaries to work on 10.3 machines as well, which
706 is desirable for some end users -->
707 <apply executable="install_name_tool">
708 <arg value="-change" />
709 <arg value="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/libjawt.dylib" />
710 <arg value="/System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib" />
711 <srcfile />
712 <fileset dir="${obj.nativewindow}" includes="libnativewindow_awt.jnilib" />
713 </apply>
714 </target>
715
716 <target name="c.build.nativewindow.awt" unless="setup.noNativeAWT">
717 <c.build c.compiler.src.files="c.src.files.awt"
718 c.compiler.use-jawt="true"
719 output.lib.name="nativewindow_awt"
720 compiler.cfg.id="${compiler.cfg.id}"
721 linker.cfg.id="${linker.cfg.id.oswin}"/>
722 </target>
723
724 <target name="c.build.nativewindow.windowlib.x11" if="isX11">
725 <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.nativewindow.x11.X11Lib" />
726
727 <c.build c.compiler.src.files="c.src.files.x11"
728 output.lib.name="nativewindow_x11"
729 compiler.cfg.id="${compiler.cfg.id}"
730 linker.cfg.id="${linker.cfg.id.oswin}"/>
731 </target>
732
733 <target name="c.build.nativewindow.windowlib.windows" if="isWindows">
734 <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.nativewindow.windows.GDI" />
735
736 <c.build c.compiler.src.files="c.src.files.windows"
737 output.lib.name="nativewindow_win32"
738 compiler.cfg.id="${compiler.cfg.id}"
739 linker.cfg.id="${linker.cfg.id.oswin}"/>
740 </target>
741
742 <target name="c.build.nativewindow.windowlib.macosx" if="isOSX">
743 <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.nativewindow.macosx.OSXUtil" />
744
745 <c.build c.compiler.src.files="c.src.files.macosx"
746 output.lib.name="nativewindow_macosx"
747 compiler.cfg.id="${compiler.cfg.id}"
748 linker.cfg.id="${linker.cfg.id.oswin}"/>
749 </target>
750
751 <target name="c.build.nativewindow.windowlib" depends="c.build.nativewindow.windowlib.x11, c.build.nativewindow.windowlib.windows, c.build.nativewindow.windowlib.macosx"/>
752
753 <target name="c.manifest" if="isVC8Family">
754 <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
755 <msvc.manifest objdir="${obj.nativewindow}" dllname="nativewindow_awt" />
756 <msvc.manifest objdir="${obj.nativewindow}" dllname="nativewindow_win32" />
757 </target>
758
759 <target name="c.build.nativewindow" depends="c.configure,c.build.nativewindow.windowlib,c.build.nativewindow.awt">
760 <antcall target="c.fixup.jawt.version.macosx" inheritrefs="true" />
761 <antcall target="c.manifest" inheritRefs="true" />
762 </target>
763
764 <!-- ================================================================== -->
765 <!--
766 - Build the nativewindow.jar files.
767 -->
768 <target name="build-jars" depends="gluegen.cpptasks.detect.os,build-jars-javase" />
769
770 <target name="setup-manifestfile">
771 <property name="manifestfile" value="nativewindowversion"/>
772 <copy file="${manifestfile}"
773 tofile="${build.nativewindow}/manifest.mf"
774 overwrite="true">
775 <filterset>
776 <filter token="VERSION" value="${nativewindow.version}"/>
777 <filter token="SCM_BRANCH" value="${jogl.build.branch}"/>
778 <filter token="SCM_COMMIT" value="${jogl.build.commit}"/>
779 <filter token="BASEVERSION" value="${nativewindow_base_version}"/>
780 </filterset>
781 </copy>
782 </target>
783
784 <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
785 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.awt.jar}" filesonly="true">
786 <fileset dir="${classes}"
787 includes="${java.part.awt}"
788 excludes="${java.excludes.awt}"/>
789 </jar>
790 </target>
791
792 <target name="build-jars-x11" depends="setup-manifestfile">
793 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.x11.jar}" filesonly="true">
794 <fileset dir="${classes}"
795 includes="${java.part.x11}" />
796 </jar>
797 </target>
798
799 <target name="build-jars-windows" depends="setup-manifestfile">
800 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.win.jar}" filesonly="true">
801 <fileset dir="${classes}"
802 includes="${java.part.windows}" />
803 </jar>
804 </target>
805
806 <target name="build-jars-macosx" depends="setup-manifestfile">
807 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.macosx.jar}" filesonly="true">
808 <fileset dir="${classes}"
809 includes="${java.part.macosx}" />
810 </jar>
811 </target>
812
813 <target name="build-jars-javase" depends="setup-manifestfile,build-jars-awt,build-jars-x11,build-jars-windows,build-jars-macosx">
814 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.core.jar}" filesonly="true">
815 <fileset dir="${classes}"
816 includes="${java.part.core}"
817 excludes="${java.part.awt} ${java.part.x11} ${java.part.windows}"/>
818 </jar>
819 <jar manifest="${build.nativewindow}/manifest.mf" destfile="${build.nativewindow}/nativewindow-natives-${os.and.arch}.jar" filesonly="true">
820 <fileset dir="${obj.nativewindow}">
821 <include name="*.${native.library.suffix}" />
822 </fileset>
823 </jar>
824 </target>
825
826 <!-- ================================================================== -->
827 <!--
828 - Build the Javadocs for the sources.
829 - NOTE: these are not entirely correct as the javadoc targets depend
830 - on the platform specific build targets. To circumvent any
831 - errors, ensure that the source is built first.
832 -->
833 <target name="javadoc" depends="init">
834 <!-- Build the general public Javadoc -->
835 <javadoc packagenames="${javadoc.packagenames}"
836 excludepackagenames="${java.excludes.javadoc.packagenames}"
837 sourcepath="${src.java};${src.generated.java}"
838 classpath="${gluegen-rt.jar}"
839 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
840 overview="${javadoc.overview}"
841 source="${target.sourcelevel}"
842 linkoffline="${javadoc.link} 142-packages"
843 bottom="${javadoc.bottom}" >
844 </javadoc>
845 </target>
846
847 <target name="javadoc.spec" depends="init">
848 <!-- Build the specification Javadoc -->
849 <javadoc packagenames="${javadoc.spec.packagenames}"
850 excludepackagenames="${java.excludes.javadoc.packagenames}"
851 sourcepath="${src.java};${src.generated.java}"
852 classpath="${gluegen-rt.jar}"
853 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
854 overview="${javadoc.overview}"
855 source="${target.sourcelevel}"
856 linkoffline="${javadoc.link} 142-packages"
857 bottom="${javadoc.bottom}" >
858 </javadoc>
859 </target>
860
861 <target name="javadoc.dev" depends="init">
862 <!-- Build the internal developer Javadoc -->
863 <javadoc packagenames="${javadoc.dev.packagenames}"
864 excludepackagenames="${java.excludes.javadoc.packagenames}"
865 sourcepath="${src.java};${src.generated.java}"
866 classpath="${gluegen-rt.jar}"
867 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
868 overview="${javadoc.overview}"
869 source="${target.sourcelevel}"
870 linkoffline="${javadoc.link} 142-packages"
871 bottom="${javadoc.bottom}" >
872 </javadoc>
873 </target>
874
875 <target name="all.doc" description="Build NativeWindow docs" depends="init,javadoc,javadoc.spec,javadoc.dev" />
876
877 <!-- ================================================================== -->
878 <!--
879 - Clean up all that is built.
880 -->
881 <target name="clean" description="Remove all build products" depends="declare.common">
882 <delete includeEmptyDirs="true" quiet="true">
883 <fileset dir="${build.nativewindow}" />
884 <fileset dir="${javadoc}" />
885 <fileset dir="${javadoc.spec}" />
886 <fileset dir="${javadoc.dev}" />
887 </delete>
888 </target>
889
890 <!-- ================================================================== -->
891 <!--
892 - Build everything.
893 -->
894 <target name="all" description="Build NativeWindow JAR file(s) and native libraries." depends="init,java.compile,c.build.nativewindow,build-jars,generate.version.txt" />
895
896 <target name="generate.version.txt" depends="init">
897 <!-- Create a version.txt file indicating which version we just built -->
898 <echo message="${nativewindow.version}" file="${build.nativewindow}/version.txt" />
899 </target>
900
901</project>
9020
=== removed directory '.pc/disable_android.diff'
=== removed directory '.pc/disable_android.diff/make'
=== removed file '.pc/disable_android.diff/make/build-newt.xml'
--- .pc/disable_android.diff/make/build-newt.xml 2011-10-06 15:53:38 +0000
+++ .pc/disable_android.diff/make/build-newt.xml 1970-01-01 00:00:00 +0000
@@ -1,762 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 - Ant build for NEWT. This build has been tested with ANT 1.7.0. The
4 - optional.jar that contains the optional ANT tasks must be in the ANT
5 - classpath (typically the ant/lib directory).
6 -
7 - A clean download of NEWT is required for this build.
8 -
9 - This build has no dependence on environment variables; the needed
10 - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
11 - script, by the virtual machine, or elsewhere. However, on all platforms,
12 - the C compiler and linker should be in the path. All other paths that
13 - need to be set are in host.properties.
14 -
15 - NOTE: because the GlueGen config files have their own relative paths
16 - which cannot be overridden by GlueGen, GlueGen MUST be run from
17 - the "make" directory. This also means that this build.xml MUST
18 - be run from the "make" directory.
19 -
20 - Public targets:
21 - all: (default; autodetects OS and chooses C compiler from newt.properties)
22 - clean: clean all built
23 - javadoc: create the standard developer Javadoc (recommended)
24 - (Note: should build all first - may be dependence in the future)
25 - javadoc.spec: create the standard developer Javadoc but exclude com.jogamp.* classes
26 - javadoc.dev: create the internal developer Javadoc. This includes the
27 - Java and C file generators. Note that it is only supported
28 - to create the Javadoc for the platform on which you are
29 - currently running.
30 -
31 - Note: on Windows the "win32.c.compiler" property in newt.properties
32 - is required to select the appropriate C compiler. See the example
33 - newt.properties in this directory for valid values. On Mac OS X
34 - universal binaries may also be built by setting the "macosxfat"
35 - property in newt.properties; again see the example file in this
36 - directory.
37 -
38 - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
39 - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
40 - the Java generated sources, the first and second phase Java compiles, and
41 - the building of the jar file. Thanks to Alex Radeski for the bulk of the
42 - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
43 - the original OS detection code.
44 -
45 - Some environment defs affecting compilation
46
47 - Some environment defs affecting native compilation
48 setup.noNativeDesktop
49 setup.addNativeKD
50 setup.addNativeIntelGDL
51 setup.addNativeBroadcomEGL
52
53 - Internal settings, may not be necessary to set them manually,
54 since all JAR archives are orthogonal.
55 setup.noAWT
56 setup.noOpenGL
57
58 -->
59<project name="NEWT" basedir="." default="all">
60
61 <import file="build-common.xml"/>
62
63 <!-- needed for outofdate task -->
64 <taskdef resource="net/sf/antcontrib/antlib.xml">
65 <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
66 </taskdef>
67
68 <!-- ================================================================== -->
69 <!--
70 - Base initialization and detection of operating system.
71 -->
72 <target name="base.init" depends="common.init">
73
74 <condition property="setup.nonatives">
75 <and>
76 <isfalse value="${isWindows}" />
77 <isfalse value="${isOSX}" />
78 <isfalse value="${isX11}" />
79 <isfalse value="${isAndroid}" />
80 <isfalse value="${setup.addNativeKD}" />
81 <isfalse value="${setup.addNativeIntelGDL}" />
82 <isfalse value="${setup.addNativeBroadcomEGL}" />
83 </and>
84 </condition>
85
86 <echo message="setup.noOpenGL: ${setup.noOpenGL}" />
87 <echo message="isWindows: ${isWindows}" />
88 <echo message="isOSX: ${isOSX}" />
89 <echo message="isX11: ${isX11}" />
90 <echo message="isAndroid: ${isAndroid}" />
91 <echo message="setup.addNativeKD: ${setup.addNativeKD}" />
92 <echo message="setup.addNativeIntelGDL: ${setup.addNativeIntelGDL}" />
93 <echo message="setup.addNativeBroadcomEGL: ${setup.addNativeBroadcomEGL}" />
94 <echo message="setup.nonatives: ${setup.nonatives}" />
95
96 <!-- partitioning -->
97
98 <property name="java.part.core"
99 value="com/jogamp/newt/* com/jogamp/newt/event/* com/jogamp/newt/util/* jogamp/newt/* jogamp/newt/event/*"/>
100
101 <property name="java.part.opengl"
102 value="com/jogamp/newt/opengl/**"/>
103
104 <property name="java.part.driver.awt"
105 value="jogamp/newt/driver/awt/**"/>
106
107 <property name="java.part.awt"
108 value="com/jogamp/newt/awt/** com/jogamp/newt/event/awt/** jogamp/newt/awt/** ${java.part.driver.awt}"/>
109
110 <property name="java.part.driver.x11"
111 value="jogamp/newt/driver/x11/**"/>
112
113 <property name="java.part.driver.windows"
114 value="jogamp/newt/driver/windows/**"/>
115
116 <property name="java.part.driver.macosx"
117 value="jogamp/newt/driver/macosx/**"/>
118
119 <property name="java.part.driver.kd"
120 value="jogamp/newt/driver/kd/**"/>
121
122 <property name="java.part.driver.intelgdl"
123 value="jogamp/newt/driver/intel/gdl/**"/>
124
125 <property name="java.part.driver.broadcomegl"
126 value="jogamp/newt/driver/broadcom/egl/**"/>
127
128 <property name="java.part.driver.android"
129 value="jogamp/newt/driver/android/**"/>
130
131 <!-- condition excludes -->
132
133 <condition property="java.excludes.awt"
134 value="${java.part.awt}">
135 <isset property="setup.noAWT"/>
136 </condition>
137
138 <condition property="java.excludes.opengl" value="${java.part.opengl}">
139 <isset property="setup.noOpenGL"/>
140 </condition>
141
142 <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.opengl}" />
143 <echo message="java.excludes.all: ${java.excludes.all}" />
144
145 </target>
146
147 <!-- ================================================================== -->
148 <!--
149 - Declare all paths and user defined variables.
150 -->
151 <target name="declare.common" description="Declare properties" depends="base.init">
152 <property name="rootrel.src" value="src/newt" />
153 <property name="rootrel.src.java" value="${rootrel.src}/classes" />
154 <property name="rootrel.src.c" value="${rootrel.src}/native" />
155
156 <!-- The source directories. -->
157 <property name="src.java" value="${project.root}/${rootrel.src.java}" />
158 <property name="src.c" value="${project.root}/${rootrel.src.c}" />
159
160 <!-- The generated source directories. -->
161 <property name="src.generated" value="${build.newt}/gensrc" />
162 <property name="src.generated.c" value="${src.generated}/native/newt" />
163
164 <!-- The compiler output directories. -->
165 <property name="classes" value="${build.newt}/classes" />
166
167 <property name="javah.classpath" value="${gluegen-rt.jar}:${build.nativewindow}/classes:${classes}" />
168
169 <!-- The javadoc dirs. -->
170 <property name="javadoc" value="${project.root}/javadoc_newt_public" />
171 <property name="javadoc.spec" value="${project.root}/javadoc_newt_spec" />
172 <property name="javadoc.dev" value="${project.root}/javadoc_newt_dev" />
173 <property name="javadoc.windowtitle" value="NEWT API -- ${newt_base_version} Specification" />
174 <property name="javadoc.overview" value="spec-overview.html" />
175 <property name="javadoc.spec.packagenames" value="com.jogamp.newt, com.jogamp.newt.event, com.jogamp.newt.opengl, com.jogamp.newt.util" />
176
177 <property name="javadoc.packagenames" value="${javadoc.spec.packagenames}" />
178
179 <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},com.jogamp.newt.*" />
180 <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=231&quot;&gt;license terms&lt;/a&gt;." />
181 </target>
182
183 <!-- ================================================================== -->
184 <!--
185 - Initialize all parameters required for the build and create any
186 - required directories.
187 -->
188 <target name="init" depends="declare.common">
189 <mkdir dir="${src.generated.c}" />
190 <mkdir dir="${src.generated.c}/Android" />
191 <mkdir dir="${src.generated.c}/X11" />
192 <mkdir dir="${src.generated.c}/MacOSX" />
193 <mkdir dir="${src.generated.c}/Windows" />
194 <mkdir dir="${src.generated.c}/KD" />
195 <mkdir dir="${src.generated.c}/IntelGDL" />
196 <mkdir dir="${src.generated.c}/BroadcomEGL" />
197 <mkdir dir="${classes}" />
198 <mkdir dir="${obj.newt}" />
199 </target>
200
201 <!-- ================================================================== -->
202 <!--
203 - Compile the original and generated source.
204 -->
205 <target name="java.compile.javase">
206 <!-- Perform the second pass Java compile; everything. -->
207 <javac destdir="${classes}"
208 excludes="${java.excludes.all}"
209 source="${target.sourcelevel}"
210 fork="yes"
211 includeAntRuntime="false"
212 memoryMaximumSize="${javac.memorymax}"
213 debug="${javacdebug}" debuglevel="${javacdebuglevel}">
214 <src path="${src.java}" />
215 <classpath refid="jogl_nativewindow_gluegen.classpath"/>
216 </javac>
217 </target>
218
219 <target name="java.compile" depends="java.compile.javase" />
220
221 <!-- ================================================================== -->
222 <!--
223 - Compile the native C code for JOGL (and optionally the Cg binding).
224 -->
225
226 <target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
227 <!-- compiler configuration -->
228 <!-- Note that we can use the base setups in the gluegen-cpptasks for most of these -->
229 <compiler id="compiler.cfg.freebsd.newt" extends="compiler.cfg.freebsd">
230 <includepath path="/usr/local/include" />
231 </compiler>
232
233 <compiler id="compiler.cfg.linux.armv7.newt.x11" extends="compiler.cfg.linux.armv7">
234 <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
235 <compilerarg value="-idirafter" />
236 <compilerarg value="/usr/include" />
237 </compiler>
238
239 <!-- linker configuration -->
240
241 <linker id="linker.cfg.freebsd.newt.x11" extends="linker.cfg.freebsd">
242 <syslibset dir="/usr/local/lib" libs="X11"/>
243 <syslibset libs="Xrandr"/>
244 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
245 </linker>
246
247 <linker id="linker.cfg.freebsd.amd64.newt.x11" extends="linker.cfg.freebsd.amd64">
248 <syslibset dir="/usr/local/lib" libs="X11"/>
249 <syslibset libs="Xrandr"/>
250 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
251 </linker>
252
253 <linker id="linker.cfg.linux.newt.broadcom_egl" extends="linker.cfg.linux">
254 <syslibset libs="EGL"/>
255 <syslibset libs="GLES_CM"/>
256 </linker>
257
258 <linker id="linker.cfg.linux.newt.x11" extends="linker.cfg.linux">
259 <syslibset libs="X11"/>
260 <syslibset libs="Xrandr"/>
261 <syslibset libs="Xxf86vm" />
262 </linker>
263
264 <linker id="linker.cfg.linux.x86.newt.x11" extends="linker.cfg.linux.x86">
265 <syslibset libs="X11"/>
266 <syslibset libs="Xrandr"/>
267 <syslibset libs="Xxf86vm" />
268 </linker>
269
270 <linker id="linker.cfg.linux.amd64.newt.x11" extends="linker.cfg.linux.amd64">
271 <syslibset libs="X11"/>
272 <syslibset libs="Xrandr"/>
273 <syslibset libs="Xxf86vm" />
274 </linker>
275
276 <linker id="linker.cfg.linux.armv7.newt.x11" extends="linker.cfg.linux.armv7">
277 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
278 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrandr" />
279 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
280 </linker>
281
282 <linker id="linker.cfg.android.newt" extends="linker.cfg.android">
283 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="android" />
284 </linker>
285
286 <linker id="linker.cfg.solaris.newt.x11" extends="linker.cfg.solaris">
287 <syslibset libs="X11"/>
288 </linker>
289
290 <linker id="linker.cfg.solaris.sparcv9.newt.x11" extends="linker.cfg.solaris.sparcv9">
291 <syslibset dir="/usr/lib/sparcv9" libs="X11"/>
292 </linker>
293
294 <linker id="linker.cfg.solaris.amd64.newt.x11" extends="linker.cfg.solaris.amd64">
295 <syslibset dir="/usr/lib/amd64" libs="X11"/>
296 </linker>
297
298 <linker id="linker.cfg.win32.mingw.newt" extends="linker.cfg.win32.mingw">
299 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
300 <syslibset libs="gdi32, kernel32"/>
301 </linker>
302
303 <linker id="linker.cfg.win64.mingw.newt" extends="linker.cfg.win64.mingw">
304 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
305 <syslibset libs="gdi32, kernel32"/>
306 </linker>
307
308 <linker id="linker.cfg.win32.msvc.newt" extends="linker.cfg.win32.msvc">
309 <syslibset libs="gdi32, user32, kernel32" />
310 </linker>
311
312 <linker id="linker.cfg.macosx.newt" extends="linker.cfg.macosx">
313 <linkerarg value="-framework" />
314 <linkerarg value="Cocoa" />
315 </linker>
316
317 <linker id="linker.cfg.hpux.newt" extends="linker.cfg.hpux">
318 <syslibset dir="/usr/lib" libs="X11"/>
319 </linker>
320 </target>
321
322 <target name="c.configure.win32.vc" if="isVCFamily">
323 <echo message="Win32.VC" />
324 <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" />
325 <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.newt" />
326 </target>
327
328 <target name="c.configure.win32.mingw" if="isMingW32">
329 <echo message="Win32.MingW" />
330 <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" />
331 <property name="linker.cfg.id.oswin" value="linker.cfg.win32.mingw.newt" />
332 </target>
333
334 <target name="c.configure.win64.mingw" if="isMingW64">
335 <echo message="Win64.MingW" />
336 <property name="compiler.cfg.id" value="compiler.cfg.win64.mingw" />
337 <property name="linker.cfg.id.oswin" value="linker.cfg.win64.mingw.newt" />
338 </target>
339
340 <target name="c.configure.linux.x86" if="isLinuxX86">
341 <echo message="Linux.x86" />
342 <property name="compiler.cfg.id" value="compiler.cfg.linux.x86" />
343 <condition property="linker.cfg.id.oswin" value="linker.cfg.linux.x86.newt.x11"
344 else="linker.cfg.linux.x86">
345 <isset property="isX11" />
346 </condition>
347 <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
348 </target>
349
350 <target name="c.configure.linux.amd64" if="isLinuxAMD64">
351 <echo message="Linux.AMD64" />
352 <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" />
353 <condition property="linker.cfg.id.oswin" value="linker.cfg.linux.amd64.newt.x11"
354 else="linker.cfg.linux.amd64">
355 <isset property="isX11" />
356 </condition>
357 <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
358 </target>
359
360 <target name="c.configure.linux.armv7" if="isLinuxARMv7">
361 <echo message="Linux.armv7" />
362 <property name="compiler.cfg.id" value="compiler.cfg.linux.armv7.newt.x11" />
363 <condition property="linker.cfg.id.oswin" value="linker.cfg.linux.armv7.newt.x11"
364 else="linker.cfg.linux.armv7">
365 <isset property="isX11" />
366 </condition>
367 <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
368 </target>
369
370 <target name="c.configure.linux.ia64" if="isLinuxIA64">
371 <echo message="Linux.IA64" />
372 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
373 <property name="linker.cfg.id.oswin" value="linker.cfg.linux.newt.x11" />
374 </target>
375
376 <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.armv7,c.configure.linux.ia64,c.configure.x11" if="isLinux"/>
377
378 <target name="c.configure.android" if="isAndroid">
379 <echo message="Android" />
380 <property name="compiler.cfg.id" value="compiler.cfg.android" />
381 <property name="linker.cfg.id.oswin" value="linker.cfg.android.newt" />
382 </target>
383
384 <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
385 <echo message="Solaris" />
386 <property name="compiler.cfg.id" value="compiler.cfg.solaris" />
387 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.newt.x11" />
388 </target>
389
390
391 <target name="c.configure.solaris.sparcv9" depends="c.configure.x11" if="isSolarisSparcv9">
392 <echo message="SolarisSparcv9" />
393 <property name="compiler.cfg.id" value="compiler.cfg.solaris.sparcv9" />
394 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.sparcv9.newt.x11" />
395 </target>
396
397
398 <target name="c.configure.solaris.amd64" depends="c.configure.x11" if="isSolarisAMD64">
399 <echo message="SolarisAMD64" />
400 <property name="compiler.cfg.id" value="compiler.cfg.solaris.amd64" />
401 <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.amd64.newt.x11" />
402 </target>
403
404 <target name="c.configure.freebsd.x86" if="isFreeBSDX86">
405 <echo message="FreeBSD.x86" />
406 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.newt" />
407 <condition property="linker.cfg.id.oswin" value="linker.cfg.freebsd.newt.x11"
408 else="linker.cfg.freebsd">
409 <isset property="isX11" />
410 </condition>
411 <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
412 </target>
413
414 <target name="c.configure.freebsd.amd64" if="isFreeBSDAMD64">
415 <echo message="FreeBSD.AMD64" />
416 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.newt" />
417 <condition property="linker.cfg.id.oswin" value="linker.cfg.freebsd.amd64.newt.x11"
418 else="linker.cfg.freebsd.amd64">
419 <isset property="isX11" />
420 </condition>
421 <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
422 </target>
423
424 <target name="c.configure.freebsd" depends="c.configure.freebsd.x86,c.configure.freebsd.amd64,c.configure.x11" if="isFreeBSD"/>
425
426 <target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
427 <echo message="HP-UX" />
428 <property name="compiler.cfg.id" value="compiler.cfg.hpux" />
429 <property name="linker.cfg.id.oswin" value="linker.cfg.hpux.newt.x11" />
430 </target>
431
432 <target name="c.configure.win32" depends="c.configure.win32.vc,c.configure.win32.mingw,c.configure.win64.mingw" if="isWindows" />
433
434 <target name="c.configure.x11" if="isX11" />
435
436 <target name="c.configure.macosx" if="isOSX">
437 <property name="compiler.cfg.id" value="compiler.cfg.macosx" />
438 <property name="linker.cfg.id.oswin" value="linker.cfg.macosx.newt" />
439 </target>
440
441 <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
442
443 <target name="c.configure" depends="c.configure.1,c.configure.2" />
444
445 <target name="rename.mingw.dll" if="isMingW">
446 <move file="${src}" tofile="${dest}" />
447 </target>
448
449 <target name="rename.dylib" if="isOSX">
450 <move file="${src}" tofile="${dest}" />
451 </target>
452
453 <macrodef name="c.build">
454 <attribute name="c.compiler.src.files" />
455 <attribute name="compiler.cfg.id" />
456 <attribute name="linker.cfg.id" />
457 <attribute name="output.lib.name" />
458 <attribute name="c.compiler.use-jawt" default="false"/>
459 <sequential>
460 <echo message="Output lib name = @{output.lib.name}" />
461
462 <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
463 <property name="c.compiler.debug" value="false" />
464 <!-- Optimise flags one of { none, size, speed, minimal, full, aggressive, extreme, unsafe } -->
465 <property name="c.compiler.optimise" value="none" />
466
467 <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
468
469 <patternset id="c.src.files.newt">
470 <include name="${rootrel.src.c}/NewtCommon.c" />
471 <include name="${rootrel.src.c}/WindowsWindow.c" if="isWindows"/>
472 <include name="${rootrel.src.c}/*.m" if="isOSX"/>
473 <include name="${rootrel.src.c}/AndroidWindow.c" if="isAndroid"/>
474 <include name="${rootrel.src.c}/X11Window.c" if="isX11"/>
475 <include name="${rootrel.src.c}/KDWindow.c" if="setup.addNativeKD"/>
476 <include name="${rootrel.src.c}/IntelGDL.c" if="setup.addNativeIntelGDL"/>
477 <include name="${rootrel.src.c}/BroadcomEGL.c" if="setup.addNativeBroadcomEGL"/>
478 </patternset>
479
480 <echo message="Compiling @{output.lib.name}" />
481
482 <!-- have to wrap cc task with outofdate, because otherwise cc links a new library
483 even when no files have been compiled -->
484 <outofdate>
485 <sourcefiles>
486 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
487 </sourcefiles>
488 <targetfiles>
489 <fileset dir="${obj.newt}" includes="lib@{output.lib.name}.so"/>
490 <fileset dir="${obj.newt}" includes="@{output.lib.name}.dll"/>
491 <fileset dir="${obj.newt}" includes="lib@{output.lib.name}.jnilib"/>
492 </targetfiles>
493 <sequential>
494 <cc outtype="shared"
495 objdir="${obj.newt}"
496 outfile="${obj.newt}/@{output.lib.name}"
497 optimize="${c.compiler.optimise}"
498 debug="${c.compiler.debug}"
499 multithreaded="true"
500 exceptions="false"
501 rtti="false">
502
503 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
504
505 <compiler extends="@{compiler.cfg.id}" >
506 <sysincludepath path="${java.includes.dir}"/>
507 <sysincludepath path="${java.includes.dir.platform}"/>
508 <sysincludepath path="${stub.includes.gluegen.cc}"/>
509 <includepath path="stub_includes/khr"/>
510 <includepath path="stub_includes/egl"/>
511 <!-- This is for finding Xrandr.h on Solaris. -->
512 <includepath path="/usr/X11/include" />
513 <!-- This is for the generated headers for handwritten C code -->
514 <includepath path="${src.generated.c}" />
515 <includepath path="${src.generated.c}/Android" if="isAndroid"/>
516 <includepath path="${src.generated.c}/X11" if="isX11"/>
517 <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
518 <includepath path="${src.generated.c}/Windows" if="isWindows"/>
519 <includepath path="${src.generated.c}/KD" if="setup.addNativeKD" />
520 <includepath path="${src.generated.c}/IntelGDL" if="setup.addNativeIntelGDL" />
521 <includepath path="stub_includes/embedded/IntelGDL" if="setup.addNativeIntelGDL" />
522 <includepath path="${src.generated.c}/BroadcomEGL" if="setup.addNativeBroadcomEGL" />
523
524 <!-- This must come last to not override real include paths -->
525 <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
526 </compiler>
527
528 <linker extends="@{linker.cfg.id}">
529 <syslibset dir="${java.lib.platform}" libs="jawt" if="@{output.lib.name}.useLibJAWT"/>
530 <syslibset dir="${java.lib.platform}/server" libs="jvm" if="@{output.lib.name}.useLibJVM"/>
531 </linker>
532 </cc>
533
534 <!-- FIXME: this is a hack; the cpptask should have an option to change the
535 suffix or at least understand the override from dylib to jnilib -->
536 <antcall target="rename.dylib" inheritRefs="true">
537 <param name="src" value="${obj.newt}/lib@{output.lib.name}.dylib" />
538 <param name="dest" value="${obj.newt}/lib@{output.lib.name}.jnilib" />
539 </antcall>
540
541 <!-- FIXME: this is a hack; the cpptask should have an option to change the
542 suffix or at least understand the override from dylib to jnilib -->
543 <antcall target="rename.mingw.dll" inheritRefs="true">
544 <param name="src" value="${obj.newt}/lib@{output.lib.name}.so" />
545 <param name="dest" value="${obj.newt}/@{output.lib.name}.dll" />
546 </antcall>
547
548 <!-- this stripping may be called more than once on the same library dir,
549 but that should cause no harm, and doing it here inside outofdate
550 prevents the JARs from always being rebuilt even if no source code changes -->
551 <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
552 <param name="libdir" value="${obj.newt}"/>
553 </antcall>
554
555 </sequential>
556 </outofdate>
557 </sequential>
558 </macrodef>
559
560 <target name="c.build.newt.prepare">
561 <javah destdir="${src.generated.c}/KD" classpath="${javah.classpath}" class="jogamp.newt.driver.kd.KDWindow" />
562
563 <javah destdir="${src.generated.c}/IntelGDL" classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Display" />
564 <javah destdir="${src.generated.c}/IntelGDL" classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Screen" />
565 <javah destdir="${src.generated.c}/IntelGDL" classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Window" />
566
567 <javah destdir="${src.generated.c}/BroadcomEGL" classpath="${javah.classpath}" class="jogamp.newt.driver.broadcom.egl.Window" />
568
569 <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsWindow" />
570 <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsScreen" />
571 <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsDisplay" />
572 <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacWindow" />
573 <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacScreen" />
574 <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacDisplay" />
575 <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Window" />
576 <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Screen" />
577 <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Display" />
578 <javah destdir="${src.generated.c}/Android" classpath="${javah.classpath}:${android.jar}" class="jogamp.newt.driver.android.AndroidWindow" />
579 </target>
580
581 <target name="c.build.newt.windowlib" unless="setup.nonatives">
582 <c.build c.compiler.src.files="c.src.files.newt"
583 output.lib.name="newt"
584 compiler.cfg.id="${compiler.cfg.id}"
585 linker.cfg.id="${linker.cfg.id.oswin}"/>
586 </target>
587
588 <target name="c.manifest" if="isVC8Family">
589 <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
590 <msvc.manifest objdir="${obj.newt}" dllname="newt" />
591 </target>
592
593 <target name="c.build.newt.natives" depends="c.build.newt.windowlib" unless="setup.nonatives">
594 </target>
595
596 <target name="c.build.newt" depends="c.configure,c.build.newt.prepare,c.build.newt.natives">
597 <antcall target="c.manifest" inheritRefs="true" />
598 </target>
599
600 <!-- ================================================================== -->
601 <!--
602 - Build the newt.jar files.
603 -->
604 <target name="build-jars" depends="gluegen.cpptasks.detect.os,build-jars-javase" />
605
606 <target name="setup-manifestfile">
607 <property name="manifestfile" value="newtversion"/>
608 <copy file="${manifestfile}"
609 tofile="${build.newt}/manifest.mf"
610 overwrite="true">
611 <filterset>
612 <filter token="VERSION" value="${newt.version}"/>
613 <filter token="SCM_BRANCH" value="${jogl.build.branch}"/>
614 <filter token="SCM_COMMIT" value="${jogl.build.commit}"/>
615 <filter token="BASEVERSION" value="${newt_base_version}"/>
616 </filterset>
617 </copy>
618 </target>
619
620 <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
621 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.awt.jar}" filesonly="true">
622 <fileset dir="${classes}"
623 includes="${java.part.awt}"/>
624 </jar>
625 </target>
626
627 <target name="build-jars-opengl" depends="setup-manifestfile" unless="setup.noOpenGL">
628 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.ogl.jar}" filesonly="true">
629 <fileset dir="${classes}"
630 includes="${java.part.opengl}"/>
631 </jar>
632 </target>
633
634 <target name="build-jars-driver" depends="setup-manifestfile">
635 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.x11.jar}" filesonly="true">
636 <fileset dir="${classes}"
637 includes="${java.part.driver.x11}"/>
638 </jar>
639 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.win.jar}" filesonly="true">
640 <fileset dir="${classes}"
641 includes="${java.part.driver.windows}"/>
642 </jar>
643 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.macosx.jar}" filesonly="true">
644 <fileset dir="${classes}"
645 includes="${java.part.driver.macosx}"/>
646 </jar>
647 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.android.jar}" filesonly="true">
648 <fileset dir="${classes}"
649 includes="${java.part.driver.android}"/>
650 </jar>
651 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.kd.jar}" filesonly="true">
652 <fileset dir="${classes}"
653 includes="${java.part.driver.kd}"/>
654 </jar>
655 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.broadcomegl.jar}" filesonly="true">
656 <fileset dir="${classes}"
657 includes="${java.part.driver.broadcomegl}"/>
658 </jar>
659 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.intelgdl.jar}" filesonly="true">
660 <fileset dir="${classes}"
661 includes="${java.part.driver.intelgdl}"/>
662 </jar>
663 </target>
664
665 <target name="build-jars-javase" depends="setup-manifestfile,build-jars-opengl,build-jars-awt,build-jars-driver">
666 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.core.jar}" filesonly="true">
667 <fileset dir="${classes}"
668 includes="${java.part.core}"/>
669 </jar>
670 <jar manifest="${build.newt}/manifest.mf" destfile="${newt.event.jar}" filesonly="true">
671 <fileset dir="${classes}">
672 <include name="com/jogamp/newt/Display*" />
673 <include name="com/jogamp/newt/Screen*" />
674 <include name="com/jogamp/newt/Window*" />
675 <include name="com/jogamp/newt/ScreenMode*" />
676 <include name="com/jogamp/newt/event/**" />
677 <include name="jogamp/newt/Debug*" />
678 </fileset>
679 </jar>
680 <jar manifest="${build.newt}/manifest.mf" destfile="${build.newt}/newt-natives-${os.and.arch}.jar" filesonly="true">
681 <fileset dir="${obj.newt}">
682 <include name="*.${native.library.suffix}" />
683 </fileset>
684 </jar>
685 </target>
686
687 <!-- ================================================================== -->
688 <!--
689 - Build the Javadocs for the sources.
690 - NOTE: these are not entirely correct as the javadocs targets depend
691 - on the platform specific build targets. To circumvent any
692 - errors, ensure that the source is built first.
693 -->
694 <target name="javadoc" depends="init">
695 <!-- Build the general Javadoc -->
696 <javadoc packagenames="${javadoc.packagenames}"
697 excludepackagenames="${java.excludes.javadoc.packagenames}"
698 sourcepath="${src.java};${src.generated.java}"
699 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
700 overview="${javadoc.overview}"
701 source="${target.sourcelevel}"
702 linkoffline="${javadoc.link} 142-packages"
703 bottom="${javadoc.bottom}" >
704 <classpath refid="jogl_nativewindow_gluegen.classpath"/>
705 </javadoc>
706 </target>
707
708 <target name="javadoc.spec" depends="init">
709 <!-- Build the general Javadoc -->
710 <javadoc packagenames="${javadoc.spec.packagenames}"
711 excludepackagenames="${java.excludes.javadoc.packagenames}"
712 sourcepath="${src.java};${src.generated.java}"
713 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
714 overview="${javadoc.overview}"
715 source="${target.sourcelevel}"
716 linkoffline="${javadoc.link} 142-packages"
717 bottom="${javadoc.bottom}" >
718 <classpath refid="jogl_nativewindow_gluegen.classpath"/>
719 </javadoc>
720 </target>
721
722 <target name="javadoc.dev" depends="init">
723 <!-- Build the internal developer Javadoc -->
724 <javadoc packagenames="${javadoc.dev.packagenames}"
725 excludepackagenames="${java.excludes.javadoc.packagenames}"
726 sourcepath="${src.java};${src.generated.java}"
727 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
728 overview="${javadoc.overview}"
729 source="${target.sourcelevel}"
730 linkoffline="${javadoc.link} 142-packages"
731 bottom="${javadoc.bottom}" >
732 <classpath refid="jogl_nativewindow_gluegen.classpath"/>
733 </javadoc>
734 </target>
735
736 <target name="all.doc" description="Build NEWT docs" depends="init,javadoc,javadoc.spec,javadoc.dev" />
737
738 <!-- ================================================================== -->
739 <!--
740 - Clean up all that is built.
741 -->
742 <target name="clean" description="Remove all build products" depends="declare.common">
743 <delete includeEmptyDirs="true" quiet="true">
744 <fileset dir="${build.newt}" />
745 <fileset dir="${javadoc}" />
746 <fileset dir="${javadoc.spec}" />
747 <fileset dir="${javadoc.dev}" />
748 </delete>
749 </target>
750
751 <!-- ================================================================== -->
752 <!--
753 - Build everything.
754 -->
755 <target name="all" description="Build NEWT JAR file(s) and native libraries." depends="init,java.compile,c.build.newt,build-jars,generate.version.txt" />
756
757 <target name="generate.version.txt" depends="init">
758 <!-- Create a version.txt file indicating which version we just built -->
759 <echo message="${newt.version}" file="${build.newt}/version.txt" />
760 </target>
761
762</project>
7630
=== removed file '.pc/disable_android.diff/make/build-test.xml'
--- .pc/disable_android.diff/make/build-test.xml 2011-10-06 15:53:38 +0000
+++ .pc/disable_android.diff/make/build-test.xml 1970-01-01 00:00:00 +0000
@@ -1,495 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="JOGLTest" basedir="." default="all">
4
5 <description>JUNIT Tests JOGL</description>
6
7 <import file="build-common.xml"/>
8
9 <taskdef resource="net/sf/antcontrib/antlib.xml">
10 <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
11 </taskdef>
12
13 <!-- ================================================================== -->
14 <!--
15 - Declare all paths and user defined variables.
16 -->
17 <target name="declare.common" description="Declare properties" depends="common.init">
18 <property name="rootrel.src.test" value="src/test" />
19 <property name="src.test" value="${project.root}/${rootrel.src.test}" />
20
21 <property name="classes" value="${build.test}/classes" />
22 <property name="classes.path" location="${classes}"/> <!-- absolute path -->
23
24 <property name="java.part.test" value="com/jogamp/** jogamp/**"/>
25 <property name="java.dir.test" value="com/jogamp/opengl/test"/>
26 <property name="java.dir.junit" value="${java.dir.test}/junit"/>
27 <property name="java.dir.bugs" value="${java.dir.test}/bugs"/>
28
29 <property name="test.archive.name" value="${archive.name}-test-results-${build.node.name}"/>
30 <condition property="jvmarg.mainthrd" value="-XstartOnFirstThread"><isset property="isOSX"/></condition>
31 <condition property="jvmarg.mainthrd" value="-Ddummy"><not><isset property="isOSX"/></not></condition>
32 <condition property="jvmarg.headless" value="-XstartOnFirstThread -Djava.awt.headless=true"><isset property="isOSX"/></condition>
33 <condition property="jvmarg.headless" value="-Djava.awt.headless=true"><not><isset property="isOSX"/></not></condition>
34
35 <property name="batchtest.timeout" value="1800000"/> <!-- 30 min -->
36 </target>
37
38 <!-- ================================================================== -->
39 <!--
40 - Clean up all that is built.
41 -->
42 <target name="clean" description="Remove all build products" depends="declare.common">
43 <delete includeEmptyDirs="true" quiet="true">
44 <fileset dir="${build.test}" />
45 <fileset dir="." includes="*.tga" />
46 <fileset file="${jogl.test.jar}" />
47 </delete>
48 </target>
49
50 <!-- ================================================================== -->
51 <!--
52 - Build/run tests/junit.
53 -->
54 <target name="test.compile.check" depends="declare.common">
55 <!-- Create the required output directories. -->
56 <mkdir dir="${obj.test}" />
57 <mkdir dir="${classes}" />
58
59 <!-- Clean the results -->
60 <delete quiet="true">
61 <fileset dir="${results.test}" includes="**"/>
62 <fileset file="${build}/${test.archive.name}.7z"/>
63 <fileset dir="." includes="*.tga" />
64 </delete>
65 <mkdir dir="${results.test}" />
66
67 <property name="jogl.test.jar.path" location="${jogl.test.jar}"/> <!-- absolute path -->
68 <echo message="jogl.test.jar ${jogl.test.jar.path}"/>
69 <uptodate property="test.compile.skip">
70 <srcfiles dir= "." includes="*.xml"/>
71 <srcfiles dir= "${src.test}" includes="**"/>
72 <srcfiles file="${gluegen.jar}" />
73 <srcfiles dir="${src}/nativewindow" />
74 <srcfiles dir="${src}/jogl" />
75 <srcfiles dir="${src}/newt" />
76 <mapper type="merge" to="${jogl.test.jar.path}"/>
77 </uptodate>
78 </target>
79
80 <target name="test.compile" depends="test.compile.check" unless="test.compile.skip">
81 <!-- Perform the junit pass Java compile -->
82 <javac destdir="${classes}"
83 source="${host.sourcelevel}"
84 fork="yes"
85 memoryMaximumSize="${javac.memorymax}"
86 includeAntRuntime="false"
87 debug="${javacdebug}" debuglevel="${javacdebuglevel}">
88 <classpath refid="junit_jogl_newt_android.compile.classpath"/>
89 <src path="${src.test}" />
90 </javac>
91 <!-- include any resource files that tests may require -->
92 <copy todir="${classes}">
93 <fileset dir="${src.test}">
94 <exclude name="**/*.java"/>
95 </fileset>
96 </copy>
97 <jar destfile="${jogl.test.jar}" filesonly="true">
98 <!-- get all class files, but skip any resource files that external tools
99 might have copied into the class directory (otherwise, it's possible
100 to get the same resource file twice in the jar) -->
101 <fileset dir="${classes}"
102 includes="${java.part.test}"/>
103 </jar>
104 </target>
105
106 <target name="test.manual.run" depends="test.compile">
107 <for param="test.class.path.m" keepgoing="true">
108 <!-- results in absolute path -->
109 <fileset dir="${classes}">
110 <include name="${java.dir.bugs}/**/*Test*"/>
111 <exclude name="**/*$$*"/>
112 </fileset>
113 <sequential>
114 <var name="test.class.path" unset="true"/>
115 <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/>
116 <var name="test.class.fqn" unset="true"/>
117 <pathconvert property="test.class.fqn">
118 <fileset file="${classes}${file.separator}${test.class.path}"/>
119 <chainedmapper>
120 <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. -->
121 <packagemapper from="*.class" to="*"/> <!-- FQCN -->
122 </chainedmapper>
123 </pathconvert>
124 <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.log"/>
125 <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
126 <apply dir="." executable="${java.home}/bin/java"
127 parallel="false"
128 timeout="${batchtest.timeout}"
129 vmlauncher="false"
130 relative="true"
131 failonerror="false"
132 output="${test.class.result.file}">
133 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
134 <env key="CLASSPATH" value="${junit_jogl_awt.run.jars}"/>
135 <arg value="-Djava.library.path=${obj.all.paths}"/>
136 <!--
137 <arg line="-Dnewt.debug.EDT"/>
138 -->
139 <srcfile/>
140 <mappedresources>
141 <fileset dir="${classes}" includes="${test.class.path}"/>
142 <packagemapper from="*.class" to="*"/>
143 </mappedresources>
144 </apply>
145 </sequential>
146 </for>
147 <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/>
148 </target>
149
150 <target name="junit.run.noui" depends="test.compile">
151 <!-- Test*NOUI* -->
152 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
153 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
154 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
155
156 <!--
157 <jvmarg value="-Djogl.debug=all"/>
158 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
159 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
160 <jvmarg value="-Djogl.debug.GLSLState"/>
161 <jvmarg value="-Dnativewindow.debug=all"/>
162 <jvmarg value="-verbose:jni"/>
163 <jvmarg value="-client"/>
164 <jvmarg value="-d32"/>
165 -->
166
167 <formatter usefile="false" type="plain"/>
168 <formatter usefile="true" type="xml"/>
169 <classpath refid="junit_jogl_awt.run.classpath"/>
170
171 <batchtest todir="${results.test}">
172 <fileset dir="${classes}">
173 <include name="${java.dir.junit}/**/Test*NOUI*"/>
174 <exclude name="**/*$$*"/>
175 </fileset>
176 <formatter usefile="false" type="brief"/>
177 <formatter usefile="true" type="xml"/>
178 </batchtest>
179 </junit>
180 </target>
181
182 <target name="junit.run.newt.headless" depends="test.compile">
183 <!-- Test*NEWT*
184
185 Emulation of junit task,
186 due to the fact that we have to place invoke our MainThread class first (-> MacOSX).
187
188 Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties).
189 -->
190 <for param="test.class.path.m" keepgoing="true">
191 <!-- results in absolute path -->
192 <fileset dir="${classes}">
193 <include name="${java.dir.junit}/**/Test*NEWT*"/>
194 <exclude name="**/*$$*"/>
195 </fileset>
196 <sequential>
197 <var name="test.class.path" unset="true"/>
198 <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/>
199 <var name="test.class.fqn" unset="true"/>
200 <pathconvert property="test.class.fqn">
201 <fileset file="${classes}${file.separator}${test.class.path}"/>
202 <chainedmapper>
203 <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. -->
204 <packagemapper from="*.class" to="*"/> <!-- FQCN -->
205 </chainedmapper>
206 </pathconvert>
207 <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/>
208 <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
209 <apply dir="." executable="${java.home}/bin/java"
210 parallel="false"
211 timeout="${batchtest.timeout}"
212 vmlauncher="false"
213 relative="true"
214 failonerror="false">
215 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
216 <env key="CLASSPATH" value="${junit_jogl_noawt.run.jars}"/>
217 <arg value="-Djava.library.path=${obj.all.paths}"/>
218 <arg line="${jvmarg.headless}"/>
219 <!--
220 <arg line="-Dnewt.debug.EDT"/>
221 -->
222 <arg line="com.jogamp.newt.util.MainThread"/>
223 <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/>
224 <srcfile/>
225 <arg line="filtertrace=true"/>
226 <arg line="haltOnError=false"/>
227 <arg line="haltOnFailure=false"/>
228 <arg line="showoutput=true"/>
229 <arg line="outputtoformatters=true"/>
230 <arg line="logfailedtests=true"/>
231 <arg line="logtestlistenerevents=true"/>
232 <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/>
233 <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/>
234 <mappedresources>
235 <fileset dir="${classes}" includes="${test.class.path}"/>
236 <packagemapper from="*.class" to="*"/>
237 </mappedresources>
238 </apply>
239 </sequential>
240 </for>
241 </target>
242
243 <!-- junit.run.newt is covered by junit.run.newt.headless, disable it for now, but may be checked manually.
244 This test target would also overwrite the test result XML files, we would also need a solution here for hudson,
245 if run in parallel.
246 NEWT is currently not supported on OSX
247 -->
248 <target name="junit.run.newt" depends="test.compile">
249 <!-- Test*NEWT* -->
250 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
251 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
252 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
253
254 <!--
255 <jvmarg value="-Dnewt.debug.EDT"/>
256 <jvmarg value="-Djogl.debug=all"/>
257 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
258 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
259 <jvmarg value="-Djogl.debug.GLSLState"/>
260 <jvmarg value="-Dnativewindow.debug=all"/>
261 <jvmarg value="-Dnewt.debug=all"/>
262 <jvmarg value="-verbose:jni"/>
263 <jvmarg value="-client"/>
264 <jvmarg value="-d32"/>
265 -->
266
267 <formatter usefile="false" type="plain"/>
268 <formatter usefile="true" type="xml"/>
269 <classpath refid="junit_jogl_noawt.run.classpath"/>
270
271 <batchtest todir="${results.test}">
272 <fileset dir="${classes}">
273 <include name="${java.dir.junit}/**/Test*NEWT*"/>
274 <exclude name="**/*$$*"/>
275 </fileset>
276 <formatter usefile="false" type="brief"/>
277 <formatter usefile="true" type="xml"/>
278 </batchtest>
279 </junit>
280 </target>
281
282 <target name="junit.run.awt" depends="test.compile">
283 <!-- Test*AWT* -->
284 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
285 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
286 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
287
288 <!--
289 <jvmarg value="-Djogl.debug=all"/>
290 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
291 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
292 <jvmarg value="-Djogl.debug.GLSLState"/>
293 <jvmarg value="-Dnativewindow.debug=all"/>
294 <jvmarg value="-verbose:jni"/>
295 <jvmarg value="-client"/>
296 <jvmarg value="-d32"/>
297 -->
298
299 <formatter usefile="false" type="plain"/>
300 <formatter usefile="true" type="xml"/>
301 <classpath refid="junit_jogl_awt.run.classpath"/>
302
303 <batchtest todir="${results.test}">
304 <fileset dir="${classes}">
305 <include name="${java.dir.junit}/**/Test*AWT*"/>
306 <exclude name="**/*$$*"/>
307 <exclude name="**/*SWT*"/>
308 <exclude name="**/newt/**"/>
309 </fileset>
310 <formatter usefile="false" type="brief"/>
311 <formatter usefile="true" type="xml"/>
312 </batchtest>
313 </junit>
314 </target>
315
316 <target name="junit.run.awt.singletest" depends="test.compile">
317 <!-- Test*AWT* -->
318 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
319 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
320 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
321
322 <!--
323 <jvmarg value="-Djogl.debug=all"/>
324 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
325 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
326 <jvmarg value="-Djogl.debug.GLSLState"/>
327 <jvmarg value="-Dnativewindow.debug=all"/>
328 <jvmarg value="-verbose:jni"/>
329 <jvmarg value="-client"/>
330 <jvmarg value="-d32"/>
331 -->
332
333 <formatter usefile="false" type="plain"/>
334 <formatter usefile="true" type="xml"/>
335 <classpath refid="junit_jogl_awt.run.classpath"/>
336
337 <test name="${testclass}"/>
338 </junit>
339 </target>
340
341 <target name="junit.run.swt.headless" depends="test.compile" description="Runs all pure SWT tests.">
342 <!-- Test*SWT*
343
344 Emulation of junit task,
345 due to the fact that we have to place invoke our MainThread class first (-> MacOSX).
346
347 Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties).
348 -->
349 <for param="test.class.path.m" keepgoing="true">
350 <!-- results in absolute path -->
351 <fileset dir="${classes}">
352 <include name="${java.dir.junit}/**/Test*SWT*"/>
353 <exclude name="**/*$$*"/>
354 <exclude name="**/*AWT*"/>
355 <exclude name="**/newt/**"/>
356 </fileset>
357 <sequential>
358 <var name="test.class.path" unset="true"/>
359 <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/>
360 <var name="test.class.fqn" unset="true"/>
361 <pathconvert property="test.class.fqn">
362 <fileset file="${classes}${file.separator}${test.class.path}"/>
363 <chainedmapper>
364 <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. -->
365 <packagemapper from="*.class" to="*"/> <!-- FQCN -->
366 </chainedmapper>
367 </pathconvert>
368 <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/>
369 <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
370 <apply dir="." executable="${java.home}/bin/java"
371 parallel="false"
372 timeout="${batchtest.timeout}"
373 vmlauncher="false"
374 relative="true"
375 failonerror="false">
376 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
377 <env key="CLASSPATH" value="${junit_jogl_swt.run.jars}"/>
378 <arg value="-Djava.library.path=${obj.all.paths}"/>
379 <arg line="${jvmarg.headless}"/>
380 <!--
381 <arg line="-Dnewt.debug.EDT"/>
382 -->
383 <arg line="com.jogamp.newt.util.MainThread"/>
384 <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/>
385 <srcfile/>
386 <arg line="filtertrace=true"/>
387 <arg line="haltOnError=false"/>
388 <arg line="haltOnFailure=false"/>
389 <arg line="showoutput=true"/>
390 <arg line="outputtoformatters=true"/>
391 <arg line="logfailedtests=true"/>
392 <arg line="logtestlistenerevents=true"/>
393 <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/>
394 <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/>
395 <mappedresources>
396 <fileset dir="${classes}" includes="${test.class.path}"/>
397 <packagemapper from="*.class" to="*"/>
398 </mappedresources>
399 </apply>
400 </sequential>
401 </for>
402 </target>
403
404 <target name="junit.run.swt.awt" depends="test.compile" description="Runs all SWT_AWT tests.">
405 <!-- Test*SWT* -->
406 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
407 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
408 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
409 <jvmarg value="${jvmarg.mainthrd}"/>
410
411 <!--
412 <jvmarg value="-Djogl.debug=all"/>
413 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
414 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
415 <jvmarg value="-Djogl.debug.GLSLState"/>
416 <jvmarg value="-Dnativewindow.debug=all"/>
417 <jvmarg value="-verbose:jni"/>
418 <jvmarg value="-client"/>
419 <jvmarg value="-d32"/>
420 -->
421
422 <formatter usefile="false" type="plain"/>
423 <formatter usefile="true" type="xml"/>
424 <classpath refid="junit_jogl_swt.run.classpath"/>
425
426 <batchtest todir="${results.test}">
427 <fileset dir="${classes}">
428 <include name="${java.dir.junit}/**/Test*SWT*AWT*"/>
429 <exclude name="**/*$$*"/>
430 <exclude name="**/newt/**"/>
431 </fileset>
432 <formatter usefile="false" type="brief"/>
433 <formatter usefile="true" type="xml"/>
434 </batchtest>
435 </junit>
436 </target>
437
438 <!-- NEWT is currently not supported on OSX -->
439 <target name="junit.run.newt.awt" depends="test.compile">
440 <!-- Test*AWT* -->
441 <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
442 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
443 <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
444
445 <!--
446 <jvmarg value="-Dnewt.debug.EDT"/>
447 <jvmarg value="-Djogl.debug=all"/>
448 <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
449 <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
450 <jvmarg value="-Djogl.debug.GLSLState"/>
451 <jvmarg value="-Dnativewindow.debug=all"/>
452 <jvmarg value="-Dnewt.debug=all"/>
453 <jvmarg value="-verbose:jni"/>
454 <jvmarg value="-client"/>
455 <jvmarg value="-d32"/>
456 -->
457
458 <formatter usefile="false" type="plain"/>
459 <formatter usefile="true" type="xml"/>
460 <classpath refid="junit_jogl_awt.run.classpath"/>
461
462 <batchtest todir="${results.test}">
463 <fileset dir="${classes}">
464 <include name="${java.dir.junit}/**/newt/**/Test*AWT*"/>
465 <exclude name="**/*$$*"/>
466 </fileset>
467 <formatter usefile="false" type="brief"/>
468 <formatter usefile="true" type="xml"/>
469 </batchtest>
470 </junit>
471 </target>
472
473 <target name="test.auto.run" depends="junit.run"/>
474 <target name="junit.run" depends="junit.run.noui,junit.run.newt.headless,junit.run.awt,junit.run.newt.awt,junit.run.swt.headless,junit.run.swt.awt">
475 <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/>
476 </target>
477
478 <!-- updates / create the test results zip file -->
479 <target name="test-zip-archive" depends="declare.common">
480 <move todir="${results.test}">
481 <fileset dir="." includes="*.tga" />
482 </move>
483 <mkdir dir="${results.test}" />
484 <archive.7z destfile="${build}/${test.archive.name}.7z"
485 basedir="${results.test}"
486 includes="**" />
487 </target>
488
489 <!-- ================================================================== -->
490 <!--
491 - Build everything.
492 -->
493 <target name="all" description="Build JOGL JUNIT tests" depends="test.compile" />
494
495</project>
4960
=== removed directory '.pc/disable_android_2.diff'
=== removed directory '.pc/disable_android_2.diff/make'
=== removed file '.pc/disable_android_2.diff/make/build-common.xml'
--- .pc/disable_android_2.diff/make/build-common.xml 2011-10-09 19:26:30 +0000
+++ .pc/disable_android_2.diff/make/build-common.xml 1970-01-01 00:00:00 +0000
@@ -1,486 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="JOGLCommonStuff" basedir="." default="common.init">
4
5 <description>Common JOGL Stuff</description>
6
7 <fail message="Please build using Ant 1.8.0 or higher.">
8 <condition>
9 <not>
10 <antversion atleast="1.8.0"/>
11 </not>
12 </condition>
13 </fail>
14
15 <!-- Pull in GlueGen cpptasks build file -->
16 <property name="gluegen.root" value="/usr/share/gluegen2/" />
17 <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
18 <import file="${gluegen.root}/make/jogamp-archivetasks.xml" />
19 <import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
20 <import file="${gluegen.root}/make/jogamp-env.xml" />
21
22 <property name="ant-contrib.jar" value="/usr/share/java/ant-contrib.jar" />
23
24 <condition property="rootrel.build" value="build">
25 <not>
26 <isset property="rootrel.build"/>
27 </not>
28 </condition>
29
30 <import file="versions.xml" />
31
32 <!-- ================================================================== -->
33 <!--
34 - Base initialization of properties and detection of operating system.
35 -->
36 <target name="set.debug">
37 <property name="c.compiler.debug" value="true" />
38 <property name="javacdebug" value="true" />
39 <property name="javacdebuglevel" value="source,lines,vars" />
40 </target>
41 <target name="common.init.debug" depends="set.debug, common.init"/>
42
43 <target name="common.init" depends="jogamp.env.init, gluegen.cpptasks.detect.os" unless="common.init.done">
44 <property name="common.init.done" value="true" />
45
46 <!-- Set the project root directory to be up one directory. -->
47 <property name="project.root" value=".." />
48 <property name="build" value="${project.root}/${rootrel.build}" />
49 <property name="tempdir" value="${project.root}/build-temp" />
50 <property name="src" value="${project.root}/src" />
51 <property name="lib" value="${build}/lib" />
52 <property name="jar" value="${build}/jar" />
53
54 <property name="all.srcj.path" value="${src}/nativewindow/classes;${src}/jogl/classes;${src}/newt/classes" />
55 <!-- No generated classes for Newt at the present time -->
56 <property name="all.genj.path" value="${build}/nativewindow/gensrc/classes;${build}/jogl/gensrc/classes" />
57
58 <!-- Set the configuration and build files to this directory. -->
59 <property name="make" value="." />
60 <property name="config" value="${make}/config" />
61 <property name="stub.includes" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet -->
62
63 <property name="stub.includes.gluegen.gg" value="${gluegen.root}/make/stub_includes/gluegen" />
64 <property name="stub.includes.gluegen.cc" value="${gluegen.root}/make/stub_includes/platform" />
65
66 <tstamp>
67 <format property="version.timestamp" pattern="yyyyMMdd"/>
68 </tstamp>
69
70 <property name="jogl.build.number" value="manual"/>
71 <property name="jogl.build.id" value="${version.timestamp}"/>
72 <mkdir dir="${tempdir}" />
73 <property name="jogl.build.branch" value="manual"/> <!-- fallback -->
74 <property name="jogl.build.commit" value="manual"/> <!-- fallback -->
75
76 <property name="nativewindow.version" value="${nativewindow_base_version}-b${jogl.build.number}-${version.timestamp}" />
77 <property name="jogl.version" value="${jogl_base_version}-b${jogl.build.number}-${version.timestamp}" />
78 <property name="newt.version" value="${newt_base_version}-b${jogl.build.number}-${version.timestamp}" />
79 <property name="jogl.version.plus" value="${jogl_base_version}-${jogl.build.branch}-b${jogl.build.number}-${jogl.build.commit}-${version.timestamp}" />
80
81 <property name="archive.name" value="jogl-${jogl.version}-${os.and.arch}" />
82 <property name="archive" value="${build}/${archive.name}" />
83
84 <condition property="setup.noNativeAWT">
85 <or>
86 <isset property="setup.noAWT"/>
87 <isset property="isAndroid"/>
88 </or>
89 </condition>
90
91 <condition property="setup.noNativeDesktop">
92 <or>
93 <isset property="isAndroid"/>
94 </or>
95 </condition>
96
97 <echo message="setup.noAWT: ${setup.noAWT}" />
98 <echo message="setup.noNativeAWT: ${setup.noNativeAWT}" />
99 <echo message="setup.noNativeDesktop: ${setup.noNativeDesktop}" />
100
101 <!-- Load the user specified properties file that defines various host
102 - specific paths. The user will be notified if this is does not
103 - exist. -->
104 <property name="user.properties.file" value="${user.home}/jogl.properties" />
105 <property file="${user.properties.file}" />
106 <echo message="Loaded ${user.properties.file}." />
107 <property file="${user.home}/gluegen.properties" />
108 <echo message="Loaded ${user.home}/gluegen.properties." />
109 <echo message="antlr.jar=${antlr.jar}" />
110 <echo message="junit.jar=${junit.jar}" />
111 <echo message="android.jar=${android.jar}" />
112
113 <!-- Set swt.jar to the correct file for this platform. We point to the debug JARs to allow
114 stepping into SWT calls using the accompanying source code zip archives. -->
115 <condition property="swt.jar" value="${project.root}/make/lib/swt/win32-win32-x86_64/swt-debug.jar">
116 <istrue value="${isWindowsAMD64}" />
117 </condition>
118 <condition property="swt.jar" value="${project.root}/make/lib/swt/win32-win32-x86/swt-debug.jar">
119 <istrue value="${isWindowsX86}" />
120 </condition>
121 <condition property="swt.jar" value="/usr/share/java/swt.jar">
122 <istrue value="${isLinux}" />
123 </condition>
124 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">
125 <istrue value="${isAndroid}" /> <!-- FIXME JAU .. hack -->
126 </condition>
127 <condition property="swt.jar" value="${project.root}/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar">
128 <and>
129 <istrue value="${isOSX}" />
130 <or>
131 <os arch="AMD64" />
132 <os arch="x86_64" />
133 </or>
134 </and>
135 </condition>
136 <condition property="swt.jar" value="${project.root}/make/lib/swt/cocoa-macosx/swt-debug.jar">
137 <and>
138 <istrue value="${isOSX}" />
139 <or>
140 <os arch="i386" />
141 <os arch="x86" />
142 </or>
143 </and>
144 </condition>
145 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
146 <istrue value="${isSolarisX86}" />
147 </condition>
148 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
149 <istrue value="${isSolarisAMD64}" />
150 </condition>
151 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
152 <istrue value="${isSolarisSparc}" />
153 </condition>
154 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
155 <istrue value="${isSolarisSparcv9}" />
156 </condition>
157 <echo message="swt.jar=${swt.jar}" />
158
159 <property name="target.sourcelevel" value="1.5" />
160 <property name="host.sourcelevel" value="1.5" />
161
162 <!-- property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /-->
163 <property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" />
164
165 <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
166 <property name="javacdebug" value="true" />
167 <property name="javacdebuglevel" value="source,lines" />
168 <!--property name="javacdebuglevel" value="source,lines,vars" /-->
169 <!-- property name="javac.memorymax" value="128m" /--> <!-- I ran out of memory with these .. linux x86_64 6u14 -->
170 <property name="javac.memorymax" value="512m" />
171
172 <!-- Names of directories relative to the project root.
173 Some of these are used in FileMappers later for dependence information
174 and need exact string matching, which is why they use file.separator
175 instead of "/". -->
176
177 <!-- NOTE that these require a checked-out GlueGen, etc workspace as a -->
178 <!-- sibling of the JOGL workspace. -->
179 <property name="gluegen.make" value="${gluegen.root}/make" />
180 <property name="gluegen.build.xml" value="${gluegen.make}/build.xml" />
181 <property name="build.gluegen" value="${gluegen.root}/${rootrel.build}" />
182 <property name="obj.gluegen" value="${build.gluegen}/obj"/>
183 <property name="gluegen.jar" value="/usr/share/java/gluegen2.jar" />
184 <property name="ant.jar" value="${ant.home}/lib/ant.jar" />
185 <property name="ant-junit.jar" value="${ant.home}/lib/ant-junit.jar" />
186
187 <property name="nativewindow.make" value="." />
188 <property name="nativewindow.build.xml" value="${nativewindow.make}/build-nativewindow.xml" />
189 <property name="build.nativewindow" value="${build}/nativewindow" />
190 <property name="obj.nativewindow" value="${build.nativewindow}/obj"/>
191
192 <property name="jogl.make" value="." />
193 <property name="jogl.build.xml" value="${jogl.make}/build-jogl.xml" />
194 <property name="build.jogl" value="${build}/jogl" />
195 <property name="obj.jogl" value="${build.jogl}/obj"/>
196
197 <property name="newt.make" value="." />
198 <property name="newt.build.xml" value="${newt.make}/build-newt.xml" />
199 <property name="build.newt" value="${build}/newt" />
200 <property name="obj.newt" value="${build.newt}/obj"/>
201
202 <property name="results.test" value="${build}/test/results" />
203 <property name="build.test" value="${build}/test/build" />
204 <property name="obj.test" value="${build.test}/obj"/>
205
206 <condition property="obj.custom" value="${custom.libdir}${path.separator}" else="">
207 <isset property="custom.libdir"/>
208 </condition>
209
210 <property name="obj.all.paths" value="${obj.custom}${obj.gluegen}${path.separator}${obj.nativewindow}${path.separator}${obj.jogl}${path.separator}${obj.newt}${path.separator}${obj.test}" />
211
212 <path id="gluegen.classpath">
213 <pathelement location="${gluegen.jar}" />
214 <pathelement location="${antlr.jar}" />
215 </path>
216
217 <property name="gluegen-gl.jar" value="${build.jogl}/gluegen-gl.jar" />
218
219 <path id="gluegen-gl.classpath">
220 <pathelement location="${gluegen.jar}" />
221 <pathelement location="${gluegen-gl.jar}" />
222 </path>
223
224 <!-- Atomic JavaSE JARS -->
225
226 <property name="nativewindow.core.jar" value="${build.nativewindow}/nativewindow.core.jar" />
227 <property name="nativewindow.awt.jar" value="${build.nativewindow}/nativewindow.awt.jar" />
228 <property name="nativewindow.os.x11.jar" value="${build.nativewindow}/nativewindow.os.x11.jar" />
229 <property name="nativewindow.os.win.jar" value="${build.nativewindow}/nativewindow.os.win.jar" />
230 <property name="nativewindow.os.macosx.jar" value="${build.nativewindow}/nativewindow.os.macosx.jar" />
231
232 <path id="nativewindow_all_atoms.classpath">
233 <pathelement location="${nativewindow.core.jar}" />
234 <pathelement location="${nativewindow.awt.jar}" />
235 <pathelement location="${nativewindow.os.x11.jar}" />
236 <pathelement location="${nativewindow.os.win.jar}" />
237 <pathelement location="${nativewindow.os.macosx.jar}" />
238 </path>
239 <path id="nativewindow_all-noawt_atoms.classpath">
240 <pathelement location="${nativewindow.core.jar}" />
241 <pathelement location="${nativewindow.os.x11.jar}" />
242 <pathelement location="${nativewindow.os.win.jar}" />
243 <pathelement location="${nativewindow.os.macosx.jar}" />
244 </path>
245 <path id="nativewindow_core_atoms.classpath">
246 <pathelement location="${nativewindow.core.jar}" />
247 </path>
248
249 <property name="jogl.core.jar" value="${build.jogl}/jogl.core.jar" />
250 <property name="jogl.sdk.jar" value="${build.jogl}/jogl.sdk.jar" />
251 <property name="jogl.glmobile.jar" value="${build.jogl}/jogl.glmobile.jar" />
252 <property name="jogl.glmobile.dbg.jar" value="${build.jogl}/jogl.glmobile.dbg.jar" />
253 <property name="jogl.util.jar" value="${build.jogl}/jogl.util.jar" />
254 <property name="jogl.glutess.jar" value="${build.jogl}/jogl.glu.tess.jar" />
255 <property name="jogl.glumipmap.jar" value="${build.jogl}/jogl.glu.mipmap.jar" />
256 <property name="jogl.util.fixedfuncemu.jar" value="${build.jogl}/jogl.util.fixedfuncemu.jar" />
257 <property name="jogl.awt.jar" value="${build.jogl}/jogl.awt.jar" />
258 <property name="jogl.util.awt.jar" value="${build.jogl}/jogl.util.awt.jar" />
259 <property name="jogl.os.x11.jar" value="${build.jogl}/jogl.os.x11.jar" />
260 <property name="jogl.os.win.jar" value="${build.jogl}/jogl.os.win.jar" />
261 <property name="jogl.os.osx.jar" value="${build.jogl}/jogl.os.osx.jar" />
262 <property name="jogl.gldesktop.jar" value="${build.jogl}/jogl.gldesktop.jar" />
263 <property name="jogl.gldesktop.dbg.jar" value="${build.jogl}/jogl.gldesktop.dbg.jar" />
264 <property name="jogl.glugldesktop.jar" value="${build.jogl}/jogl.glu.gldesktop.jar" />
265 <property name="jogl.util.gldesktop.jar" value="${build.jogl}/jogl.util.gldesktop.jar" />
266 <property name="jogl.omx.jar" value="${build.jogl}/jogl.omx.jar" />
267 <property name="jogl.cg.jar" value="${build.jogl}/jogl.cg.jar" />
268
269 <path id="jogl_all_atoms.classpath">
270 <pathelement location="${jogl.core.jar}" />
271 <pathelement location="${jogl.sdk.jar}" />
272 <pathelement location="${jogl.glmobile.jar}" />
273 <pathelement location="${jogl.glmobile.dbg.jar}" />
274 <pathelement location="${jogl.util.jar}" />
275 <pathelement location="${jogl.glutess.jar}" />
276 <pathelement location="${jogl.glumipmap.jar}" />
277 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
278 <pathelement location="${jogl.awt.jar}" />
279 <pathelement location="${jogl.util.awt.jar}" />
280 <pathelement location="${jogl.os.x11.jar}" />
281 <pathelement location="${jogl.os.win.jar}" />
282 <pathelement location="${jogl.os.osx.jar}" />
283 <pathelement location="${jogl.gldesktop.jar}" />
284 <pathelement location="${jogl.gldesktop.dbg.jar}" />
285 <pathelement location="${jogl.glugldesktop.jar}" />
286 <pathelement location="${jogl.util.gldesktop.jar}" />
287 <pathelement location="${jogl.omx.jar}" />
288 </path>
289 <path id="jogl_all-noawt_atoms.classpath">
290 <pathelement location="${jogl.core.jar}" />
291 <pathelement location="${jogl.sdk.jar}" />
292 <pathelement location="${jogl.glmobile.jar}" />
293 <pathelement location="${jogl.glmobile.dbg.jar}" />
294 <pathelement location="${jogl.util.jar}" />
295 <pathelement location="${jogl.glutess.jar}" />
296 <pathelement location="${jogl.glumipmap.jar}" />
297 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
298 <pathelement location="${jogl.os.x11.jar}" />
299 <pathelement location="${jogl.os.win.jar}" />
300 <pathelement location="${jogl.os.osx.jar}" />
301 <pathelement location="${jogl.gldesktop.jar}" />
302 <pathelement location="${jogl.gldesktop.dbg.jar}" />
303 <pathelement location="${jogl.glugldesktop.jar}" />
304 <pathelement location="${jogl.util.gldesktop.jar}" />
305 <pathelement location="${jogl.omx.jar}" />
306 </path>
307 <path id="jogl_all-mobile_atoms.classpath">
308 <pathelement location="${jogl.core.jar}" />
309 <pathelement location="${jogl.glmobile.jar}" />
310 <pathelement location="${jogl.glmobile.dbg.jar}" />
311 <pathelement location="${jogl.util.jar}" />
312 <pathelement location="${jogl.glutess.jar}" />
313 <pathelement location="${jogl.glumipmap.jar}" />
314 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
315 <pathelement location="${jogl.omx.jar}" />
316 </path>
317 <!--
318 ${jogl.core.jar} ${jogl.glutess.jar} ${jogl.glumipmap.jar} ${jogl.glugldesktop.jar} ${jogl.os.x11.jar} ${jogl.os.win.jar} ${jogl.os.osx.jar} ${jogl.gldesktop.jar} ${jogl.gldesktop.dbg.jar} ${jogl.glmobile.jar} ${jogl.glmobile.dbg.jar} ${jogl.omx.jar} ${jogl.util.jar} ${jogl.util.gldesktop.jar} ${jogl.util.awt.jar} ${jogl.util.fixedfuncemu.jar} ${jogl.sdk.jar} -->
319
320 <property name="newt.core.jar" value="${build.newt}/newt.core.jar" />
321 <property name="newt.ogl.jar" value="${build.newt}/newt.ogl.jar" />
322 <property name="newt.awt.jar" value="${build.newt}/newt.awt.jar" />
323 <property name="newt.driver.x11.jar" value="${build.newt}/newt.driver.x11.jar" />
324 <property name="newt.driver.win.jar" value="${build.newt}/newt.driver.win.jar" />
325 <property name="newt.driver.macosx.jar" value="${build.newt}/newt.driver.macosx.jar" />
326 <property name="newt.driver.android.jar" value="${build.newt}/newt.driver.android.jar" /> <!-- excluded from all -->
327 <property name="newt.driver.kd.jar" value="${build.newt}/newt.driver.kd.jar" /> <!-- excluded from all -->
328 <property name="newt.driver.intelgdl.jar" value="${build.newt}/newt.driver.intelgdl.jar" /> <!-- excluded from all -->
329 <property name="newt.driver.broadcomegl.jar" value="${build.newt}/newt.driver.broadcomegl.jar" /> <!-- excluded from all -->
330 <path id="newt_all_atoms.classpath">
331 <pathelement location="${newt.core.jar}" />
332 <pathelement location="${newt.ogl.jar}" />
333 <pathelement location="${newt.awt.jar}" />
334 <pathelement location="${newt.driver.x11.jar}" />
335 <pathelement location="${newt.driver.win.jar}" />
336 <pathelement location="${newt.driver.macosx.jar}" />
337 </path>
338 <path id="newt_all-noawt_atoms.classpath">
339 <pathelement location="${newt.core.jar}" />
340 <pathelement location="${newt.ogl.jar}" />
341 <pathelement location="${newt.driver.x11.jar}" />
342 <pathelement location="${newt.driver.win.jar}" />
343 <pathelement location="${newt.driver.macosx.jar}" />
344 </path>
345 <path id="newt_all-mobile_atoms.classpath">
346 <pathelement location="${newt.core.jar}" />
347 <pathelement location="${newt.ogl.jar}" />
348 <pathelement location="${newt.driver.x11.jar}" />
349 <pathelement location="${newt.driver.win.jar}" />
350 </path>
351 <path id="newt_all-android_atoms.classpath">
352 <pathelement location="${newt.core.jar}" />
353 <pathelement location="${newt.ogl.jar}" />
354 <pathelement location="${newt.driver.android.jar}" />
355 </path>
356
357 <!-- JavaSE combinations -->
358 <property name="gluegen-rt.jar" value="/usr/share/java/gluegen2-rt.jar" />
359 <property name="jogl.test.jar" value="${jar}/jogl.test.jar"/>
360
361 <!-- JavaSE combinations . AWT -->
362 <property name="jogl.all.jar" value="${jar}/jogl.all.jar" />
363 <property name="newt.event.jar" value="${jar}/newt.event.jar" />
364
365 <!-- JavaSE combinations . NO.AWT -->
366 <property name="jogl.all-noawt.jar" value="${jar}/jogl.all-noawt.jar" />
367 <property name="jogl.all-mobile.jar" value="${jar}/jogl.all-mobile.jar" />
368 <property name="jogl.all-android.jar" value="${jar}/jogl.all-android.jar" />
369
370 <path id="swt_gluegen.classpath">
371 <pathelement location="${gluegen-rt.jar}" />
372 <pathelement location="${swt.jar}" />
373 </path>
374
375 <!-- JOGL Compilation .. -->
376 <path id="nativewindow_gluegen.classpath">
377 <pathelement location="${gluegen-rt.jar}" />
378 <pathelement location="${swt.jar}" />
379 <path refid="nativewindow_all_atoms.classpath" />
380 </path>
381
382 <!-- NEWT Compilation .. -->
383 <path id="jogl_nativewindow_gluegen.classpath">
384 <pathelement location="${android.jar}" />
385 <pathelement location="${gluegen-rt.jar}" />
386 <pathelement location="${swt.jar}" />
387 <path refid="nativewindow_all_atoms.classpath" />
388 <path refid="jogl_all_atoms.classpath" />
389 </path>
390
391 <!-- Test Compilation .. -->
392 <path id="junit_jogl_newt_android.compile.classpath">
393 <pathelement location="${android.jar}" />
394 <pathelement location="${junit.jar}" />
395 <pathelement location="${ant.jar}" />
396 <pathelement location="${ant-junit.jar}" />
397 <pathelement location="${gluegen-rt.jar}" />
398 <pathelement location="${swt.jar}" />
399 <path refid="nativewindow_all_atoms.classpath" />
400 <path refid="jogl_all_atoms.classpath" />
401 <path refid="newt_all_atoms.classpath" />
402 <pathelement location="${newt.driver.android.jar}" />
403 </path>
404
405 <!-- Postbuild: javadoc .. -->
406 <path id="jogl_all.classpath">
407 <pathelement location="${android.jar}" />
408 <pathelement location="${gluegen-rt.jar}" />
409 <pathelement location="${swt.jar}" />
410 <pathelement location="${jogl.all.jar}" />
411 </path>
412
413 <!-- Test Run w/ AWT .. -->
414 <path id="junit_jogl_awt.run.classpath">
415 <pathelement location="${junit.jar}" />
416 <pathelement location="${ant.jar}" />
417 <pathelement location="${ant-junit.jar}" />
418 <pathelement location="${gluegen-rt.jar}" />
419 <pathelement location="${jogl.all.jar}" />
420 <pathelement location="${jogl.test.jar}" />
421 </path>
422 <property name="junit_jogl_awt.run.jars"
423 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
424
425 <!-- Test Run w/o AWT .. -->
426 <path id="junit_jogl_noawt.run.classpath">
427 <pathelement location="${junit.jar}" />
428 <pathelement location="${ant.jar}" />
429 <pathelement location="${ant-junit.jar}" />
430 <pathelement location="${gluegen-rt.jar}" />
431 <pathelement location="${jogl.all-noawt.jar}" />
432 <pathelement location="${jogl.test.jar}" />
433 </path>
434 <property name="junit_jogl_noawt.run.jars"
435 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
436
437 <!-- Test Run w/ SWT .. -->
438 <path id="junit_jogl_swt.run.classpath">
439 <pathelement location="${junit.jar}" />
440 <pathelement location="${ant.jar}" />
441 <pathelement location="${ant-junit.jar}" />
442 <pathelement location="${gluegen-rt.jar}" />
443 <pathelement location="${swt.jar}" />
444 <pathelement location="${jogl.all.jar}" />
445 <pathelement location="${jogl.test.jar}" />
446 </path>
447 <property name="junit_jogl_swt.run.jars"
448 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${swt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
449
450 <!-- Test Run w/ Android [w/o AWT] .. -->
451 <path id="junit_jogl_android.run.classpath">
452 <pathelement location="${junit.jar}" />
453 <pathelement location="${ant.jar}" />
454 <pathelement location="${ant-junit.jar}" />
455 <pathelement location="${android.jar}" />
456 <pathelement location="${gluegen-rt.jar}" />
457 <pathelement location="${jogl.all-android.jar}" />
458 <pathelement location="${jogl.test.jar}" />
459 </path>
460 <property name="junit_jogl_android.run.jars"
461 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-android.jar}${path.separator}${jogl.test.jar}"/>
462
463
464 <!-- The location and name of the configuration ANT file that will
465 - validate to ensure that all user-define variables are set. -->
466 <property name="validate.user.properties" value="${make}/validate-properties.xml" />
467 </target>
468
469 <!-- ================================================================== -->
470 <!-- GlueGen and BuildStaticGLInfo creation, task setup and Java file generation -->
471 <!--
472 - Build GlueGen
473 -->
474 <target name="common.gluegen.build" depends="common.init" unless="common.gluegen.build.done">
475 <property name="common.gluegen.build.done" value="true" />
476
477 <!-- Run the GlueGen build to ensure that the GlueGen ANT task
478 - has been built. -->
479 <ant antfile="${gluegen.build.xml}" dir="${gluegen.make}" target="base.compile" inheritAll="false">
480 <property name="build" value="${basedir}/../"/>
481 <property name="test.dir" value="${basedir}/../test"/>
482 </ant>
483 </target>
484
485
486</project>
4870
=== removed directory '.pc/disable_git_call.diff'
=== removed directory '.pc/disable_git_call.diff/make'
=== removed file '.pc/disable_git_call.diff/make/build-common.xml'
--- .pc/disable_git_call.diff/make/build-common.xml 2011-10-08 11:39:42 +0000
+++ .pc/disable_git_call.diff/make/build-common.xml 1970-01-01 00:00:00 +0000
@@ -1,498 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="JOGLCommonStuff" basedir="." default="common.init">
4
5 <description>Common JOGL Stuff</description>
6
7 <fail message="Please build using Ant 1.8.0 or higher.">
8 <condition>
9 <not>
10 <antversion atleast="1.8.0"/>
11 </not>
12 </condition>
13 </fail>
14
15 <!-- Pull in GlueGen cpptasks build file -->
16 <property name="gluegen.root" value="/usr/share/gluegen2/" />
17 <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
18 <import file="${gluegen.root}/make/jogamp-archivetasks.xml" />
19 <import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
20 <import file="${gluegen.root}/make/jogamp-env.xml" />
21
22 <property name="ant-contrib.jar" value="/usr/share/java/ant-contrib.jar" />
23
24 <condition property="rootrel.build" value="build">
25 <not>
26 <isset property="rootrel.build"/>
27 </not>
28 </condition>
29
30 <import file="versions.xml" />
31
32 <!-- ================================================================== -->
33 <!--
34 - Base initialization of properties and detection of operating system.
35 -->
36 <target name="set.debug">
37 <property name="c.compiler.debug" value="true" />
38 <property name="javacdebug" value="true" />
39 <property name="javacdebuglevel" value="source,lines,vars" />
40 </target>
41 <target name="common.init.debug" depends="set.debug, common.init"/>
42
43 <target name="common.init" depends="jogamp.env.init, gluegen.cpptasks.detect.os" unless="common.init.done">
44 <property name="common.init.done" value="true" />
45
46 <!-- Set the project root directory to be up one directory. -->
47 <property name="project.root" value=".." />
48 <property name="build" value="${project.root}/${rootrel.build}" />
49 <property name="tempdir" value="${project.root}/build-temp" />
50 <property name="src" value="${project.root}/src" />
51 <property name="lib" value="${build}/lib" />
52 <property name="jar" value="${build}/jar" />
53
54 <property name="all.srcj.path" value="${src}/nativewindow/classes;${src}/jogl/classes;${src}/newt/classes" />
55 <!-- No generated classes for Newt at the present time -->
56 <property name="all.genj.path" value="${build}/nativewindow/gensrc/classes;${build}/jogl/gensrc/classes" />
57
58 <!-- Set the configuration and build files to this directory. -->
59 <property name="make" value="." />
60 <property name="config" value="${make}/config" />
61 <property name="stub.includes" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet -->
62
63 <property name="stub.includes.gluegen.gg" value="${gluegen.root}/make/stub_includes/gluegen" />
64 <property name="stub.includes.gluegen.cc" value="${gluegen.root}/make/stub_includes/platform" />
65
66 <tstamp>
67 <format property="version.timestamp" pattern="yyyyMMdd"/>
68 </tstamp>
69
70 <property name="jogl.build.number" value="manual"/>
71 <property name="jogl.build.id" value="${version.timestamp}"/>
72 <mkdir dir="${tempdir}" />
73 <exec dir="." executable="git" logError="true" failonerror="false" failifexecutionfails="false"
74 output="${tempdir}/localbranch.raw">
75 <arg line="branch --no-color"/>
76 </exec>
77 <exec dir="." executable="sed" logError="true" failonerror="false" failifexecutionfails="false"
78 outputproperty="jogl.build.branch">
79 <arg line="-e '/^[^*]/d' -e 's/* \(.*\)/\1/' ${tempdir}/localbranch.raw"/>
80 </exec>
81 <property name="jogl.build.branch" value="manual"/> <!-- fallback -->
82 <exec dir="${project.root}" executable="git" logError="true" failonerror="false" failifexecutionfails="false"
83 outputproperty="jogl.build.commit">
84 <arg line="rev-parse HEAD"/>
85 </exec>
86 <property name="jogl.build.commit" value="manual"/> <!-- fallback -->
87
88 <property name="nativewindow.version" value="${nativewindow_base_version}-b${jogl.build.number}-${version.timestamp}" />
89 <property name="jogl.version" value="${jogl_base_version}-b${jogl.build.number}-${version.timestamp}" />
90 <property name="newt.version" value="${newt_base_version}-b${jogl.build.number}-${version.timestamp}" />
91 <property name="jogl.version.plus" value="${jogl_base_version}-${jogl.build.branch}-b${jogl.build.number}-${jogl.build.commit}-${version.timestamp}" />
92
93 <property name="archive.name" value="jogl-${jogl.version}-${os.and.arch}" />
94 <property name="archive" value="${build}/${archive.name}" />
95
96 <condition property="setup.noNativeAWT">
97 <or>
98 <isset property="setup.noAWT"/>
99 <isset property="isAndroid"/>
100 </or>
101 </condition>
102
103 <condition property="setup.noNativeDesktop">
104 <or>
105 <isset property="isAndroid"/>
106 </or>
107 </condition>
108
109 <echo message="setup.noAWT: ${setup.noAWT}" />
110 <echo message="setup.noNativeAWT: ${setup.noNativeAWT}" />
111 <echo message="setup.noNativeDesktop: ${setup.noNativeDesktop}" />
112
113 <!-- Load the user specified properties file that defines various host
114 - specific paths. The user will be notified if this is does not
115 - exist. -->
116 <property name="user.properties.file" value="${user.home}/jogl.properties" />
117 <property file="${user.properties.file}" />
118 <echo message="Loaded ${user.properties.file}." />
119 <property file="${user.home}/gluegen.properties" />
120 <echo message="Loaded ${user.home}/gluegen.properties." />
121 <echo message="antlr.jar=${antlr.jar}" />
122 <echo message="junit.jar=${junit.jar}" />
123 <echo message="android.jar=${android.jar}" />
124
125 <!-- Set swt.jar to the correct file for this platform. We point to the debug JARs to allow
126 stepping into SWT calls using the accompanying source code zip archives. -->
127 <condition property="swt.jar" value="${project.root}/make/lib/swt/win32-win32-x86_64/swt-debug.jar">
128 <istrue value="${isWindowsAMD64}" />
129 </condition>
130 <condition property="swt.jar" value="${project.root}/make/lib/swt/win32-win32-x86/swt-debug.jar">
131 <istrue value="${isWindowsX86}" />
132 </condition>
133 <condition property="swt.jar" value="/usr/share/java/swt.jar">
134 <istrue value="${isLinux}" />
135 </condition>
136 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">
137 <istrue value="${isAndroid}" /> <!-- FIXME JAU .. hack -->
138 </condition>
139 <condition property="swt.jar" value="${project.root}/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar">
140 <and>
141 <istrue value="${isOSX}" />
142 <or>
143 <os arch="AMD64" />
144 <os arch="x86_64" />
145 </or>
146 </and>
147 </condition>
148 <condition property="swt.jar" value="${project.root}/make/lib/swt/cocoa-macosx/swt-debug.jar">
149 <and>
150 <istrue value="${isOSX}" />
151 <or>
152 <os arch="i386" />
153 <os arch="x86" />
154 </or>
155 </and>
156 </condition>
157 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
158 <istrue value="${isSolarisX86}" />
159 </condition>
160 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
161 <istrue value="${isSolarisAMD64}" />
162 </condition>
163 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
164 <istrue value="${isSolarisSparc}" />
165 </condition>
166 <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
167 <istrue value="${isSolarisSparcv9}" />
168 </condition>
169 <echo message="swt.jar=${swt.jar}" />
170
171 <property name="target.sourcelevel" value="1.5" />
172 <property name="host.sourcelevel" value="1.5" />
173
174 <!-- property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /-->
175 <property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" />
176
177 <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
178 <property name="javacdebug" value="true" />
179 <property name="javacdebuglevel" value="source,lines" />
180 <!--property name="javacdebuglevel" value="source,lines,vars" /-->
181 <!-- property name="javac.memorymax" value="128m" /--> <!-- I ran out of memory with these .. linux x86_64 6u14 -->
182 <property name="javac.memorymax" value="512m" />
183
184 <!-- Names of directories relative to the project root.
185 Some of these are used in FileMappers later for dependence information
186 and need exact string matching, which is why they use file.separator
187 instead of "/". -->
188
189 <!-- NOTE that these require a checked-out GlueGen, etc workspace as a -->
190 <!-- sibling of the JOGL workspace. -->
191 <property name="gluegen.make" value="${gluegen.root}/make" />
192 <property name="gluegen.build.xml" value="${gluegen.make}/build.xml" />
193 <property name="build.gluegen" value="${gluegen.root}/${rootrel.build}" />
194 <property name="obj.gluegen" value="${build.gluegen}/obj"/>
195 <property name="gluegen.jar" value="/usr/share/java/gluegen2.jar" />
196 <property name="ant.jar" value="${ant.home}/lib/ant.jar" />
197 <property name="ant-junit.jar" value="${ant.home}/lib/ant-junit.jar" />
198
199 <property name="nativewindow.make" value="." />
200 <property name="nativewindow.build.xml" value="${nativewindow.make}/build-nativewindow.xml" />
201 <property name="build.nativewindow" value="${build}/nativewindow" />
202 <property name="obj.nativewindow" value="${build.nativewindow}/obj"/>
203
204 <property name="jogl.make" value="." />
205 <property name="jogl.build.xml" value="${jogl.make}/build-jogl.xml" />
206 <property name="build.jogl" value="${build}/jogl" />
207 <property name="obj.jogl" value="${build.jogl}/obj"/>
208
209 <property name="newt.make" value="." />
210 <property name="newt.build.xml" value="${newt.make}/build-newt.xml" />
211 <property name="build.newt" value="${build}/newt" />
212 <property name="obj.newt" value="${build.newt}/obj"/>
213
214 <property name="results.test" value="${build}/test/results" />
215 <property name="build.test" value="${build}/test/build" />
216 <property name="obj.test" value="${build.test}/obj"/>
217
218 <condition property="obj.custom" value="${custom.libdir}${path.separator}" else="">
219 <isset property="custom.libdir"/>
220 </condition>
221
222 <property name="obj.all.paths" value="${obj.custom}${obj.gluegen}${path.separator}${obj.nativewindow}${path.separator}${obj.jogl}${path.separator}${obj.newt}${path.separator}${obj.test}" />
223
224 <path id="gluegen.classpath">
225 <pathelement location="${gluegen.jar}" />
226 <pathelement location="${antlr.jar}" />
227 </path>
228
229 <property name="gluegen-gl.jar" value="${build.jogl}/gluegen-gl.jar" />
230
231 <path id="gluegen-gl.classpath">
232 <pathelement location="${gluegen.jar}" />
233 <pathelement location="${gluegen-gl.jar}" />
234 </path>
235
236 <!-- Atomic JavaSE JARS -->
237
238 <property name="nativewindow.core.jar" value="${build.nativewindow}/nativewindow.core.jar" />
239 <property name="nativewindow.awt.jar" value="${build.nativewindow}/nativewindow.awt.jar" />
240 <property name="nativewindow.os.x11.jar" value="${build.nativewindow}/nativewindow.os.x11.jar" />
241 <property name="nativewindow.os.win.jar" value="${build.nativewindow}/nativewindow.os.win.jar" />
242 <property name="nativewindow.os.macosx.jar" value="${build.nativewindow}/nativewindow.os.macosx.jar" />
243
244 <path id="nativewindow_all_atoms.classpath">
245 <pathelement location="${nativewindow.core.jar}" />
246 <pathelement location="${nativewindow.awt.jar}" />
247 <pathelement location="${nativewindow.os.x11.jar}" />
248 <pathelement location="${nativewindow.os.win.jar}" />
249 <pathelement location="${nativewindow.os.macosx.jar}" />
250 </path>
251 <path id="nativewindow_all-noawt_atoms.classpath">
252 <pathelement location="${nativewindow.core.jar}" />
253 <pathelement location="${nativewindow.os.x11.jar}" />
254 <pathelement location="${nativewindow.os.win.jar}" />
255 <pathelement location="${nativewindow.os.macosx.jar}" />
256 </path>
257 <path id="nativewindow_core_atoms.classpath">
258 <pathelement location="${nativewindow.core.jar}" />
259 </path>
260
261 <property name="jogl.core.jar" value="${build.jogl}/jogl.core.jar" />
262 <property name="jogl.sdk.jar" value="${build.jogl}/jogl.sdk.jar" />
263 <property name="jogl.glmobile.jar" value="${build.jogl}/jogl.glmobile.jar" />
264 <property name="jogl.glmobile.dbg.jar" value="${build.jogl}/jogl.glmobile.dbg.jar" />
265 <property name="jogl.util.jar" value="${build.jogl}/jogl.util.jar" />
266 <property name="jogl.glutess.jar" value="${build.jogl}/jogl.glu.tess.jar" />
267 <property name="jogl.glumipmap.jar" value="${build.jogl}/jogl.glu.mipmap.jar" />
268 <property name="jogl.util.fixedfuncemu.jar" value="${build.jogl}/jogl.util.fixedfuncemu.jar" />
269 <property name="jogl.awt.jar" value="${build.jogl}/jogl.awt.jar" />
270 <property name="jogl.util.awt.jar" value="${build.jogl}/jogl.util.awt.jar" />
271 <property name="jogl.os.x11.jar" value="${build.jogl}/jogl.os.x11.jar" />
272 <property name="jogl.os.win.jar" value="${build.jogl}/jogl.os.win.jar" />
273 <property name="jogl.os.osx.jar" value="${build.jogl}/jogl.os.osx.jar" />
274 <property name="jogl.gldesktop.jar" value="${build.jogl}/jogl.gldesktop.jar" />
275 <property name="jogl.gldesktop.dbg.jar" value="${build.jogl}/jogl.gldesktop.dbg.jar" />
276 <property name="jogl.glugldesktop.jar" value="${build.jogl}/jogl.glu.gldesktop.jar" />
277 <property name="jogl.util.gldesktop.jar" value="${build.jogl}/jogl.util.gldesktop.jar" />
278 <property name="jogl.omx.jar" value="${build.jogl}/jogl.omx.jar" />
279 <property name="jogl.cg.jar" value="${build.jogl}/jogl.cg.jar" />
280
281 <path id="jogl_all_atoms.classpath">
282 <pathelement location="${jogl.core.jar}" />
283 <pathelement location="${jogl.sdk.jar}" />
284 <pathelement location="${jogl.glmobile.jar}" />
285 <pathelement location="${jogl.glmobile.dbg.jar}" />
286 <pathelement location="${jogl.util.jar}" />
287 <pathelement location="${jogl.glutess.jar}" />
288 <pathelement location="${jogl.glumipmap.jar}" />
289 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
290 <pathelement location="${jogl.awt.jar}" />
291 <pathelement location="${jogl.util.awt.jar}" />
292 <pathelement location="${jogl.os.x11.jar}" />
293 <pathelement location="${jogl.os.win.jar}" />
294 <pathelement location="${jogl.os.osx.jar}" />
295 <pathelement location="${jogl.gldesktop.jar}" />
296 <pathelement location="${jogl.gldesktop.dbg.jar}" />
297 <pathelement location="${jogl.glugldesktop.jar}" />
298 <pathelement location="${jogl.util.gldesktop.jar}" />
299 <pathelement location="${jogl.omx.jar}" />
300 </path>
301 <path id="jogl_all-noawt_atoms.classpath">
302 <pathelement location="${jogl.core.jar}" />
303 <pathelement location="${jogl.sdk.jar}" />
304 <pathelement location="${jogl.glmobile.jar}" />
305 <pathelement location="${jogl.glmobile.dbg.jar}" />
306 <pathelement location="${jogl.util.jar}" />
307 <pathelement location="${jogl.glutess.jar}" />
308 <pathelement location="${jogl.glumipmap.jar}" />
309 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
310 <pathelement location="${jogl.os.x11.jar}" />
311 <pathelement location="${jogl.os.win.jar}" />
312 <pathelement location="${jogl.os.osx.jar}" />
313 <pathelement location="${jogl.gldesktop.jar}" />
314 <pathelement location="${jogl.gldesktop.dbg.jar}" />
315 <pathelement location="${jogl.glugldesktop.jar}" />
316 <pathelement location="${jogl.util.gldesktop.jar}" />
317 <pathelement location="${jogl.omx.jar}" />
318 </path>
319 <path id="jogl_all-mobile_atoms.classpath">
320 <pathelement location="${jogl.core.jar}" />
321 <pathelement location="${jogl.glmobile.jar}" />
322 <pathelement location="${jogl.glmobile.dbg.jar}" />
323 <pathelement location="${jogl.util.jar}" />
324 <pathelement location="${jogl.glutess.jar}" />
325 <pathelement location="${jogl.glumipmap.jar}" />
326 <pathelement location="${jogl.util.fixedfuncemu.jar}" />
327 <pathelement location="${jogl.omx.jar}" />
328 </path>
329 <!--
330 ${jogl.core.jar} ${jogl.glutess.jar} ${jogl.glumipmap.jar} ${jogl.glugldesktop.jar} ${jogl.os.x11.jar} ${jogl.os.win.jar} ${jogl.os.osx.jar} ${jogl.gldesktop.jar} ${jogl.gldesktop.dbg.jar} ${jogl.glmobile.jar} ${jogl.glmobile.dbg.jar} ${jogl.omx.jar} ${jogl.util.jar} ${jogl.util.gldesktop.jar} ${jogl.util.awt.jar} ${jogl.util.fixedfuncemu.jar} ${jogl.sdk.jar} -->
331
332 <property name="newt.core.jar" value="${build.newt}/newt.core.jar" />
333 <property name="newt.ogl.jar" value="${build.newt}/newt.ogl.jar" />
334 <property name="newt.awt.jar" value="${build.newt}/newt.awt.jar" />
335 <property name="newt.driver.x11.jar" value="${build.newt}/newt.driver.x11.jar" />
336 <property name="newt.driver.win.jar" value="${build.newt}/newt.driver.win.jar" />
337 <property name="newt.driver.macosx.jar" value="${build.newt}/newt.driver.macosx.jar" />
338 <property name="newt.driver.android.jar" value="${build.newt}/newt.driver.android.jar" /> <!-- excluded from all -->
339 <property name="newt.driver.kd.jar" value="${build.newt}/newt.driver.kd.jar" /> <!-- excluded from all -->
340 <property name="newt.driver.intelgdl.jar" value="${build.newt}/newt.driver.intelgdl.jar" /> <!-- excluded from all -->
341 <property name="newt.driver.broadcomegl.jar" value="${build.newt}/newt.driver.broadcomegl.jar" /> <!-- excluded from all -->
342 <path id="newt_all_atoms.classpath">
343 <pathelement location="${newt.core.jar}" />
344 <pathelement location="${newt.ogl.jar}" />
345 <pathelement location="${newt.awt.jar}" />
346 <pathelement location="${newt.driver.x11.jar}" />
347 <pathelement location="${newt.driver.win.jar}" />
348 <pathelement location="${newt.driver.macosx.jar}" />
349 </path>
350 <path id="newt_all-noawt_atoms.classpath">
351 <pathelement location="${newt.core.jar}" />
352 <pathelement location="${newt.ogl.jar}" />
353 <pathelement location="${newt.driver.x11.jar}" />
354 <pathelement location="${newt.driver.win.jar}" />
355 <pathelement location="${newt.driver.macosx.jar}" />
356 </path>
357 <path id="newt_all-mobile_atoms.classpath">
358 <pathelement location="${newt.core.jar}" />
359 <pathelement location="${newt.ogl.jar}" />
360 <pathelement location="${newt.driver.x11.jar}" />
361 <pathelement location="${newt.driver.win.jar}" />
362 </path>
363 <path id="newt_all-android_atoms.classpath">
364 <pathelement location="${newt.core.jar}" />
365 <pathelement location="${newt.ogl.jar}" />
366 <pathelement location="${newt.driver.android.jar}" />
367 </path>
368
369 <!-- JavaSE combinations -->
370 <property name="gluegen-rt.jar" value="/usr/share/java/gluegen2-rt.jar" />
371 <property name="jogl.test.jar" value="${jar}/jogl.test.jar"/>
372
373 <!-- JavaSE combinations . AWT -->
374 <property name="jogl.all.jar" value="${jar}/jogl.all.jar" />
375 <property name="newt.event.jar" value="${jar}/newt.event.jar" />
376
377 <!-- JavaSE combinations . NO.AWT -->
378 <property name="jogl.all-noawt.jar" value="${jar}/jogl.all-noawt.jar" />
379 <property name="jogl.all-mobile.jar" value="${jar}/jogl.all-mobile.jar" />
380 <property name="jogl.all-android.jar" value="${jar}/jogl.all-android.jar" />
381
382 <path id="swt_gluegen.classpath">
383 <pathelement location="${gluegen-rt.jar}" />
384 <pathelement location="${swt.jar}" />
385 </path>
386
387 <!-- JOGL Compilation .. -->
388 <path id="nativewindow_gluegen.classpath">
389 <pathelement location="${gluegen-rt.jar}" />
390 <pathelement location="${swt.jar}" />
391 <path refid="nativewindow_all_atoms.classpath" />
392 </path>
393
394 <!-- NEWT Compilation .. -->
395 <path id="jogl_nativewindow_gluegen.classpath">
396 <pathelement location="${android.jar}" />
397 <pathelement location="${gluegen-rt.jar}" />
398 <pathelement location="${swt.jar}" />
399 <path refid="nativewindow_all_atoms.classpath" />
400 <path refid="jogl_all_atoms.classpath" />
401 </path>
402
403 <!-- Test Compilation .. -->
404 <path id="junit_jogl_newt_android.compile.classpath">
405 <pathelement location="${android.jar}" />
406 <pathelement location="${junit.jar}" />
407 <pathelement location="${ant.jar}" />
408 <pathelement location="${ant-junit.jar}" />
409 <pathelement location="${gluegen-rt.jar}" />
410 <pathelement location="${swt.jar}" />
411 <path refid="nativewindow_all_atoms.classpath" />
412 <path refid="jogl_all_atoms.classpath" />
413 <path refid="newt_all_atoms.classpath" />
414 <pathelement location="${newt.driver.android.jar}" />
415 </path>
416
417 <!-- Postbuild: javadoc .. -->
418 <path id="jogl_all.classpath">
419 <pathelement location="${android.jar}" />
420 <pathelement location="${gluegen-rt.jar}" />
421 <pathelement location="${swt.jar}" />
422 <pathelement location="${jogl.all.jar}" />
423 </path>
424
425 <!-- Test Run w/ AWT .. -->
426 <path id="junit_jogl_awt.run.classpath">
427 <pathelement location="${junit.jar}" />
428 <pathelement location="${ant.jar}" />
429 <pathelement location="${ant-junit.jar}" />
430 <pathelement location="${gluegen-rt.jar}" />
431 <pathelement location="${jogl.all.jar}" />
432 <pathelement location="${jogl.test.jar}" />
433 </path>
434 <property name="junit_jogl_awt.run.jars"
435 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
436
437 <!-- Test Run w/o AWT .. -->
438 <path id="junit_jogl_noawt.run.classpath">
439 <pathelement location="${junit.jar}" />
440 <pathelement location="${ant.jar}" />
441 <pathelement location="${ant-junit.jar}" />
442 <pathelement location="${gluegen-rt.jar}" />
443 <pathelement location="${jogl.all-noawt.jar}" />
444 <pathelement location="${jogl.test.jar}" />
445 </path>
446 <property name="junit_jogl_noawt.run.jars"
447 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
448
449 <!-- Test Run w/ SWT .. -->
450 <path id="junit_jogl_swt.run.classpath">
451 <pathelement location="${junit.jar}" />
452 <pathelement location="${ant.jar}" />
453 <pathelement location="${ant-junit.jar}" />
454 <pathelement location="${gluegen-rt.jar}" />
455 <pathelement location="${swt.jar}" />
456 <pathelement location="${jogl.all.jar}" />
457 <pathelement location="${jogl.test.jar}" />
458 </path>
459 <property name="junit_jogl_swt.run.jars"
460 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${swt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
461
462 <!-- Test Run w/ Android [w/o AWT] .. -->
463 <path id="junit_jogl_android.run.classpath">
464 <pathelement location="${junit.jar}" />
465 <pathelement location="${ant.jar}" />
466 <pathelement location="${ant-junit.jar}" />
467 <pathelement location="${android.jar}" />
468 <pathelement location="${gluegen-rt.jar}" />
469 <pathelement location="${jogl.all-android.jar}" />
470 <pathelement location="${jogl.test.jar}" />
471 </path>
472 <property name="junit_jogl_android.run.jars"
473 value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-android.jar}${path.separator}${jogl.test.jar}"/>
474
475
476 <!-- The location and name of the configuration ANT file that will
477 - validate to ensure that all user-define variables are set. -->
478 <property name="validate.user.properties" value="${make}/validate-properties.xml" />
479 </target>
480
481 <!-- ================================================================== -->
482 <!-- GlueGen and BuildStaticGLInfo creation, task setup and Java file generation -->
483 <!--
484 - Build GlueGen
485 -->
486 <target name="common.gluegen.build" depends="common.init" unless="common.gluegen.build.done">
487 <property name="common.gluegen.build.done" value="true" />
488
489 <!-- Run the GlueGen build to ensure that the GlueGen ANT task
490 - has been built. -->
491 <ant antfile="${gluegen.build.xml}" dir="${gluegen.make}" target="base.compile" inheritAll="false">
492 <property name="build" value="${basedir}/../"/>
493 <property name="test.dir" value="${basedir}/../test"/>
494 </ant>
495 </target>
496
497
498</project>
4990
=== removed directory '.pc/linker.cfg.id.os.diff'
=== removed directory '.pc/linker.cfg.id.os.diff/make'
=== removed file '.pc/linker.cfg.id.os.diff/make/build-jogl.xml'
--- .pc/linker.cfg.id.os.diff/make/build-jogl.xml 2011-10-10 12:13:14 +0000
+++ .pc/linker.cfg.id.os.diff/make/build-jogl.xml 1970-01-01 00:00:00 +0000
@@ -1,1655 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 - Ant build for JOGL. This build has been tested with ANT 1.7.0. The
4 - optional.jar that contains the optional ANT tasks must be in the ANT
5 - classpath (typically the ant/lib directory).
6 -
7 - A clean download of JOGL is required for this build.
8 -
9 - This build has no dependence on environment variables; the needed
10 - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
11 - script, by the virtual machine, or elsewhere. However, on all platforms,
12 - the C compiler and linker should be in the path. All other paths that
13 - need to be set are in host.properties.
14 -
15 - NOTE: because the GlueGen config files have their own relative paths
16 - which cannot be overridden by GlueGen, GlueGen MUST be run from
17 - the "make" directory. This also means that this build-jogl.xml MUST
18 - be run from the "make" directory.
19 -
20 - Public targets:
21 - all: (default; autodetects OS and chooses C compiler from gluegen.properties)
22 - clean: clean all built
23 - javadoc: create the standard developer Javadoc (recommended)
24 - (Note: should build all first - may be dependence in the future)
25 - javadoc.spec: create the standard developer Javadoc but exclude com.jogamp.* classes
26 - javadoc.dev.all: create the internal developer Javadoc. This includes the
27 - Java and C file generators. Note that it is only supported
28 - to create the Javadoc for the platform on which you are
29 - currently running.
30 -
31 - Note: on Windows the "win32.c.compiler" property in gluegen.properties
32 - is required to select the appropriate C compiler. See the example
33 - gluegen.properties in this directory for valid values. On Mac OS X
34 - universal binaries may also be built by setting the "macosxfat"
35 - property in gluegen.properties; again see the example file in this
36 - directory.
37 -
38 - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
39 - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
40 - the Java generated sources, the first and second phase Java compiles, and
41 - the building of the jar file. Thanks to Alex Radeski for the bulk of the
42 - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
43 - the original OS detection code.
44 -
45 - Some environment defs affecting native compilation (only)
46 setup.noNativeDesktop - drop native desktop bindings (glx, wgl, ..)
47
48 setup.addNativeOpenMAX - add experimental binding to Khrono's OpenMAX
49
50 setup.addNativeNVidiaCG - add experimental binding to NVidia's Cg language
51 (enabled for windows, osx and X11 per default)
52
53 - Internal settings, may not be necessary to set them manually,
54 since all JAR archives are orthogonal.
55 setup.noAWT
56
57 - Skip gluegen: java.generate.skip
58 -->
59<project name="JOGL" basedir="." default="all">
60
61 <import file="build-common.xml"/>
62
63 <!-- needed for outofdate task -->
64 <taskdef resource="net/sf/antcontrib/antlib.xml">
65 <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
66 </taskdef>
67
68 <condition property="setup.addNativeNVidiaCG">
69 <or>
70 <isset property="${isWindows}" />
71 <isset property="${isOSX}" />
72 <isset property="${isX11}" />
73 </or>
74 </condition>
75
76 <!-- ================================================================== -->
77 <!--
78 - Base initialization and detection of operating system.
79 -->
80 <target name="partitioning.setup" depends="common.init">
81 <property name="java.part.gluegen-gl"
82 value="com/jogamp/gluegen/opengl/** com/jogamp/gluegen/runtime/opengl/*"/>
83
84 <property name="java.part.core"
85 value="javax/media/opengl/* javax/media/opengl/fixedfunc/* javax/media/opengl/glu/* javax/media/opengl/glu/gl2es1/* com/jogamp/gluegen/runtime/opengl/* com/jogamp/opengl/* jogamp/opengl/* jogamp/opengl/glu/* jogamp/opengl/glu/error/*"/>
86 <property name="java.part.core.exclude" value="javax/media/opengl/Debug* javax/media/opengl/Trace*"/>
87
88 <property name="java.part.nv-cg"
89 value="com/jogamp/opengl/cg com/jogamp/opengl/cg/* jogamp/opengl/cg/*"/>
90
91 <property name="java.part.egl"
92 value="jogamp/opengl/egl/*"/>
93
94 <property name="java.part.glutess"
95 value="jogamp/opengl/glu/tessellator/**"/>
96
97 <property name="java.part.glumipmap"
98 value="jogamp/opengl/glu/mipmap/**"/>
99
100 <property name="java.part.glugldesktop"
101 value="jogamp/opengl/glu/gl2/** jogamp/opengl/glu/nurbs/** jogamp/opengl/glu/registry/** javax/media/opengl/glu/gl2/**"/>
102
103 <property name="java.part.openmax"
104 value="com/jogamp/openmax/** jogamp/openmax/**"/>
105
106 <property name="java.part.sdk"
107 value="com/jogamp/opengl/util/glsl/sdk/**"/>
108
109 <property name="java.part.glx"
110 value="jogamp/opengl/x11/glx/*"/>
111
112 <property name="java.part.wgl"
113 value="jogamp/opengl/windows/wgl/*"/>
114
115 <property name="java.part.cgl"
116 value="jogamp/opengl/macosx/cgl/*"/>
117
118 <property name="java.part.gldesktop"
119 value="jogamp/opengl/**/gl2/** jogamp/opengl/**/gl3/** jogamp/opengl/**/gl4/**"/>
120
121 <property name="java.part.gldesktop.dbg"
122 value="javax/media/opengl/TraceGL2.* javax/media/opengl/DebugGL2.* javax/media/opengl/TraceGL2GL3.* javax/media/opengl/DebugGL2GL3.* javax/media/opengl/TraceGL3.* javax/media/opengl/DebugGL3.* javax/media/opengl/TraceGL3bc.* javax/media/opengl/DebugGL3bc.* javax/media/opengl/TraceGL4.* javax/media/opengl/DebugGL4.* javax/media/opengl/TraceGL4bc.* javax/media/opengl/DebugGL4bc.*"/>
123
124 <property name="java.part.es1"
125 value="javax/media/opengl/**/es1/** com/jogamp/opengl/**/es1/** jogamp/opengl/**/es1/**"/>
126
127 <property name="java.part.es1.dbg"
128 value="javax/media/opengl/TraceGLES1.* javax/media/opengl/DebugGLES1.* javax/media/opengl/TraceGL2ES1.* javax/media/opengl/DebugGL2ES1.*"/>
129
130 <property name="java.part.es2"
131 value="javax/media/opengl/**/es2/** com/jogamp/opengl/**/es2/** jogamp/opengl/**/es2/**"/>
132
133 <property name="java.part.es2.dbg"
134 value="javax/media/opengl/TraceGLES2.* javax/media/opengl/DebugGLES2.* javax/media/opengl/TraceGL2ES2.* javax/media/opengl/DebugGL2ES2.*"/>
135
136 <property name="java.part.awt"
137 value="javax/media/opengl/awt/** jogamp/opengl/**/awt/**"/>
138
139 <property name="java.part.util"
140 value="com/jogamp/opengl/util/* com/jogamp/opengl/util/texture/** com/jogamp/opengl/util/packrect/** jogamp/opengl/util/*"/>
141
142 <property name="java.part.util.awt"
143 value="com/jogamp/opengl/util/**/awt/** com/jogamp/opengl/util/AWTAnimatorImpl*"/>
144
145 <property name="java.part.util.gldesktop"
146 value="com/jogamp/opengl/util/**/gl2/**"/>
147
148 <property name="java.part.util.glsl"
149 value="com/jogamp/opengl/util/glsl/* com/jogamp/opengl/util/glsl/fixedfunc/* jogamp/opengl/util/glsl/*"/>
150
151 <property name="java.part.util.graph"
152 value="com/jogamp/graph/** jogamp/graph/**"/>
153
154 <property name="java.part.util.graph.fonts"
155 value="jogamp/graph/font/fonts/**"/>
156
157 <property name="java.part.util.graph.shadercode"
158 value="jogamp/graph/curve/opengl/shader/* jogamp/graph/curve/opengl/shader/bin/**"/>
159
160 <property name="java.part.util.fixedfuncemu"
161 value="jogamp/opengl/util/glsl/fixedfunc/**"/>
162
163 <property name="java.part.util.fixedfuncemu.shadercode"
164 value="jogamp/opengl/util/glsl/fixedfunc/shaders/* jogamp/opengl/util/glsl/fixedfunc/shaders/bin/**"/>
165
166 <property name="java.part.nonjava"
167 value="${java.part.util.fixedfuncemu.shadercode} ${java.part.util.graph.shadercode} ${java.part.util.graph.fonts}"/>
168
169 <property name="java.part.all-desktop"
170 value="${java.part.sdk} ${java.part.glx} ${java.part.wgl} ${java.part.cgl} ${java.part.gldesktop} ${java.part.glugldesktop} ${java.part.util.gldesktop}"/>
171
172 <!-- condition excludes -->
173
174 <condition property="java.excludes.awt"
175 value="${java.part.awt} ${java.part.util.awt}">
176 <isset property="setup.noAWT"/>
177 </condition>
178
179 <property name="java.excludes.javadoc.packagenames"
180 value="jogamp.opengl.gl2.fixme.*,com.jogamp.audio.windows.waveout.TestSpatialization"/>
181
182 <property name="java.excludes.fixme"
183 value="jogamp/opengl/gl2/fixme/** com/jogamp/audio/windows/waveout/TestSpatialization.java" />
184
185 <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.awt}" />
186 <echo message="java.excludes.all: ${java.excludes.all}" />
187 </target>
188
189 <!-- ================================================================== -->
190 <!--
191 - Declare all paths and user defined variables.
192 -->
193 <target name="declare.common" description="Declare properties" depends="partitioning.setup">
194 <property name="config.jogl" value="${config}/jogl" />
195
196 <property name="rootrel.src.java" value="src/jogl/classes" />
197 <property name="rootrel.src.c" value="src/jogl/native" />
198 <property name="rootrel.src.c.openmax" value="src/jogl/native/openmax" />
199
200 <property name="rootrel.src.generated" value="${rootrel.build}/jogl/gensrc" />
201 <property name="rootrel.generated.c.jogl" value="${rootrel.src.generated}/native/jogl" />
202 <property name="rootrel.generated.c.cg" value="${rootrel.src.generated}/native/jogl_cg" />
203
204 <!-- The source directories. -->
205 <property name="src.java" value="${project.root}/${rootrel.src.java}" />
206 <property name="src.c" value="${project.root}/${rootrel.src.c}" />
207
208 <!-- The generated source directories. -->
209 <property name="src.generated" value="${build.jogl}/gensrc" />
210 <property name="src.generated.java" value="${src.generated}/classes" />
211 <property name="src.generated.java.cg" value="${src.generated.java}/com/jogamp/opengl/cg" />
212 <property name="src.generated.c" value="${src.generated}/native/jogl" />
213 <property name="src.generated.c.openmax" value="${src.generated}/native/openmax" />
214 <property name="src.generated.c.cg" value="${src.generated}/native/jogl_cg" />
215
216 <!-- The compiler output directories. -->
217 <property name="classes" value="${build.jogl}/classes" />
218 <property name="obj.joglsub" value="${obj.jogl}/jogl" />
219 <property name="obj.cgsub" value="${obj.jogl}/cg" />
220
221 <property name="javah.classpath" value="${gluegen-rt.jar}:${build.nativewindow}/classes:${classes}" />
222
223 <!-- The GL headers from which Java files are generated -->
224 <property name="stub.includes.opengl" value="${stub.includes}/opengl" />
225
226 <dirset id="stub.includes.fileset.all.gldesktop" dir=".">
227 <include name="${stub.includes}/opengl/**" />
228 <include name="${stub.includes}/macosx/**" />
229 <include name="${stub.includes}/win32/**" />
230 <include name="${stub.includes}/x11/**" />
231 <include name="${stub.includes}/khr/**" />
232 <include name="${stub.includes}/jni/**" />
233 </dirset>
234
235 <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}">
236 <include name="opengl/**" />
237 <include name="macosx/**" />
238 <include name="win32/**" />
239 <include name="x11/**" />
240 <include name="common/**" />
241 <include name="jni/**" />
242 </fileset>
243 <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
244 <fileset id="stub.includes.dependencies.fileset.3" dir="${config.jogl}">
245 <include name="*.cfg" />
246 <include name="gl*.java" />
247 <include name="*.c" />
248 <exclude name="cg-common.cfg" />
249 </fileset>
250 <dirset id="stub.includes.cg.fileset.all" dir=".">
251 <include name="${stub.includes}/opengl/**" />
252 <include name="${stub.includes}/cg/**" />
253 <include name="${stub.includes}/macosx/**" />
254 <include name="${stub.includes}/win32/**" />
255 <include name="${stub.includes}/x11/**" />
256 <include name="${stub.includes}/khr/**" />
257 <include name="${stub.includes}/jni/**" />
258 </dirset>
259 <fileset id="stub.includes.cg.dependencies.fileset" dir=".">
260 <include name="${stub.includes}/cg/**" />
261 <include name="${config.jogl}/cg-common.cfg" />
262 <include name="${config.jogl}/cg-common-CustomJavaCode.java" />
263 </fileset>
264
265 <!-- Create the classpath that includes GlueGen and
266 - the current classes for building the composable pipelines.
267 -->
268 <path id="pipeline.classpath">
269 <pathelement location="${gluegen.jar}" />
270 <pathelement location="${classes}" />
271 </path>
272
273 <!-- The javadoc dirs. -->
274 <property name="javadoc" value="${project.root}/javadoc_jogl_public" />
275 <property name="javadoc.spec" value="${project.root}/javadoc_jogl_spec" />
276 <property name="javadoc.dev" value="${project.root}/javadoc_jogl_dev" />
277 <property name="javadoc.windowtitle" value="JOGL API -- JSR-231 ${jogl_base_version} Specification" />
278 <property name="javadoc.overview" value="doc/jogl/spec-overview.html" />
279 <property name="javadoc.spec.packagenames" value="javax.media.opengl.*" />
280
281 <property name="javadoc.packagenames" value="${javadoc.spec.packagenames},com.jogamp.opengl.util.*" />
282
283 <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},jogamp.opengl.*,com.jogamp.gluegen,com.jogamp.gluegen.runtime" />
284 <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=231&quot;&gt;license terms&lt;/a&gt;." />
285 </target>
286
287 <target name="declare.gl.gles1">
288 <property name="gles1.headers" value="${stub.includes}/opengl/GLES/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform -->
289 </target>
290
291 <target name="declare.gl.gles2">
292 <property name="gles2.headers" value="${stub.includes}/opengl/GLES2/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform -->
293 </target>
294
295 <target name="declare.gl.gles" depends="declare.gl.gles1, declare.gl.gles2">
296 <!-- Prepare to build the EGL interface -->
297 <property name="window.es.cfg" value="${config.jogl}/egl.cfg" />
298 <property name="window.es.ext.cfg" value="${config.jogl}/eglext.cfg" />
299 <property name="window.es.system" value="egl"/>
300 </target>
301
302 <target name="declare.gl.gl2">
303 <property name="gl2.headers" value="${stub.includes}/opengl/GL/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform -->
304 </target>
305
306 <!-- ================================================================== -->
307 <!--
308 - Initialize all parameters required for the build and create any
309 - required directories.
310 -->
311 <target name="init" depends="declare.common, declare.gl.gles, declare.gl.gl2">
312 <!-- Create the required output directories. -->
313 <mkdir dir="${src.generated.java}" />
314 <mkdir dir="${src.generated.c}" />
315 <mkdir dir="${src.generated.c}/MacOSX" />
316 <mkdir dir="${src.generated.c}/Windows" />
317 <mkdir dir="${src.generated.c}/X11" />
318 <mkdir dir="${src.generated.c.openmax}" />
319 <mkdir dir="${classes}" />
320 <mkdir dir="${obj.jogl}" />
321 <mkdir dir="${obj.joglsub}" />
322 <mkdir dir="${obj.cgsub}" />
323 </target>
324
325 <!--
326 - Check to see whether we need to rebuild the generated sources.
327 -->
328 <target name="java.generate.check">
329 <!-- Blow away all target files if any dependencies are violated
330 (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
331 <!--
332 <dependset>
333 <srcfileset refid="stub.includes.dependencies.fileset.1" />
334 <srcfileset refid="stub.includes.dependencies.fileset.2" />
335 <srcfileset refid="stub.includes.dependencies.fileset.3" />
336 <targetfileset dir="${src.generated}">
337 <include name="**/*.java" />
338 <include name="**/*.c" />
339 </targetfileset>
340 </dependset>
341 -->
342
343 <!-- Now check for the presence of one well-known file -->
344 <uptodate property="java.generate.skip.es1"
345 targetfile="${src.generated.java}/javax/media/opengl/GLES1.java">
346 <srcfiles refid="stub.includes.dependencies.fileset.1" />
347 <srcfiles refid="stub.includes.dependencies.fileset.2" />
348 <srcfiles refid="stub.includes.dependencies.fileset.3" />
349 </uptodate>
350 <uptodate property="java.generate.skip.es2"
351 targetfile="${src.generated.java}/javax/media/opengl/GLES2.java">
352 <srcfiles refid="stub.includes.dependencies.fileset.1" />
353 <srcfiles refid="stub.includes.dependencies.fileset.2" />
354 <srcfiles refid="stub.includes.dependencies.fileset.3" />
355 </uptodate>
356 <uptodate property="java.generate.skip.gl2"
357 targetfile="${src.generated.java}/javax/media/opengl/GL2.java">
358 <srcfiles refid="stub.includes.dependencies.fileset.1" />
359 <srcfiles refid="stub.includes.dependencies.fileset.2" />
360 <srcfiles refid="stub.includes.dependencies.fileset.3" />
361 </uptodate>
362 <uptodate property="java.generate.skip.glu"
363 targetfile="${src.generated.java}/javax/media/opengl/glu/GLU.java">
364 <srcfiles refid="stub.includes.dependencies.fileset.1" />
365 <srcfiles refid="stub.includes.dependencies.fileset.2" />
366 <srcfiles refid="stub.includes.dependencies.fileset.3" />
367 </uptodate>
368
369 <condition property="java.generate.skip">
370 <and>
371 <isset property="java.generate.skip.es1"/>
372 <isset property="java.generate.skip.es2"/>
373 <isset property="java.generate.skip.gl2"/>
374 <isset property="java.generate.skip.glu"/>
375 </and>
376 </condition>
377
378 <!--property name="java.generate.skip" value="true"/-->
379 </target>
380
381 <target name="java.generate.cleantemp">
382 <delete includeEmptyDirs="true" quiet="true">
383 <fileset dir="${tempdir}/gensrc" />
384 </delete>
385 </target>
386
387 <target name="java.generate.copy2temp">
388 <copy todir="${tempdir}">
389 <fileset dir="${build.jogl}"
390 includes="gensrc/classes/**" />
391 </copy>
392 </target>
393
394 <target name="java.generate.gl_if">
395 <echo message="Generating GL interface" />
396 <antcall target="java.generate.copy2temp" inheritRefs="true" />
397 <gluegen src="${stub.includes.opengl}/gles2.c"
398 outputRootDir="${build.jogl}"
399 config="${config.jogl}/gl-if-gl.cfg"
400 includeRefid="stub.includes.fileset.all.gldesktop"
401 literalInclude="${stub.includes.gluegen.gg}"
402 emitter="com.jogamp.gluegen.opengl.GLEmitter"
403 debug="false">
404 <classpath refid="gluegen-gl.classpath" />
405 </gluegen>
406 </target>
407
408 <target name="java.generate.gl2_es1_if">
409 <echo message="Generating GL2_ES1 interface" />
410 <antcall target="java.generate.copy2temp" inheritRefs="true" />
411 <gluegen src="${stub.includes.opengl}/gles1.c"
412 outputRootDir="${build.jogl}"
413 config="${config.jogl}/gl-if-gl2_es1.cfg"
414 includeRefid="stub.includes.fileset.all.gldesktop"
415 literalInclude="${stub.includes.gluegen.gg}"
416 emitter="com.jogamp.gluegen.opengl.GLEmitter">
417 <classpath refid="gluegen-gl.classpath" />
418 </gluegen>
419 </target>
420
421 <target name="java.generate.gl2_es2_if">
422 <echo message="Generating GL2_ES2 interface" />
423 <antcall target="java.generate.copy2temp" inheritRefs="true" />
424 <gluegen src="${stub.includes.opengl}/gles2.c"
425 outputRootDir="${build.jogl}"
426 config="${config.jogl}/gl-if-gl2_es2.cfg"
427 includeRefid="stub.includes.fileset.all.gldesktop"
428 literalInclude="${stub.includes.gluegen.gg}"
429 emitter="com.jogamp.gluegen.opengl.GLEmitter">
430 <classpath refid="gluegen-gl.classpath" />
431 </gluegen>
432 </target>
433
434 <target name="java.generate.gl2_gl3_if">
435 <echo message="Generating GL2_GL3 interface" />
436 <antcall target="java.generate.copy2temp" inheritRefs="true" />
437 <gluegen src="${stub.includes.opengl}/gl3.c"
438 outputRootDir="${build.jogl}"
439 config="${config.jogl}/gl-if-gl3-subset.cfg"
440 includeRefid="stub.includes.fileset.all.gldesktop"
441 literalInclude="${stub.includes.gluegen.gg}"
442 emitter="com.jogamp.gluegen.opengl.GLEmitter"
443 debug="false">
444 <classpath refid="gluegen-gl.classpath" />
445 </gluegen>
446 <gluegen src="${stub.includes.opengl}/gl2.c"
447 outputRootDir="${build.jogl}"
448 config="${config.jogl}/gl-if-gl2_gl3.cfg"
449 includeRefid="stub.includes.fileset.all.gldesktop"
450 literalInclude="${stub.includes.gluegen.gg}"
451 emitter="com.jogamp.gluegen.opengl.GLEmitter">
452 <classpath refid="gluegen-gl.classpath" />
453 </gluegen>
454 </target>
455
456 <target name="java.generate.gl2">
457 <echo message="Generating GL2 interface and implementation" />
458 <antcall target="java.generate.copy2temp" inheritRefs="true" />
459 <gluegen src="${stub.includes.opengl}/gl2.c"
460 outputRootDir="${build.jogl}"
461 config="${config.jogl}/gl-if-gl2.cfg"
462 includeRefid="stub.includes.fileset.all.gldesktop"
463 literalInclude="${stub.includes.gluegen.gg}"
464 emitter="com.jogamp.gluegen.opengl.GLEmitter">
465 <classpath refid="gluegen-gl.classpath" />
466 </gluegen>
467 </target>
468
469 <target name="java.generate.gl3">
470 <echo message="Generating GL3 interface and implementation" />
471 <antcall target="java.generate.copy2temp" inheritRefs="true" />
472 <gluegen src="${stub.includes.opengl}/gl3.c"
473 outputRootDir="${build.jogl}"
474 config="${config.jogl}/gl-if-gl3.cfg"
475 includeRefid="stub.includes.fileset.all.gldesktop"
476 literalInclude="${stub.includes.gluegen.gg}"
477 emitter="com.jogamp.gluegen.opengl.GLEmitter">
478 <classpath refid="gluegen-gl.classpath" />
479 </gluegen>
480 </target>
481
482 <target name="java.generate.gl3bc">
483 <echo message="Generating GL3bc implementation" />
484 <antcall target="java.generate.copy2temp" inheritRefs="true" />
485 <gluegen src="${stub.includes.opengl}/gl3bc.c"
486 outputRootDir="${build.jogl}"
487 config="${config.jogl}/gl-if-gl3bc.cfg"
488 includeRefid="stub.includes.fileset.all.gldesktop"
489 literalInclude="${stub.includes.gluegen.gg}"
490 emitter="com.jogamp.gluegen.opengl.GLEmitter">
491 <classpath refid="gluegen-gl.classpath" />
492 </gluegen>
493 </target>
494
495 <target name="java.generate.gl4">
496 <echo message="Generating GL4 interface and implementation" />
497 <antcall target="java.generate.copy2temp" inheritRefs="true" />
498 <gluegen src="${stub.includes.opengl}/gl4.c"
499 outputRootDir="${build.jogl}"
500 config="${config.jogl}/gl-if-gl4.cfg"
501 includeRefid="stub.includes.fileset.all.gldesktop"
502 literalInclude="${stub.includes.gluegen.gg}"
503 emitter="com.jogamp.gluegen.opengl.GLEmitter">
504 <classpath refid="gluegen-gl.classpath" />
505 </gluegen>
506 </target>
507
508 <target name="java.generate.gl4bc">
509 <echo message="Generating GL4bc implementation" />
510 <antcall target="java.generate.copy2temp" inheritRefs="true" />
511 <gluegen src="${stub.includes.opengl}/gl4bc.c"
512 outputRootDir="${build.jogl}"
513 config="${config.jogl}/gl-gl4bc.cfg"
514 includeRefid="stub.includes.fileset.all.gldesktop"
515 literalInclude="${stub.includes.gluegen.gg}"
516 emitter="com.jogamp.gluegen.opengl.GLEmitter"
517 debug="false">
518 <classpath refid="gluegen-gl.classpath" />
519 </gluegen>
520 </target>
521
522 <target name="java.generate.gles1">
523 <echo message="Generating GLES1 interface and implementation" />
524 <antcall target="java.generate.copy2temp" inheritRefs="true" />
525 <gluegen src="${stub.includes.opengl}/gles1.c"
526 outputRootDir="${build.jogl}"
527 config="${config.jogl}/gl-es1.cfg"
528 includeRefid="stub.includes.fileset.all.gldesktop"
529 literalInclude="${stub.includes.gluegen.gg}"
530 emitter="com.jogamp.gluegen.opengl.GLEmitter"
531 debug="false">
532 <classpath refid="gluegen-gl.classpath" />
533 </gluegen>
534 </target>
535
536 <target name="java.generate.gles2">
537 <echo message="Generating GLES2 interface and implementation" />
538 <antcall target="java.generate.copy2temp" inheritRefs="true" />
539 <gluegen src="${stub.includes.opengl}/gles2.c"
540 outputRootDir="${build.jogl}"
541 config="${config.jogl}/gl-es2.cfg"
542 includeRefid="stub.includes.fileset.all.gldesktop"
543 literalInclude="${stub.includes.gluegen.gg}"
544 emitter="com.jogamp.gluegen.opengl.GLEmitter">
545 <classpath refid="gluegen-gl.classpath" />
546 </gluegen>
547 </target>
548
549 <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl4, java.generate.gl4bc, java.generate.gles1, java.generate.gles2"/>
550
551 <!-- target name="java.generate.gl.nsig" if="gluegen.nsig">
552 <echo message="Generating GL interface and implementation" />
553 <gluegen src="${gl.c}"
554 config="${gl.cfg.nsig}"
555 includeRefid="stub.includes.fileset.all.gldesktop"
556 literalInclude="${stub.includes.gluegen.gg}"
557 emitter="com.jogamp.gluegen.nativesig.NativeSignatureEmitter">
558 <classpath refid="gluegen-gl.classpath" />
559 </gluegen>
560 </target> -->
561
562 <target name="java.generate.glu.base">
563 <echo message="Generating GLU class" />
564 <antcall target="java.generate.copy2temp" inheritRefs="true" />
565 <gluegen src="${stub.includes.opengl}/glu.c"
566 outputRootDir="${build.jogl}"
567 config="${config.jogl}/glu-base.cfg"
568 includeRefid="stub.includes.fileset.all.gldesktop"
569 literalInclude="${stub.includes.gluegen.gg}"
570 emitter="com.jogamp.gluegen.opengl.GLEmitter">
571 <classpath refid="gluegen-gl.classpath" />
572 </gluegen>
573 </target>
574
575 <target name="java.generate.glu.GL2ES1">
576 <echo message="Generating GLU class" />
577 <antcall target="java.generate.copy2temp" inheritRefs="true" />
578 <gluegen src="${stub.includes.opengl}/glu.c"
579 outputRootDir="${build.jogl}"
580 config="${config.jogl}/glu-gl2es1.cfg"
581 includeRefid="stub.includes.fileset.all.gldesktop"
582 literalInclude="${stub.includes.gluegen.gg}"
583 emitter="com.jogamp.gluegen.opengl.GLEmitter">
584 <classpath refid="gluegen-gl.classpath" />
585 </gluegen>
586 </target>
587
588 <target name="java.generate.glu.GL2">
589 <echo message="Generating GLU class" />
590 <antcall target="java.generate.copy2temp" inheritRefs="true" />
591 <gluegen src="${stub.includes.opengl}/glu.c"
592 outputRootDir="${build.jogl}"
593 config="${config.jogl}/glu-gl2.cfg"
594 includeRefid="stub.includes.fileset.all.gldesktop"
595 literalInclude="${stub.includes.gluegen.gg}"
596 emitter="com.jogamp.gluegen.opengl.GLEmitter">
597 <classpath refid="gluegen-gl.classpath" />
598 </gluegen>
599 </target>
600
601 <target name="java.generate.platform.glext">
602 <echo message="Generating platform-specific OpenGL extension class: ${window.os.system}" />
603 <antcall target="java.generate.copy2temp" inheritRefs="true" />
604 <gluegen src="${glext.platform.header}"
605 outputRootDir="${build.jogl}"
606 config="${glext.platform.cfg}"
607 includeRefid="stub.includes.fileset.all.gldesktop"
608 literalInclude="${stub.includes.gluegen.gg}"
609 emitter="com.jogamp.gluegen.opengl.GLEmitter">
610 <classpath refid="gluegen-gl.classpath" />
611 </gluegen>
612 </target>
613
614 <target name="java.generate.window.system.es" if="window.es.cfg">
615 <echo message="Generating EGL implementation class" />
616 <antcall target="java.generate.copy2temp" inheritRefs="true" />
617 <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.es.system}/** ${stub.includes}/gluegen/** ${stub.includes}/khr/**" />
618 <gluegen src="${stub.includes}/${window.es.system}/window-system1.c"
619 outputRootDir="${build.jogl}"
620 config="${window.es.cfg}"
621 includeRefid="stub.includes.fileset.platform"
622 literalInclude="${stub.includes.gluegen.gg}"
623 emitter="com.jogamp.gluegen.opengl.GLEmitter"
624 debug="false">
625 <classpath refid="gluegen-gl.classpath" />
626 </gluegen>
627 </target>
628
629 <target name="java.generate.window.system.es.ext" if="window.es.ext.cfg">
630 <echo message="Generating EGLExt implementation class" />
631 <antcall target="java.generate.copy2temp" inheritRefs="true" />
632 <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.es.system}/** ${stub.includes}/gluegen/** ${stub.includes}/khr/**" />
633 <gluegen src="${stub.includes}/${window.es.system}/window-system-ext.c"
634 outputRootDir="${build.jogl}"
635 config="${window.es.ext.cfg}"
636 includeRefid="stub.includes.fileset.platform"
637 literalInclude="${stub.includes.gluegen.gg}"
638 emitter="com.jogamp.gluegen.opengl.GLEmitter"
639 debug="false">
640 <classpath refid="gluegen-gl.classpath" />
641 </gluegen>
642 </target>
643
644 <target name="java.generate.window.system.os0" if="window.os0.cfg">
645 <echo message="Generating window system glue impl: ${window.os.system}" />
646 <antcall target="java.generate.copy2temp" inheritRefs="true" />
647 <gluegen src="${stub.includes}/${window.os.system}/window-system0.c"
648 outputRootDir="${build.jogl}"
649 config="${window.os0.cfg}"
650 includeRefid="stub.includes.fileset.platform"
651 literalInclude="${stub.includes.gluegen.gg}"
652 emitter="com.jogamp.gluegen.opengl.GLEmitter">
653 <classpath refid="gluegen-gl.classpath" />
654 </gluegen>
655 </target>
656
657 <target name="java.generate.window.system.os1" if="window.os1.cfg">
658 <echo message="Generating window system glue impl: ${window.os.system}" />
659 <antcall target="java.generate.copy2temp" inheritRefs="true" />
660 <gluegen src="${stub.includes}/${window.os.system}/window-system1.c"
661 outputRootDir="${build.jogl}"
662 config="${window.os1.cfg}"
663 includeRefid="stub.includes.fileset.platform"
664 literalInclude="${stub.includes.gluegen.gg}"
665 emitter="com.jogamp.gluegen.opengl.GLEmitter">
666 <classpath refid="gluegen-gl.classpath" />
667 </gluegen>
668 </target>
669
670 <target name="java.generate.gl.platforms" >
671 <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.os.system}/** ${stub.includes}/${window.es.system}/** ${stub.includes}/gluegen/** ${stub.includes}/khr/** ${stub.includes}/opengl/**" />
672
673 <antcall target="java.generate.window.system.os0" inheritRefs="true" />
674 <antcall target="java.generate.window.system.os1" inheritRefs="true" />
675 <antcall target="java.generate.platform.glext" inheritRefs="true" />
676 </target>
677
678 <!--
679 - Setup the generating ANT tasks and use it to generate the Java files
680 - from the C GL headers. This involves setting the taskdef and creating
681 - the classpath reference id then running the task on each header.
682 -->
683 <target name="build.gluegen-gl.jar" depends="init, common.gluegen.build, setup-manifestfile">
684 <javac destdir="${classes}"
685 includes="${java.part.gluegen-gl}"
686 fork="yes"
687 memoryMaximumSize="${javac.memorymax}"
688 includeAntRuntime="true"
689 source="${target.sourcelevel}" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
690 <classpath refid="gluegen-gl.classpath"/>
691 <src path="${src.java}" />
692 </javac>
693
694 <jar manifest="${build.jogl}/manifest.mf" destfile="${gluegen-gl.jar}" filesonly="true">
695 <fileset dir="${classes}"
696 includes="${java.part.gluegen-gl}"/>
697 </jar>
698 </target>
699
700 <target name="java.generate" depends="build.gluegen-gl.jar, java.generate.check" unless="java.generate.skip">
701
702 <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT -->
703 <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
704 classpathref="gluegen.classpath" />
705 <taskdef name="staticglgen" classname="com.jogamp.gluegen.opengl.ant.StaticGLGenTask"
706 classpathref="gluegen-gl.classpath" />
707
708 <!-- Use the GlueGen and BuildStaticGLInfo tasks to generate the Java files -->
709
710 <!-- Just to have a fast test of single interfaces ..
711 <antcall target="java.generate.gl_if" inheritRefs="true" />
712 <antcall target="java.generate.gl2_es1_if" inheritRefs="true" />
713 <antcall target="java.generate.gl2_es2_if" inheritRefs="true" />
714 <antcall target="java.generate.gl2_gl3_if" inheritRefs="true" />
715 <antcall target="java.generate.gles1" inheritRefs="true"/>
716 <antcall target="java.generate.window.system.es" inheritRefs="true" />
717 <antcall target="java.generate.window.system.es.ext" inheritRefs="true" />
718 <antcall target="java.generate.gl4bc" inheritRefs="true"/>
719 <fail/> -->
720
721 <echo message="Generating GL interface and implementation" />
722 <antcall target="java.generate.gl.all" inheritRefs="true" />
723 <!--antcall target="java.generate.gl.nsig" inheritRefs="true" /-->
724
725 <antcall target="java.generate.window.system.es" inheritRefs="true" />
726 <antcall target="java.generate.window.system.es.ext" inheritRefs="true" />
727
728 <antcall target="java.generate.gl.platforms" inheritRefs="true">
729 <param name="window.os.system" value="x11"/>
730 <param name="window.os1.cfg" value="${config.jogl}/glx-x11.cfg" />
731 <param name="glext.platform.cfg" value="${config.jogl}/glxext.cfg" />
732 <param name="glext.platform.header" value="${stub.includes}/x11/glxext.c" />
733 </antcall>
734
735 <antcall target="java.generate.gl.platforms" inheritRefs="true">
736 <param name="window.os.system" value="win32"/>
737 <param name="window.os1.cfg" value="${config.jogl}/wgl-win32.cfg" />
738 <param name="glext.platform.cfg" value="${config.jogl}/wglext.cfg" />
739 <param name="glext.platform.header" value="${stub.includes}/win32/wglext.c" />
740 </antcall>
741
742 <antcall target="java.generate.gl.platforms" inheritRefs="true">
743 <param name="window.os.system" value="macosx"/>
744 <param name="window.os1.cfg" value="${config.jogl}/cgl-macosx.cfg" />
745 <param name="glext.platform.cfg" value="${config.jogl}/cglext.cfg" />
746 <param name="glext.platform.header" value="${stub.includes}/macosx/cglext.c" />
747 </antcall>
748
749 <!-- Generate GLU class -->
750 <antcall target="java.generate.glu.base" inheritrefs="true" />
751 <antcall target="java.generate.glu.GL2ES1" inheritrefs="true" />
752 <antcall target="java.generate.glu.GL2" inheritrefs="true" />
753
754 <!-- Inform the user that the generators have successfully created
755 - the necessary Java files -->
756 <echo message="" />
757 <echo message="GlueGen and BuildStaticGLInfo have successfully generated files." />
758
759 </target>
760
761 <target name="java.generate.cg.check">
762 <!-- Blow away all target files if any dependencies are violated
763 (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
764 <dependset>
765 <srcfileset refid="stub.includes.cg.dependencies.fileset" />
766 <targetfileset dir=".">
767 <include name="${src.generated.java.cg}/**/*.java" />
768 <include name="${src.generated.c.cg}/**/*.c" />
769 </targetfileset>
770 </dependset>
771
772 <!-- Now check for the presence of one well-known file -->
773 <uptodate property="java.generate.cg.skip">
774 <srcfiles refid="stub.includes.cg.dependencies.fileset" />
775 <mapper type="merge" to="${src.generated.java}/com/jogamp/opengl/cg/CgGL.java" />
776 </uptodate>
777 </target>
778
779 <!--
780 - Setup the generating ANT tasks and use it to generate the Java files
781 - from the C GL headers. This involves setting the taskdef and creating
782 - the classpath reference id then running the task on each header.
783 -->
784 <target name="java.generate.cg" depends="build.gluegen-gl.jar,java.generate.cg.check" unless="java.generate.cg.skip">
785 <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT -->
786 <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
787 classpathref="gluegen.classpath" />
788 <taskdef name="staticglgen" classname="com.jogamp.gluegen.opengl.ant.StaticGLGenTask"
789 classpathref="gluegen-gl.classpath" />
790
791 <!-- Generate CgGL interface class -->
792 <gluegen src="${stub.includes.opengl}/cg.c"
793 outputRootDir="${build.jogl}"
794 config="${config.jogl}/cg-common.cfg"
795 includeRefid="stub.includes.cg.fileset.all"
796 literalInclude="${stub.includes.gluegen.gg}"
797 emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter">
798 <classpath refid="gluegen-gl.classpath" />
799 </gluegen>
800 </target>
801
802 <!-- ================================================================== -->
803 <!--
804 - Build and dependency rules for the composable pipeline
805 -->
806 <target name="java.generate.composable.pipeline.check.es1">
807 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
808 (the uptodate element doesn't support arbitrary source and destination files) -->
809 <dependset>
810 <srcfilelist dir="${classes}/javax/media/opengl" files="GLES1.class" />
811 <targetfileset dir="${src.generated.java}/javax/media/opengl"
812 includes="DebugGLES1.java,TraceGLES1.java" />
813 </dependset>
814
815 <!-- Now choose one of the two to test to see if we have to regenerate -->
816 <uptodate property="java.generate.composable.pipeline.skip.es1"
817 srcfile="${classes}/javax/media/opengl/GLES1.class"
818 targetfile="${src.generated.java}/javax/media/opengl/DebugGLES1.java" />
819
820 </target>
821
822 <target name="java.generate.composable.pipeline.check.es2">
823 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
824 (the uptodate element doesn't support arbitrary source and destination files) -->
825 <dependset>
826 <srcfilelist dir="${classes}/javax/media/opengl" files="GLES2.class" />
827 <targetfileset dir="${src.generated.java}/javax/media/opengl"
828 includes="DebugGLES2.java,TraceGLES2.java" />
829 </dependset>
830
831 <!-- Now choose one of the two to test to see if we have to regenerate -->
832 <uptodate property="java.generate.composable.pipeline.skip.es2"
833 srcfile="${classes}/javax/media/opengl/GLES2.class"
834 targetfile="${src.generated.java}/javax/media/opengl/DebugGLES2.java" />
835
836 </target>
837
838 <target name="java.generate.composable.pipeline.check.gl2">
839 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
840 (the uptodate element doesn't support arbitrary source and destination files) -->
841 <dependset>
842 <srcfilelist dir="${classes}/javax/media/opengl" files="GL2.class" />
843 <targetfileset dir="${src.generated.java}/javax/media/opengl"
844 includes="DebugGL2.java,TraceGL2.java" />
845 </dependset>
846
847 <!-- Now choose one of the two to test to see if we have to regenerate -->
848 <uptodate property="java.generate.composable.pipeline.skip.gl2"
849 srcfile="${classes}/javax/media/opengl/GL2.class"
850 targetfile="${src.generated.java}/javax/media/opengl/DebugGL2.java" />
851 </target>
852
853 <target name="java.generate.composable.pipeline.check.gl3">
854 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
855 (the uptodate element doesn't support arbitrary source and destination files) -->
856 <dependset>
857 <srcfilelist dir="${classes}/javax/media/opengl" files="GL3.class" />
858 <targetfileset dir="${src.generated.java}/javax/media/opengl"
859 includes="DebugGL3.java,TraceGL3.java,DebugGL3bc.java,TraceGL3bc.java" />
860 </dependset>
861
862 <!-- Now choose one of the two to test to see if we have to regenerate -->
863 <uptodate property="java.generate.composable.pipeline.skip.gl3"
864 srcfile="${classes}/javax/media/opengl/GL3.class"
865 targetfile="${src.generated.java}/javax/media/opengl/DebugGL3.java" />
866 </target>
867
868 <target name="java.generate.composable.pipeline.check.gl4">
869 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
870 (the uptodate element doesn't support arbitrary source and destination files) -->
871 <dependset>
872 <srcfilelist dir="${classes}/javax/media/opengl" files="GL4.class" />
873 <targetfileset dir="${src.generated.java}/javax/media/opengl"
874 includes="DebugGL4.java,TraceGL4.java,DebugGL4bc.java,TraceGL4bc.java" />
875 </dependset>
876
877 <!-- Now choose one of the two to test to see if we have to regenerate -->
878 <uptodate property="java.generate.composable.pipeline.skip.gl4"
879 srcfile="${classes}/javax/media/opengl/GL4.class"
880 targetfile="${src.generated.java}/javax/media/opengl/DebugGL4.java" />
881 </target>
882
883 <target name="java.generate.composable.pipeline.es1" depends="java.generate.composable.pipeline.check.es1" unless="java.generate.composable.pipeline.skip.es1">
884 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
885 <arg value="javax.media.opengl.GLES1" />
886 <arg value="${src.generated.java}/javax/media/opengl" />
887 <classpath refid="pipeline.classpath" />
888 </java>
889 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
890 <arg value="javax.media.opengl.GL2ES1" />
891 <arg value="${src.generated.java}/javax/media/opengl" />
892 <classpath refid="pipeline.classpath" />
893 </java>
894 </target>
895
896 <target name="java.generate.composable.pipeline.es2" depends="java.generate.composable.pipeline.check.es2" unless="java.generate.composable.pipeline.skip.es2">
897 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
898 <arg value="javax.media.opengl.GLES2" />
899 <arg value="${src.generated.java}/javax/media/opengl" />
900 <classpath refid="pipeline.classpath" />
901 </java>
902 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
903 <arg value="javax.media.opengl.GL2ES2" />
904 <arg value="${src.generated.java}/javax/media/opengl" />
905 <classpath refid="pipeline.classpath" />
906 </java>
907 </target>
908
909 <target name="java.generate.composable.pipeline.gl2" depends="java.generate.composable.pipeline.check.gl2" unless="java.generate.composable.pipeline.skip.gl2">
910 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
911 <arg value="javax.media.opengl.GL2" />
912 <arg value="${src.generated.java}/javax/media/opengl" />
913 <classpath refid="pipeline.classpath" />
914 </java>
915 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
916 <arg value="javax.media.opengl.GL2GL3" />
917 <arg value="${src.generated.java}/javax/media/opengl" />
918 <classpath refid="pipeline.classpath" />
919 </java>
920 </target>
921
922 <target name="java.generate.composable.pipeline.gl3" depends="java.generate.composable.pipeline.check.gl3" unless="java.generate.composable.pipeline.skip.gl3">
923 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
924 <arg value="javax.media.opengl.GL3" />
925 <arg value="${src.generated.java}/javax/media/opengl" />
926 <classpath refid="pipeline.classpath" />
927 </java>
928
929 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
930 <arg value="javax.media.opengl.GL3bc" />
931 <arg value="${src.generated.java}/javax/media/opengl" />
932 <classpath refid="pipeline.classpath" />
933 </java>
934 </target>
935
936 <target name="java.generate.composable.pipeline.gl4" depends="java.generate.composable.pipeline.check.gl4" unless="java.generate.composable.pipeline.skip.gl4">
937 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
938 <arg value="javax.media.opengl.GL4" />
939 <arg value="${src.generated.java}/javax/media/opengl" />
940 <classpath refid="pipeline.classpath" />
941 </java>
942
943 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
944 <arg value="javax.media.opengl.GL4bc" />
945 <arg value="${src.generated.java}/javax/media/opengl" />
946 <classpath refid="pipeline.classpath" />
947 </java>
948 </target>
949
950 <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3, java.generate.composable.pipeline.gl4">
951 </target>
952
953 <target name="java.generate.composable.pipeline.custom.check.glfixfunc">
954 <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
955 (the uptodate element doesn't support arbitrary source and destination files) -->
956 <dependset>
957 <srcfilelist dir="${classes}/jogamp/opengl/util/glsl/fixedfunc" files="FixedFuncHook.class" />
958 <srcfilelist dir="${classes}/javax/media/opengl" files="GL2ES1.class" />
959 <srcfilelist dir="${classes}/javax/media/opengl" files="GL2ES2.class" />
960 <targetfileset dir="${src.generated.java}/jogamp/opengl/util/glsl/fixedfunc"
961 includes="FixedFuncImpl.java" />
962 </dependset>
963
964 <!-- Now choose one of the two to test to see if we have to regenerate -->
965 <uptodate property="java.generate.composable.pipeline.custom.skip.glfixfunc"
966 srcfile="${classes}/javax/media/opengl/GL2ES1.class"
967 targetfile="${src.generated.java}/jogamp/opengl/util/glsl/fixedfunc/FixedFuncImpl.java" />
968 </target>
969 <target name="java.generate.composable.pipeline.custom.glfixfunc" depends="java.generate.composable.pipeline.custom.check.glfixfunc" unless="java.generate.composable.pipeline.custom.skip.glfixfunc">
970 <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
971 <arg value="javax.media.opengl.GL2ES1" />
972 <arg value="${src.generated.java}/jogamp/opengl/util/glsl/fixedfunc" />
973 <arg value="jogamp.opengl.util.glsl.fixedfunc.FixedFuncImpl" />
974 <arg value="jogamp.opengl.util.glsl.fixedfunc.FixedFuncHook" />
975 <arg value="javax.media.opengl.GL2ES2" />
976 <arg value="prolog_xor_downstream" />
977 <classpath refid="pipeline.classpath" />
978 </java>
979 </target>
980 <target name="java.generate.composable.pipeline.custom" depends="init, common.gluegen.build, java.generate.composable.pipeline.custom.glfixfunc">
981 </target>
982
983 <!-- ================================================================== -->
984 <!--
985 - Compile the original and generated source. The composable pipelines
986 - will be generated.
987 -->
988 <target name="java.compile.firstpass" depends="java.generate,java.generate.cg">
989 <antcall target="java.generate.cleantemp" inheritRefs="true" />
990
991 <!-- Perform the first pass Java compile. -->
992 <javac destdir="${classes}"
993 includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java javax/media/opengl/GL4.java javax/media/opengl/GL4bc.java"
994 fork="yes"
995 memoryMaximumSize="${javac.memorymax}"
996 includeAntRuntime="false"
997 source="${target.sourcelevel}" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
998 <classpath refid="nativewindow_gluegen.classpath"/>
999 <src path="${src.java}" />
1000 <src path="${src.generated.java}" />
1001 </javac>
1002 </target>
1003
1004 <target name="java.compile.secondpass.javase">
1005 <!-- Perform the second pass Java compile; everything except portion of fixed function emulation depending on generated code. -->
1006 <javac destdir="${classes}"
1007 excludes="com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java,${java.excludes.all}"
1008 source="${target.sourcelevel}"
1009 fork="yes"
1010 memoryMaximumSize="${javac.memorymax}"
1011 includeAntRuntime="false"
1012 debug="${javacdebug}" debuglevel="${javacdebuglevel}">
1013 <classpath refid="nativewindow_gluegen.classpath"/>
1014 <src path="${src.java}" />
1015 <src path="${src.generated.java}" />
1016 </javac>
1017 </target>
1018
1019 <target name="java.compile.secondpass" depends="java.generate.composable.pipeline, java.compile.secondpass.javase" />
1020
1021 <target name="java.compile.thirdpass.javase">
1022 <!-- Perform the third pass Java compile; everything including fixed function emulation. -->
1023 <javac destdir="${classes}"
1024 excludes="${java.excludes.all}"
1025 source="${target.sourcelevel}"
1026 fork="yes"
1027 memoryMaximumSize="${javac.memorymax}"
1028 includeAntRuntime="false"
1029 debug="${javacdebug}" debuglevel="${javacdebuglevel}">
1030 <classpath refid="nativewindow_gluegen.classpath"/>
1031 <src path="${src.java}" />
1032 <src path="${src.generated.java}" />
1033 </javac>
1034 </target>
1035
1036 <target name="java.compile.thirdpass" depends="java.generate.composable.pipeline.custom, java.compile.thirdpass.javase" />
1037
1038 <target name="java.compile" depends="java.compile.firstpass,java.compile.secondpass,java.compile.thirdpass">
1039 <!-- make shadercode and fonts available in classpath -->
1040 <copy todir="${classes}">
1041 <fileset dir="${src.java}"
1042 includes="${java.part.nonjava}"
1043 excludes="**/*.java"/>
1044 </copy>
1045 </target>
1046
1047 <!-- ================================================================== -->
1048 <!--
1049 - Compile the native C code for JOGL (and optionally the Cg binding).
1050 -->
1051
1052 <target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
1053 <!-- compiler configuration -->
1054 <!-- Note that we can use the base setups in the gluegen-cpptasks for most of these -->
1055
1056 <compiler id="compiler.cfg.freebsd.jogl" extends="compiler.cfg.freebsd">
1057 <!-- Need to force X11R6 headers on to include path after stub_includes -->
1058 <includepath path="stub_includes/opengl"/>
1059 <includepath path="/usr/local/include" />
1060 </compiler>
1061
1062 <compiler id="compiler.cfg.linux.armv7.jogl.x11" extends="compiler.cfg.linux.armv7">
1063 <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
1064 <compilerarg value="-idirafter" />
1065 <compilerarg value="/usr/include" />
1066 </compiler>
1067
1068 <!-- linker configuration -->
1069
1070 <linker id="linker.cfg.freebsd.jogl.x11" extends="linker.cfg.freebsd">
1071 <syslibset dir="/usr/local/lib" libs="X11"/>
1072 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
1073 </linker>
1074
1075 <linker id="linker.cfg.freebsd.amd64.jogl.x11" extends="linker.cfg.freebsd.amd64">
1076 <syslibset dir="/usr/local/lib" libs="X11"/>
1077 <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
1078 </linker>
1079
1080 <linker id="linker.cfg.linux.jogl.x11" extends="linker.cfg.linux">
1081 <syslibset libs="X11"/>
1082 <syslibset libs="Xxf86vm" />
1083 </linker>
1084
1085 <linker id="linker.cfg.linux.x86.jogl.x11" extends="linker.cfg.linux.x86">
1086 <syslibset libs="X11"/>
1087 <syslibset libs="Xxf86vm" />
1088 </linker>
1089
1090 <linker id="linker.cfg.linux.amd64.jogl.x11" extends="linker.cfg.linux.amd64">
1091 <syslibset libs="X11"/>
1092 <syslibset libs="Xxf86vm" />
1093 </linker>
1094
1095 <linker id="linker.cfg.linux.armv7.jogl.x11" extends="linker.cfg.linux.armv7">
1096 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11"/>
1097 <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
1098 </linker>
1099
1100 <linker id="linker.cfg.android.jogl" extends="linker.cfg.android">
1101 </linker>
1102
1103 <linker id="linker.cfg.solaris.jogl.x11" extends="linker.cfg.solaris">
1104 <syslibset libs="X11"/>
1105 </linker>
1106
1107 <linker id="linker.cfg.solaris.sparcv9.jogl.x11" extends="linker.cfg.solaris.sparcv9">
1108 <linkerarg value="-xarch=v9a" />
1109 <syslibset dir="/usr/lib/sparcv9" libs="X11"/>
1110 </linker>
1111
1112 <linker id="linker.cfg.solaris.amd64.jogl.x11" extends="linker.cfg.solaris.amd64">
1113 <linkerarg value="-xarch=amd64" />
1114 <syslibset dir="/usr/lib/amd64" libs="X11"/>
1115 </linker>
1116
1117 <linker id="linker.cfg.win32.mingw.jogl" extends="linker.cfg.win32.mingw">
1118 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
1119 <syslibset libs="gdi32, kernel32"/>
1120 </linker>
1121
1122 <linker id="linker.cfg.win64.mingw.jogl" extends="linker.cfg.win64.mingw">
1123 <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
1124 <syslibset libs="gdi32, kernel32"/>
1125 </linker>
1126
1127 <linker id="linker.cfg.win32.msvc.jogl" extends="linker.cfg.win32.msvc">
1128 <syslibset libs="user32, kernel32" />
1129 <!-- This is temporary -->
1130 <syslibset libs="winmm" />
1131 </linker>
1132
1133 <linker id="linker.cfg.macosx.jogl" extends="linker.cfg.macosx">
1134 <linkerarg value="-framework" />
1135 <linkerarg value="Cocoa" />
1136 <linkerarg value="-framework" />
1137 <linkerarg value="OpenGL" />
1138 </linker>
1139
1140 <!--linker id="linker.cfg.macosx.jogl.cg" extends="linker.cfg.macosx.jogl">
1141 <linkerarg value="-framework"/>
1142 <linkerarg value="Cg"/>
1143 </linker-->
1144
1145 <linker id="linker.cfg.hpux.jogl" extends="linker.cfg.hpux">
1146 <syslibset dir="/opt/graphics/OpenGL/lib" libs="GL, GLU"/>
1147 <syslibset dir="/usr/lib" libs="X11"/>
1148 </linker>
1149 </target>
1150
1151 <target name="c.configure.win32.vc" if="isVCFamily">
1152 <echo message="Win32.VC" />
1153 <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" />
1154 <property name="linker.cfg.id.os" value="linker.cfg.win32.msvc.jogl" />
1155 </target>
1156
1157 <target name="c.configure.win32.mingw" if="isMingW32">
1158 <echo message="Win32.MingW" />
1159 <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" />
1160 <property name="linker.cfg.id.os" value="linker.cfg.win32.mingw.jogl" />
1161 </target>
1162
1163 <target name="c.configure.win64.mingw" if="isMingW64">
1164 <echo message="Win64.MingW" />
1165 <property name="compiler.cfg.id" value="compiler.cfg.win64.mingw" />
1166 <property name="linker.cfg.id.os" value="linker.cfg.win64.mingw.jogl" />
1167 </target>
1168
1169 <target name="c.configure.linux.x86" if="isLinuxX86">
1170 <echo message="Linux.x86" />
1171 <property name="compiler.cfg.id" value="compiler.cfg.linux.x86" />
1172 <property name="linker.cfg.id.os" value="linker.cfg.linux.x86.jogl.x11" />
1173 </target>
1174
1175 <target name="c.configure.linux.amd64" if="isLinuxAMD64">
1176 <echo message="Linux.AMD64" />
1177 <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" />
1178 <property name="linker.cfg.id.os" value="linker.cfg.linux.amd64.jogl.x11" />
1179 </target>
1180
1181 <target name="c.configure.linux.armv7" if="isLinuxARMv7">
1182 <echo message="Linux.armv7" />
1183 <property name="compiler.cfg.id" value="compiler.cfg.linux.armv7.jogl.x11" />
1184 <property name="linker.cfg.id.os" value="linker.cfg.linux.armv7.jogl.x11" />
1185 </target>
1186
1187 <target name="c.configure.linux.ia64" if="isLinuxIA64">
1188 <echo message="Linux.IA64" />
1189 <property name="compiler.cfg.id" value="compiler.cfg.linux" />
1190 <property name="linker.cfg.id.os" value="linker.cfg.linux.jogl.x11" />
1191 </target>
1192
1193 <target name="c.configure.linux" depends="c.configure.linux.armv7,c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
1194
1195 <target name="c.configure.android" if="isAndroid">
1196 <echo message="Android" />
1197 <property name="compiler.cfg.id" value="compiler.cfg.android" />
1198 <property name="linker.cfg.id.os" value="linker.cfg.android.jogl" />
1199 </target>
1200
1201 <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
1202 <echo message="Solaris" />
1203 <property name="compiler.cfg.id" value="compiler.cfg.solaris" />
1204 <property name="linker.cfg.id.os" value="linker.cfg.solaris.jogl.x11" />
1205 </target>
1206
1207
1208 <target name="c.configure.solaris.sparcv9" depends="c.configure.x11" if="isSolarisSparcv9">
1209 <echo message="SolarisSparcv9" />
1210 <property name="compiler.cfg.id" value="compiler.cfg.solaris.sparcv9" />
1211 <property name="linker.cfg.id.os" value="linker.cfg.solaris.sparcv9.jogl.x11" />
1212 </target>
1213
1214
1215 <target name="c.configure.solaris.amd64" depends="c.configure.x11" if="isSolarisAMD64">
1216 <echo message="SolarisAMD64" />
1217 <property name="compiler.cfg.id" value="compiler.cfg.solaris.amd64" />
1218 <property name="linker.cfg.id.os" value="linker.cfg.solaris.amd64.jogl.x11" />
1219 </target>
1220
1221 <target name="c.configure.freebsd.x86" depends="c.configure.x11" if="isFreeBSDX86">
1222 <echo message="FreeBSD" />
1223 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.jogl" />
1224 <property name="linker.cfg.id.os" value="linker.cfg.freebsd.jogl.x11" />
1225 </target>
1226
1227 <target name="c.configure.freebsd.amd64" depends="c.configure.x11" if="isFreeBSDAMD64">
1228 <echo message="FreeBSD" />
1229 <property name="compiler.cfg.id" value="compiler.cfg.freebsd.jogl" />
1230 <property name="linker.cfg.id.os" value="linker.cfg.freebsd.amd64.jogl.x11" />
1231 </target>
1232
1233 <target name="c.configure.freebsd" depends="c.configure.freebsd.x86,c.configure.freebsd.amd64,c.configure.x11" if="isFreeBSD" />
1234
1235 <target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
1236 <echo message="HP-UX" />
1237 <property name="compiler.cfg.id" value="compiler.cfg.hpux" />
1238 <property name="linker.cfg.id.os" value="linker.cfg.hpux.jogl.x11" />
1239 </target>
1240
1241 <target name="c.configure.win32" depends="c.configure.win32.vc,c.configure.win32.mingw,c.configure.win64.mingw" if="isWindows" />
1242
1243 <target name="c.configure.x11" if="isX11" />
1244
1245 <target name="c.configure.macosx" if="isOSX">
1246 <property name="compiler.cfg.id" value="compiler.cfg.macosx" />
1247 <property name="linker.cfg.id.os" value="linker.cfg.macosx.jogl" />
1248 </target>
1249
1250 <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
1251
1252 <target name="c.configure" depends="c.configure.1,c.configure.2" />
1253
1254 <target name="rename.mingw.dll" if="isMingW">
1255 <move file="${src}" tofile="${dest}" />
1256 </target>
1257
1258 <target name="rename.dylib" if="isOSX">
1259 <move file="${src}" tofile="${dest}" />
1260 </target>
1261
1262 <macrodef name="c.build">
1263 <attribute name="c.compiler.src.files" />
1264 <attribute name="compiler.cfg.id" />
1265 <attribute name="linker.cfg.id" />
1266 <attribute name="output.lib.name" />
1267 <attribute name="c.compiler.use-jawt" default="false"/>
1268 <sequential>
1269 <echo message="Output lib name = @{output.lib.name}" />
1270
1271 <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
1272 <property name="c.compiler.debug" value="false" />
1273 <!-- Optimise flags one of { none, size, speed, minimal, full, aggressive, extreme, unsafe } -->
1274 <property name="c.compiler.optimise" value="none" />
1275
1276 <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
1277
1278 <patternset id="c.src.files.jogl.desktop">
1279 <include name="${rootrel.src.c}/JoglCommon.c"/>
1280 <include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
1281 <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
1282 <include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
1283 <include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
1284 <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
1285 <!-- FIXME: the Mixer should be moved to another library -->
1286 <!--include name="${rootrel.src.c}/Mixer.cpp" if="isWindows"/-->
1287 <include name="${rootrel.src.c.openmax}/omx_tool.c" if="setup.addNativeOpenMAX"/>
1288 <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="setup.addNativeOpenMAX"/>
1289
1290 <include name="${rootrel.generated.c.jogl}/gl4/GL4bcImpl_JNI.c"/>
1291 <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
1292 <include name="${rootrel.generated.c.jogl}/gl2/GLUgl2_JNI.c"/>
1293 <include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
1294 <include name="${rootrel.generated.c.jogl}/MacOSX/CGL*.c" if="isOSX"/>
1295 <include name="${rootrel.generated.c.jogl}/Windows/GDI*.c" if="isWindows"/>
1296 <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
1297 </patternset>
1298
1299 <patternset id="c.src.files.jogl.mobile">
1300 <include name="${rootrel.src.c}/JoglCommon.c"/>
1301 <include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
1302 <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
1303 <include name="${rootrel.src.c.openmax}/omx_tool.c" if="setup.addNativeOpenMAX"/>
1304 <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="setup.addNativeOpenMAX"/>
1305
1306 <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/>
1307 <include name="${rootrel.generated.c.jogl}/egl/EGLExtImpl_JNI.c"/>
1308 <include name="${rootrel.generated.c.jogl}/es2/GLES2Impl_JNI.c"/>
1309 <include name="${rootrel.generated.c.jogl}/es1/GLES1Impl_JNI.c"/>
1310 <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
1311 <!--include name="${rootrel.generated.c.jogl}/es1/GLUes1_JNI.c" EMPTY /-->
1312 </patternset>
1313
1314 <patternset id="c.src.files.cg">
1315 <include name="${rootrel.generated.c.cg}/*.c"/>
1316 </patternset>
1317
1318 <echo message="Compiling @{output.lib.name}" />
1319
1320 <!-- have to wrap cc task with outofdate, because otherwise cc links a new library
1321 even when no files have been compiled -->
1322 <outofdate>
1323 <sourcefiles>
1324 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
1325 </sourcefiles>
1326 <targetfiles>
1327 <fileset dir="${obj.jogl}" includes="lib@{output.lib.name}.so"/>
1328 <fileset dir="${obj.jogl}" includes="@{output.lib.name}.dll"/>
1329 <fileset dir="${obj.jogl}" includes="lib@{output.lib.name}.jnilib"/>
1330 </targetfiles>
1331 <sequential>
1332 <cc outtype="shared"
1333 objdir="${obj.joglsub}"
1334 outfile="${obj.jogl}/@{output.lib.name}"
1335 optimize="${c.compiler.optimise}"
1336 debug="${c.compiler.debug}"
1337 multithreaded="true"
1338 exceptions="false"
1339 rtti="false">
1340
1341 <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
1342
1343 <compiler extends="@{compiler.cfg.id}" >
1344 <sysincludepath path="${java.includes.dir}"/>
1345 <sysincludepath path="${java.includes.dir.platform}"/>
1346 <sysincludepath path="${stub.includes.gluegen.cc}"/>
1347 <includepath path="stub_includes/khr"/>
1348 <includepath path="stub_includes/egl"/>
1349 <includepath path="stub_includes/opengl"/>
1350 <includepath path="stub_includes/openmax" if="setup.addNativeOpenMAX"/>
1351 <includepath path="stub_includes/cg" if="setup.addNativeNVidiaCG"/>
1352
1353 <!-- This is for the generated headers for handwritten C code -->
1354 <includepath path="${src.generated.c}" />
1355 <includepath path="${src.generated.c}/X11" if="isX11"/>
1356 <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
1357 <includepath path="${src.generated.c}/Windows" if="isWindows"/>
1358 <includepath path="${src.generated.c.openmax}" if="setup.addNativeOpenMAX"/>
1359
1360 <!-- This must come last to not override real include paths -->
1361 <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
1362 </compiler>
1363
1364 <linker extends="@{linker.cfg.id}">
1365 <syslibset dir="${java.lib.platform}" libs="jawt" if="@{output.lib.name}.useLibJAWT"/>
1366 <syslibset dir="${java.lib.platform}/server" libs="jvm" if="@{output.lib.name}.useLibJVM"/>
1367 </linker>
1368 </cc>
1369
1370 <!-- FIXME: this is a hack; the cpptask should have an option to change the
1371 suffix or at least understand the override from dylib to jnilib -->
1372 <antcall target="rename.dylib" inheritRefs="true">
1373 <param name="src" value="${obj.jogl}/lib@{output.lib.name}.dylib" />
1374 <param name="dest" value="${obj.jogl}/lib@{output.lib.name}.jnilib" />
1375 </antcall>
1376
1377 <!-- FIXME: this is a hack; the cpptask should have an option to change the
1378 suffix or at least understand the override from dylib to jnilib -->
1379 <antcall target="rename.mingw.dll" inheritRefs="true">
1380 <param name="src" value="${obj.jogl}/lib@{output.lib.name}.so" />
1381 <param name="dest" value="${obj.jogl}/@{output.lib.name}.dll" />
1382 </antcall>
1383
1384 <!-- this stripping may be called more than once on the same library dir,
1385 but that should cause no harm, and doing it here inside outofdate
1386 prevents the JARs from always being rebuilt even if no source code changes -->
1387 <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
1388 <param name="libdir" value="${obj.jogl}"/>
1389 </antcall>
1390
1391 </sequential>
1392 </outofdate>
1393 </sequential>
1394 </macrodef>
1395
1396 <target name="c.build.jogl.prepare.openMAX" if="setup.addNativeOpenMAX">
1397 <javah destdir="${src.generated.c.openmax}" classpath="${javah.classpath}" class="com.jogamp.openmax.OMXInstance" />
1398 </target>
1399
1400 <target name="c.build.jogl.prepare" depends="c.build.jogl.prepare.openMAX">
1401 <javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="jogamp.opengl.GLDebugMessageHandler" />
1402 <!-- Generate the waveout Mixer header -->
1403 <!-- FIXME: this is temporary until we move this to another workspace -->
1404 <!--javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="com.jogamp.audio.windows.waveout.Mixer" /-->
1405 </target>
1406
1407 <target name="c.build.jogl.desktop" unless="setup.noNativeDesktop">
1408 <c.build c.compiler.src.files="c.src.files.jogl.desktop"
1409 output.lib.name="jogl_desktop"
1410 compiler.cfg.id="${compiler.cfg.id}"
1411 linker.cfg.id="${linker.cfg.id.os}"/>
1412 </target>
1413
1414 <target name="c.build.jogl.mobile">
1415 <c.build c.compiler.src.files="c.src.files.jogl.mobile"
1416 output.lib.name="jogl_mobile"
1417 compiler.cfg.id="${compiler.cfg.id}"
1418 linker.cfg.id="${linker.cfg.id.os}"/>
1419 </target>
1420
1421 <target name="c.build.jogl.cg" if="setup.addNativeNVidiaCG">
1422 <c.build c.compiler.src.files="c.src.files.cg"
1423 output.lib.name="jogl_cg"
1424 compiler.cfg.id="${compiler.cfg.id}"
1425 linker.cfg.id="${linker.cfg.id.os}"/>
1426 </target>
1427
1428 <target name="c.manifest.cg" if="setup.addNativeNVidiaCG">
1429 <msvc.manifest objdir="${obj.jogl}" dllname="jogl_cg" />
1430 </target>
1431
1432 <target name="c.manifest" if="isVC8Family">
1433 <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
1434 <msvc.manifest objdir="${obj.jogl}" dllname="jogl_es1" />
1435 <msvc.manifest objdir="${obj.jogl}" dllname="jogl_es2" />
1436 <msvc.manifest objdir="${obj.jogl}" dllname="jogl_desktop" />
1437 <antcall target="c.manifest.cg" inheritRefs="true" />
1438 </target>
1439
1440 <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.desktop,c.build.jogl.mobile,c.build.jogl.cg">
1441 <antcall target="c.manifest" inheritRefs="true" />
1442 </target>
1443
1444 <!-- ================================================================== -->
1445 <!--
1446 - Build the jogl.jar files.
1447 -->
1448 <target name="build-jars-dependset" depends="init,gluegen.cpptasks.detect.os" >
1449 <dependset>
1450 <srcfileset dir="${src.java}"
1451 includes="${java.part.nonjava}"/>
1452 <targetfileset dir="."
1453 includes="${jogl.util.jar} ${jogl.util.fixedfuncemu.jar}" />
1454 </dependset>
1455 </target>
1456 <target name="build-jars" depends="build-jars-dependset,build-jars-javase" />
1457
1458 <target name="setup-manifestfile" depends="common.init">
1459 <property name="manifestfile" value="joglversion"/>
1460 <copy file="${manifestfile}"
1461 tofile="${build.jogl}/manifest.mf"
1462 overwrite="true">
1463 <filterset>
1464 <filter token="VERSION" value="${jogl.version}"/>
1465 <filter token="SCM_BRANCH" value="${jogl.build.branch}"/>
1466 <filter token="SCM_COMMIT" value="${jogl.build.commit}"/>
1467 <filter token="BASEVERSION" value="${jogl_base_version}"/>
1468 </filterset>
1469 </copy>
1470 </target>
1471
1472 <target name="build-jars-os-desktop-javase" depends="setup-manifestfile">
1473 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.x11.jar}" filesonly="true">
1474 <fileset dir="${classes}" includes="${java.part.glx}"/>
1475 </jar>
1476 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.win.jar}" filesonly="true">
1477 <fileset dir="${classes}" includes="${java.part.wgl}" />
1478 </jar>
1479 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.osx.jar}" filesonly="true">
1480 <fileset dir="${classes}" includes="${java.part.cgl}"/>
1481 </jar>
1482 </target>
1483
1484 <target name="build-jars-mobile-javase" depends="setup-manifestfile">
1485 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.jar}" filesonly="true">
1486 <fileset dir="${classes}"
1487 includes="${java.part.egl} ${java.part.es1} ${java.part.es2}"
1488 excludes="${java.part.awt} ${java.part.es1.dbg} ${java.part.es2.dbg}"/>
1489 </jar>
1490 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.dbg.jar}" filesonly="true">
1491 <fileset dir="${classes}"
1492 includes="${java.part.es1.dbg} ${java.part.es2.dbg}"/>
1493 </jar>
1494 </target>
1495
1496 <target name="build-jars-awt-javase" depends="setup-manifestfile" unless="setup.noAWT">
1497 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.awt.jar}" filesonly="true">
1498 <fileset dir="${classes}"
1499 includes="${java.part.awt}" />
1500 </jar>
1501 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.awt.jar}" filesonly="true">
1502 <fileset dir="${classes}"
1503 includes="${java.part.util.awt}"/>
1504 </jar>
1505 </target>
1506
1507 <target name="build-jars-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase">
1508 <!--os specific gldesktop-->
1509 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.gldesktop.jar}" filesonly="true">
1510 <fileset dir="${classes}"
1511 includes="${java.part.gldesktop}"
1512 excludes="${java.part.gldesktop.dbg} ${java.part.glugldesktop}"/>
1513 </jar>
1514
1515 <!-- misc -->
1516 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.gldesktop.dbg.jar}" filesonly="true">
1517 <fileset dir="${classes}"
1518 includes="${java.part.gldesktop.dbg}"/>
1519 </jar>
1520 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glugldesktop.jar}" filesonly="true">
1521 <fileset dir="${classes}"
1522 includes="${java.part.glugldesktop}"/>
1523 </jar>
1524 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.gldesktop.jar}" filesonly="true">
1525 <fileset dir="${classes}"
1526 includes="${java.part.util.gldesktop}"
1527 excludes="${java.part.awt} ${java.part.util.awt}"/>
1528 </jar>
1529 </target>
1530
1531 <target name="build-jars-javase" depends="setup-manifestfile, build-jars-mobile-javase, build-jars-desktop-javase, build-jars-awt-javase">
1532 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.core.jar}" filesonly="true">
1533 <fileset dir="${classes}"
1534 includes="${java.part.core}"
1535 excludes="${java.part.core.exclude}"/>
1536 </jar>
1537 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.sdk.jar}" filesonly="true">
1538 <fileset dir="${classes}"
1539 includes="${java.part.sdk}"/>
1540 </jar>
1541 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glutess.jar}" filesonly="true">
1542 <fileset dir="${classes}"
1543 includes="${java.part.glutess}"/>
1544 </jar>
1545 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glumipmap.jar}" filesonly="true">
1546 <fileset dir="${classes}"
1547 includes="${java.part.glumipmap}"/>
1548 </jar>
1549 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.jar}" filesonly="true">
1550 <fileset dir="${classes}"
1551 includes="${java.part.util} ${java.part.util.glsl} ${java.part.util.graph}"
1552 excludes="${java.part.util.awt} ${java.part.util.gldesktop} ${java.part.util.fixedfuncemu}"/>
1553 </jar>
1554 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.fixedfuncemu.jar}" filesonly="true">
1555 <fileset dir="${classes}"
1556 includes="${java.part.util.fixedfuncemu}"/>
1557 </jar>
1558 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.omx.jar}" filesonly="true">
1559 <fileset dir="${classes}"
1560 includes="${java.part.openmax}"/>
1561 </jar>
1562 <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.cg.jar}" filesonly="true">
1563 <fileset dir="${classes}"
1564 includes="${java.part.nv-cg}"/>
1565 </jar>
1566 <jar manifest="${build.jogl}/manifest.mf" destfile="${build.jogl}/jogl-natives-${os.and.arch}.jar" filesonly="true">
1567 <fileset dir="${obj.jogl}">
1568 <include name="*.${native.library.suffix}" />
1569 <exclude name="*jogl_cg.${native.library.suffix}" />
1570 </fileset>
1571 </jar>
1572 </target>
1573
1574 <!-- ================================================================== -->
1575 <!--
1576 - Build the Javadocs for the sources.
1577 - NOTE: these are not entirely correct as the javadocs targets depend
1578 - on the platform specific build targets. To circumvent any
1579 - errors, ensure that the source is built first.
1580 -->
1581 <!-- Same as above but with Cg directories added -->
1582 <target name="javadoc" depends="init">
1583 <!-- Build the general public Javadoc with CG -->
1584 <javadoc packagenames="${javadoc.packagenames},com.jogamp.opengl.cg"
1585 excludepackagenames="${java.excludes.javadoc.packagenames}"
1586 sourcepath="${src.java};${src.generated.java}"
1587 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
1588 overview="${javadoc.overview}"
1589 source="${target.sourcelevel}"
1590 maxmemory="512m"
1591 linkoffline="${javadoc.link} 142-packages"
1592 bottom="${javadoc.bottom}" >
1593 <classpath refid="nativewindow_gluegen.classpath"/>
1594 <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
1595 </javadoc>
1596 </target>
1597
1598 <target name="javadoc.spec" depends="init">
1599 <javadoc packagenames="${javadoc.spec.packagenames}"
1600 excludepackagenames="${java.excludes.javadoc.packagenames}"
1601 sourcepath="${src.java};${src.generated.java}"
1602 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
1603 overview="${javadoc.overview}"
1604 source="${target.sourcelevel}"
1605 maxmemory="512m"
1606 linkoffline="${javadoc.link} 142-packages"
1607 bottom="${javadoc.bottom}" >
1608 <classpath refid="nativewindow_gluegen.classpath"/>
1609 <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
1610 </javadoc>
1611 </target>
1612
1613 <target name="javadoc.dev.all" depends="init">
1614 <javadoc packagenames="${javadoc.dev.packagenames},com.jogamp.opengl.cg"
1615 excludepackagenames="${java.excludes.javadoc.packagenames}"
1616 sourcepath="${src.java};${src.generated.java}"
1617 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
1618 overview="${javadoc.overview}"
1619 source="${target.sourcelevel}"
1620 maxmemory="512m"
1621 linkoffline="${javadoc.link} 142-packages"
1622 bottom="${javadoc.bottom}" >
1623 <classpath refid="nativewindow_gluegen.classpath"/>
1624 <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
1625 </javadoc>
1626 </target>
1627
1628 <target name="all.doc" description="Build JOGL docs" depends="init,javadoc,javadoc.spec,javadoc.dev.all" />
1629
1630 <!-- ================================================================== -->
1631 <!--
1632 - Clean up all that is built.
1633 -->
1634 <target name="clean" description="Remove all build products" depends="declare.common">
1635 <delete includeEmptyDirs="true" quiet="true">
1636 <fileset dir="${tempdir}" />
1637 <fileset dir="${build.jogl}" />
1638 <fileset dir="${javadoc}" />
1639 <fileset dir="${javadoc.spec}" />
1640 <fileset dir="${javadoc.dev}" />
1641 </delete>
1642 </target>
1643
1644 <!-- ================================================================== -->
1645 <!--
1646 - Build everything.
1647 -->
1648 <target name="all" description="Build JOGL JAR file(s) and native libraries." depends="init,java.compile,c.build.jogl,build-jars,generate.version.txt" />
1649
1650 <target name="generate.version.txt" depends="init">
1651 <!-- Create a version.txt file indicating which version we just built -->
1652 <echo message="${jogl.version}" file="${build.jogl}/version.txt" />
1653 </target>
1654
1655</project>
16560
=== removed directory '.pc/otherArchsoswin.diff'
=== removed directory '.pc/otherArchsoswin.diff/make'
=== removed file '.pc/otherArchsoswin.diff/make/build-nativewindow.xml'
--- .pc/otherArchsoswin.diff/make/build-nativewindow.xml 2011-10-06 15:53:38 +0000
+++ .pc/otherArchsoswin.diff/make/build-nativewindow.xml 1970-01-01 00:00:00 +0000
@@ -1,865 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 - Ant build for the NativeWindow package. This build has been tested with ANT 1.7.0. The
4 - optional.jar that contains the optional ANT tasks must be in the ANT
5 - classpath (typically the ant/lib directory).
6 -
7 - A clean download of the NativeWindow sources is required for this build.
8 -
9 - This build has no dependence on environment variables; the needed
10 - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
11 - script, by the virtual machine, or elsewhere. However, on all platforms,
12 - the C compiler and linker should be in the path. All other paths that
13 - need to be set are in host.properties.
14 -
15 - NOTE: because the GlueGen config files have their own relative paths
16 - which cannot be overridden by GlueGen, GlueGen MUST be run from
17 - the "make" directory. This also means that this build.xml MUST
18 - be run from the "make" directory.
19 -
20 - Public targets:
21 - all: (default; autodetects OS and chooses C compiler from gluegen.properties)
22 - clean: clean all built
23 - javadoc: create the standard developer Javadoc (recommended)
24 - (Note: should build all first - may be dependence in the future)
25 - javadoc.spec: create the standard developer Javadoc but exclude com.jogamp.* classes
26 - javadoc.dev: create the internal developer Javadoc. This includes the
27 - Java and C file generators. Note that it is only supported
28 - to create the Javadoc for the platform on which you are
29 - currently running.
30 -
31 - Note: on Windows the "win32.c.compiler" property in gluegen.properties
32 - is required to select the appropriate C compiler. See the example
33 - gluegen.properties in the gluegen workspace for valid values. On Mac OS X
34 - universal binaries may also be built by setting the "macosxfat"
35 - property in gluegen.properties; again see the example file in this
36 - directory.
37 -
38 - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
39 - ANT build, including the GlueGen tasks, the building of
40 - the Java generated sources, the first and second phase Java compiles, and
41 - the building of the jar file. Thanks to Alex Radeski for the bulk of the
42 - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
43 - the original OS detection code.
44 -
45 - Some environment defs affecting native compilation
46 setup.noNativeAWT
47
48 - Internal settings, may not be necessary to set them manually,
49 since all JAR archives are orthogonal.
50 setup.noAWT
51 -->
52<project name="NativeWindow" basedir="." default="all">
53
54 <import file="build-common.xml"/>
55
56 <!-- needed for outofdate task -->
57 <taskdef resource="net/sf/antcontrib/antlib.xml">
58 <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
59 </taskdef>
60
61 <!-- ================================================================== -->
62 <!--
63 - Base initialization and detection of operating system.
64 -->
65 <target name="base.init" depends="common.init">
66
67 <!-- partitioning -->
68
69 <property name="java.part.swt"
70 value="jogamp/nativewindow/swt/**"/>
71
72 <property name="java.part.core"
73 value="javax/media/nativewindow/* javax/media/nativewindow/util/* javax/media/nativewindow/egl/* com/jogamp/nativewindow/* jogamp/nativewindow/* jogamp/nativewindow/jvm/* ${java.part.swt}"/>
74
75 <property name="java.part.awt"
76 value="javax/media/nativewindow/awt/* jogamp/nativewindow/jawt/** jogamp/nativewindow/**/awt/**"/>
77
78 <property name="java.part.x11"
79 value="jogamp/nativewindow/x11/** javax/media/nativewindow/x11/*" />
80
81 <property name="java.part.windows"
82 value="jogamp/nativewindow/windows/** javax/media/nativewindow/windows/*" />
83
84 <property name="java.part.macosx"
85 value="jogamp/nativewindow/macosx/** javax/media/nativewindow/macosx/*" />
86
87 <!-- condition excludes -->
88
89 <condition property="java.excludes.awt"
90 value="${java.part.awt}">
91 <isset property="setup.noAWT"/>
92 </condition>
93
94 <property name="java.excludes.all" value="${java.excludes.awt}" />
95 <echo message="java.excludes.all: ${java.excludes.all}" />
96 </target>
97
98
99 <!-- ================================================================== -->
100 <!--
101 - Declare all paths and user defined variables.
102 -->
103 <target name="declare.common" description="Declare properties" depends="base.init">
104
105 <property name="config.nativewindow" value="${config}/nativewindow" />
106
107 <property name="rootrel.src" value="src/nativewindow" />
108 <property name="rootrel.src.java" value="${rootrel.src}/classes" />
109 <property name="rootrel.src.c" value="${rootrel.src}/native" />
110
111 <property name="rootrel.src.generated" value="${rootrel.build}/nativewindow/gensrc" />
112 <property name="rootrel.generated.c" value="${rootrel.src.generated}/native" />
113
114 <!-- The source directories. -->
115 <property name="src.java" value="${project.root}/${rootrel.src.java}" />
116 <property name="src.c" value="${project.root}/${rootrel.src.c}" />
117
118 <!-- The generated source directories. -->
119 <property name="src.generated" value="${build.nativewindow}/gensrc" />
120 <property name="src.generated.java" value="${src.generated}/classes" />
121 <property name="src.generated.c" value="${src.generated}/native" />
122
123 <!-- The compiler output directories. -->
124 <property name="classes" value="${build.nativewindow}/classes" />
125
126 <property name="javah.classpath" value="${gluegen-rt.jar}:${classes}" />
127
128 <!-- The headers from which Java files are generated -->
129 <dirset id="stub.includes.fileset.all" dir=".">
130 <include name="${stub.includes}/macosx/**" />
131 <include name="${stub.includes}/win32/**" />
132 <include name="${stub.includes}/x11/**" />
133 <include name="${stub.includes}/gluegen/**" />
134 <include name="${stub.includes}/khr/**" />
135 <include name="${stub.includes}/jni/**" />
136 </dirset>
137 <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}">
138 <include name="macosx/**" />
139 <include name="win32/**" />
140 <include name="x11/**" />
141 <include name="common/**" />
142 <include name="jni/**" />
143 </fileset>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: