summaryrefslogtreecommitdiffstats
path: root/make/gluegen-cpptasks.xml
diff options
context:
space:
mode:
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>