aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-01-27 06:52:41 +0000
committerKenneth Russel <[email protected]>2005-01-27 06:52:41 +0000
commitfdb0b1d02d783215bcd3d0a29efedb93f43451c9 (patch)
tree7b98ed570efaf1670d2e13ccce77aee1928d3ed3 /make/build.xml
parent0b82fed98ee48bbe2a199303bac626d480fa6a96 (diff)
Partial fix for Issue 88: Add Linux amd64 support to JOGL
The stub_includes headers and GlueGen config files have been changed to make X identifiers and similar values appear to Java to be 64-bit values on all platforms, rather than changing between 32-bit and 64-bit values depending on the architecture. This allows the shared Java code in the JOGL X11 implementation to work on both 32- and 64-bit architectures, which is an important step toward having complete 64-bit support in JOGL. Compared to the suggested patch, there is no longer a need to duplicate the sources in net.java.games.jogl.impl.x11 because the Java sources are now 64-bit clean. The change to use dlsym on Linux/AMD64 instead of glXGetProcAddressARB has been conditionalized under a run-time flag. Most of the build.xml and all of the GlueGen changes were incorporated unchanged. Thanks to the original authors of the patch for this work. At this point "ant linux.amd64" should build a working JOGL. However, it can not yet be incorporated into the distribution's platform- independent jogl.jar; in order to do this, the generation of the StructAccessors for the JAWT and some other X11 data structures by GlueGen will need to be conditionalized depending on the platform so that the 32-bit versions go in one directory, the 64-bit versions in another, and a run-time check is done to determine which version to instantiate. There are also a few remaining cleanups to generated glue code such as net.java.games.jogl.impl.x11.GLX.XGetVisualInfo(), which needs to be made platform-independent by calling the XVisualInfo.size() accessor rather than hardwiring in the size of the data structure (although the real solution will probably need to be more complicated since there will probably be two XVisualInfo implementations in the jar file). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@190 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml36
1 files changed, 33 insertions, 3 deletions
diff --git a/make/build.xml b/make/build.xml
index 19e192018..29649d06d 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -200,6 +200,7 @@
<property name="java.includes.dir.macosx" value="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers" />
<property name="java.lib.dir.win32" value="${java.home.dir}/lib" />
<property name="java.lib.dir.linux" value="${java.home.dir}/jre/lib/i386" />
+ <property name="java.lib.dir.linux.amd64" value="${java.home.dir}/jre/lib/amd64" />
<condition property="cpu" value="sparc">
<os name="SunOS" arch="sparc" />
</condition>
@@ -303,7 +304,6 @@
<property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.x11}" />
</target>
-
<target name="declare.linux" depends="declare.x11">
<property name="java.includes.dir.platform" value="${java.includes.dir.linux}" />
<property name="java.lib.dir.platform" value="${java.lib.dir.linux}" />
@@ -312,6 +312,13 @@
<property name="linker.cfg.id" value="linker.cfg.linux" />
</target>
+ <target name="declare.linux.amd64" depends="declare.x11">
+ <property name="java.includes.dir.platform" value="${java.includes.dir.linux}" />
+ <property name="java.lib.dir.platform" value="${java.lib.dir.linux.amd64}" />
+
+ <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.amd64" />
+ </target>
<target name="declare.solaris" depends="declare.x11">
<property name="java.includes.dir.platform" value="${java.includes.dir.solaris}" />
@@ -653,6 +660,10 @@
<!-- compiler configuration -->
<compiler id="compiler.cfg.linux" name="gcc" />
+ <compiler id="compiler.cfg.linux.amd64" name="gcc">
+ <compilerarg value="-fPIC"/>
+ </compiler>
+
<compiler id="compiler.cfg.solaris" name="suncc">
</compiler>
@@ -706,6 +717,11 @@
<syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
</linker>
+ <linker id="linker.cfg.linux.amd64" name="gcc">
+ <syslibset dir="/usr/X11R6/lib64" libs="GL, GLU, X11"/>
+ <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
+ </linker>
+
<linker id="linker.cfg.solaris" name="suncc">
<syslibset libs="GL, GLU, X11"/>
</linker>
@@ -845,6 +861,9 @@
<target name="c.compile.jogl.linux" depends="declare.linux, c.build.jogl, c.build.cg" >
</target>
+ <target name="c.compile.jogl.linux.amd64" depends="declare.linux.amd64, c.build.jogl, c.build.cg" >
+ </target>
+
<target name="c.compile.jogl.solaris" depends="declare.solaris, c.build.jogl">
</target>
@@ -1001,7 +1020,7 @@
<target name="all">
<fail>
-Use a platform specific target: linux, macosx, solaris, win32.vc6, win32.vc7, win32.mingw
+Use a platform specific target: linux, linux.amd64, macosx, solaris, win32.vc6, win32.vc7, win32.mingw
</fail>
</target>
@@ -1050,7 +1069,18 @@ Use a platform specific target: linux, macosx, solaris, win32.vc6, win32.vc7, w
</target>
<!--
- - Solaris (assuming Solaris CC)
+ - Linux on AMD64 (assuming GCC)
+ -->
+ <target name="linux.amd64" depends="setup.java.home.dir.nonmacosx, declare.linux.amd64">
+ <!-- Generate, compile, and build the jar for the Java sources. -->
+ <antcall target="jar" inheritRefs="true" />
+
+ <!-- Compile the native C sources and build the jogl lib. -->
+ <antcall target="c.compile.jogl.linux.amd64" />
+ </target>
+
+ <!--
+ - Solaris (assuming Solaris CC)
-->
<target name="solaris" depends="setup.java.home.dir, declare.solaris">
<!-- Generate, compile, and build the jar for the Java sources. -->