summaryrefslogtreecommitdiffstats
path: root/make/gluegen-cpptasks.xml
diff options
context:
space:
mode:
authorKenneth Russel <kbrussel@alum.mit.edu>2006-01-15 03:24:40 +0000
committerKenneth Russel <kbrussel@alum.mit.edu>2006-01-15 03:24:40 +0000
commitdf0f5636884b212bcc7a2d9b1b61c195bba79621 (patch)
treebe2eabb3b9238ae09150c91fc2596ffe465e69b8 /make/gluegen-cpptasks.xml
parent25c85cda60fb1ae1d135e3549338d8c0f331b60f (diff)
Moved GlueGen out of the JOGL workspace and into its own project.
Restructured JOGL and JOAL build processes to separately invoke GlueGen's main build.xml before using it to generate their code. Refactored OS/CPU detection code into gluegen-cpptasks.xml build file in GlueGen workspace, which is now imported by both the JOGL and JOAL build processes. Unfortunately it seems to be somewhat difficult to completely factor out the C compiler configuration into the GlueGen workspace so this has been left for a later date. Added missed ALProcAddressLookup file to JOAL workspace. Updated JOGL and JOAL build documentation. More documentation for the GlueGen workspace is forthcoming. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@3 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'make/gluegen-cpptasks.xml')
-rwxr-xr-xmake/gluegen-cpptasks.xml175
1 files changed, 175 insertions, 0 deletions
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
new file mode 100755
index 0000000..8d10498
--- /dev/null
+++ b/make/gluegen-cpptasks.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Ant project file which sets up cpptasks to compile native code
+ - generated by GlueGen for multiple supported platforms. This Ant
+ - project file is not intended to be executed standalone, but imported
+ - by other projects which use GlueGen to generate native code and
+ - need to compile that native code.
+ -
+ - Before importing this file, the property "gluegen.root" must be
+ - defined; this is the relative path from the current working
+ - directory (e.g., from which the parent project's build.xml is being
+ - executed) to the top of the checked-out GlueGen workspace.
+ -
+ - This Ant project file depends on the following properties being set
+ - externally:
+ -
+ - win32.c.compiler (required to be set on Windows):
+ - one of "vc6", "vc7", "vc8", or "mingw".
+ - c.compiler.debug:
+ - set to "true" if debug version of the compiled
+ - C code is desired.
+ - macosxfat:
+ - set to "true" if universal / fat binaries (both PowerPC
+ - and Intel code) are desired on Mac OS X. Requires
+ - support for cross-compilation from the underlying C
+ - compiler.
+ -
+ - The gluegen.cpptasks.detect.os target sets the following
+ - properties appropriately. They are only set to "true" if the OS/CPU
+ - configuration is exactly as specified.
+ -
+ - isFreeBSD
+ - isIA64
+ - isOSX
+ - isLinux
+ - isLinuxAMD64
+ - isLinuxIA64
+ - isLinuxX86
+ - isSolaris
+ - isWindows
+ - isUnix
+ - isX11
+ -
+ - The gluegen.cpptasks.detect.compiler target sets the following
+ - properties appropriately. They are only set to "true" if the OS/compiler
+ - configuration is exactly as specified.
+ -
+ - isVC6
+ - isVC7
+ - isVC8
+ - isMingW
+ -->
+<project name="GlueGen-cpptasks" basedir=".">
+ <!-- import cpptasks -->
+ <typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar"/>
+
+ <!-- Detect OS and compiler configuration -->
+ <target name="gluegen.cpptasks.detect.os" unless="gluegen.cpptasks.detected.os">
+ <condition property="isOSX">
+ <and>
+ <os family="mac"/>
+ <os family="unix"/>
+ </and>
+ </condition>
+ <condition property="isUnix">
+ <and>
+ <os family="unix" />
+ <not>
+ <os family="mac" />
+ </not>
+ </and>
+ </condition>
+ <condition property="isLinux">
+ <os name="Linux" />
+ </condition>
+ <condition property="isSolaris">
+ <os name="SunOS" />
+ </condition>
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+ <condition property="isFreeBSD">
+ <os name="FreeBSD" />
+ </condition>
+ <condition property="isLinuxX86">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="x86" />
+ </and>
+ </condition>
+ <condition property="isLinuxAMD64">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="AMD64" />
+ </and>
+ </condition>
+ <condition property="isLinuxIA64">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="IA64" />
+ </and>
+ </condition>
+ <condition property="isIA64">
+ <os arch="IA64" />
+ </condition>
+ <!-- Note: assumes X11 platform by default -->
+ <condition property="isX11">
+ <and>
+ <isfalse value="${isWindows}" />
+ <isfalse value="${isOSX}" />
+ </and>
+ </condition>
+
+ <echo message="OS X=${isOSX}" />
+ <echo message="Windows=${isWindows}" />
+ <echo message="Unix=${isUnix}" />
+ <echo message="Linux=${isLinux}" />
+ <echo message="Solaris=${isSolaris}" />
+ <echo message="FreeBSD=${isFreeBSD}" />
+ <echo message="LinuxAMD64=${isLinuxAMD64}" />
+ <echo message="LinuxIA64=${isLinuxIA64}" />
+ <echo message="IA64=${isIA64}" />
+ <echo message="X11=${isX11}" />
+
+ <property name="gluegen.cpptasks.detected.os" value="true" />
+ </target>
+
+ <!-- Detect compiler setup, in particular on Windows; separated
+ - out because this must sometimes be called late in the setup process
+ -->
+ <target name="gluegen.cpptasks.detect.compiler">
+ <!-- Set up compiler selection on Windows -->
+ <condition property="isVC6">
+ <and>
+ <istrue value="${isWindows}" />
+ <equals arg1="${win32.c.compiler}" arg2="vc6" />
+ </and>
+ </condition>
+ <condition property="isVC7">
+ <and>
+ <istrue value="${isWindows}" />
+ <equals arg1="${win32.c.compiler}" arg2="vc7" />
+ </and>
+ </condition>
+ <condition property="isVC8">
+ <and>
+ <istrue value="${isWindows}" />
+ <equals arg1="${win32.c.compiler}" arg2="vc8" />
+ </and>
+ </condition>
+ <condition property="isMingW">
+ <and>
+ <istrue value="${isWindows}" />
+ <equals arg1="${win32.c.compiler}" arg2="mingw" />
+ </and>
+ </condition>
+ <condition property="WindowsFailure">
+ <and>
+ <istrue value="${isWindows}" />
+ <isfalse value="${isVC6}" />
+ <isfalse value="${isVC7}" />
+ <isfalse value="${isVC8}" />
+ <isfalse value="${isMingW}" />
+ </and>
+ </condition>
+ <fail message="Must specify either win32.c.compiler in jogl.properties or use e.g. win32.vc6 build target" if="WindowsFailure" />
+ <echo message="VC6=${isVC6}" />
+ <echo message="VC7=${isVC7}" />
+ <echo message="VC8=${isVC8}" />
+ <echo message="MingW=${isMingW}" />
+
+ <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
+ <property name="c.compiler.debug" value="false" />
+ </target>
+</project>