summaryrefslogtreecommitdiffstats
path: root/make/build-nativewindow.xml
diff options
context:
space:
mode:
Diffstat (limited to 'make/build-nativewindow.xml')
-rw-r--r--make/build-nativewindow.xml85
1 files changed, 77 insertions, 8 deletions
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 4bbe667b8..1b28a5d92 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -76,13 +76,13 @@
value="javax/media/nativewindow/awt/* jogamp/nativewindow/jawt/** jogamp/nativewindow/**/awt/**"/>
<property name="java.part.x11"
- value="jogamp/nativewindow/x11/** javax/media/nativewindow/x11/*" />
+ value="jogamp/nativewindow/x11/* javax/media/nativewindow/x11/*" />
<property name="java.part.windows"
- value="jogamp/nativewindow/windows/** javax/media/nativewindow/windows/*" />
+ value="jogamp/nativewindow/windows/* javax/media/nativewindow/windows/*" />
<property name="java.part.macosx"
- value="jogamp/nativewindow/macosx/** javax/media/nativewindow/macosx/*" />
+ value="jogamp/nativewindow/macosx/* javax/media/nativewindow/macosx/*" />
<!-- condition excludes -->
@@ -222,6 +222,7 @@
<target name="java.generate.windowlib" if="windowlib.os.cfg">
<echo message="Generating Windowing Lib implementation class" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
<gluegen src="${stub.includes}/${window.os.system}/window-lib.c"
outputRootDir="${build.nativewindow}"
config="${windowlib.os.cfg}"
@@ -240,12 +241,15 @@
- handle different drives in an effective manner. -->
<echo message="Generating JAWT interface class" />
<echo message="java.home.dir=${java.home.dir}" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
<gluegen src="${jawt.platform.header}"
outputRootDir="${build.nativewindow}"
config="${jawt.cfg}"
includeRefid="stub.includes.fileset.platform"
literalInclude="${stub.includes.gluegen.gg}, ${stub.includes}/jni"
- emitter="com.jogamp.gluegen.JavaEmitter">
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ debug="false"
+ dumpCPP="false">
<classpath refid="gluegen.classpath" />
</gluegen>
</target>
@@ -270,6 +274,8 @@
<!-- Use the GlueGen task to generate the Java files -->
+ <antcall target="java.generate.cleantemp" inheritRefs="true" />
+
<echo message="Generating platform-specifics: X11" />
<antcall target="java.generate.platforms" inheritRefs="true">
<param name="window.os.system" value="x11"/>
@@ -286,7 +292,7 @@
<param name="jawt.platform.header" value="${stub.includes}/jni/win32/jawt_md.h" />
</antcall>
- <echo message="Generating platform-specifics: MaxOsX" />
+ <echo message="Generating platform-specifics: MacOSX" />
<antcall target="java.generate.platforms" inheritRefs="true">
<param name="window.os.system" value="macosx"/>
<param name="jawt.cfg" value="${config.nativewindow}/jawt-macosx.cfg" />
@@ -354,6 +360,10 @@
<compilerarg value="-I/usr/X11R6/include" />
</compiler>
+ <compiler id="compiler.cfg.macosx.nativewindow" extends="compiler.cfg.macosx">
+ <compilerarg value="-I${java.osx.frameworks.dir}/JavaNativeFoundation.framework/Headers" />
+ </compiler>
+
<!-- linker configuration -->
<linker id="linker.cfg.freebsd.nativewindow.x11" extends="linker.cfg.freebsd">
@@ -442,8 +452,13 @@
</linker>
<linker id="linker.cfg.macosx.nativewindow" extends="linker.cfg.macosx">
- <linkerarg value="-framework" />
+ <linkerarg value="-weak_framework" />
+ <linkerarg value="QuartzCore" />
+ <linkerarg value="-weak_framework" />
<linkerarg value="Cocoa" />
+ <linkerarg value="-framework" />
+ <linkerarg value="JavaNativeFoundation" />
+ <linkerarg value="-F${java.osx.frameworks.dir}" />
</linker>
<linker id="linker.cfg.hpux.nativewindow" extends="linker.cfg.hpux">
@@ -494,7 +509,43 @@
<property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
</target>
- <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" />
+ <target name="c.configure.linux.hppa" if="isLinuxHppa">
+ <echo message="Linux.HPPA" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <target name="c.configure.linux.mips" if="isLinuxMips">
+ <echo message="Linux.MIPS" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <target name="c.configure.linux.mipsel" if="isLinuxMipsel">
+ <echo message="Linux.MIPSEL" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <target name="c.configure.linux.ppc" if="isLinuxPpc">
+ <echo message="Linux.PPC" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <target name="c.configure.linux.s390" if="isLinuxs390">
+ <echo message="Linux.S390" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <target name="c.configure.linux.sparc" if="isLinuxSparc">
+ <echo message="Linux.SPARC" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.oswin" value="linker.cfg.linux.nativewindow.x11" />
+ </target>
+
+ <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" />
<target name="c.configure.android" if="isAndroid">
<echo message="Android" />
@@ -547,7 +598,7 @@
<target name="c.configure.x11" if="isX11" />
<target name="c.configure.macosx" if="isOSX">
- <property name="compiler.cfg.id" value="compiler.cfg.macosx" />
+ <property name="compiler.cfg.id" value="compiler.cfg.macosx.nativewindow" />
<property name="linker.cfg.id.oswin" value="linker.cfg.macosx.nativewindow" />
</target>
@@ -620,6 +671,7 @@
</patternset>
<echo message="Compiling @{output.lib.name}" />
+ <echo message="java.lib.dir.platform: ${java.lib.dir.platform}" />
<!-- have to wrap cc task with outofdate, because otherwise cc links a new library
even when no files have been compiled -->
@@ -725,6 +777,7 @@
<target name="c.build.nativewindow.windowlib.windows" if="isWindows">
<javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.nativewindow.windows.GDI" />
+ <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.nativewindow.windows.GDIUtil" />
<c.build c.compiler.src.files="c.src.files.windows"
output.lib.name="nativewindow_win32"
@@ -734,6 +787,7 @@
<target name="c.build.nativewindow.windowlib.macosx" if="isOSX">
<javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.nativewindow.macosx.OSXUtil" />
+ <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.nativewindow.jawt.macosx.MacOSXJAWTWindow" />
<c.build c.compiler.src.files="c.src.files.macosx"
output.lib.name="nativewindow_macosx"
@@ -873,11 +927,26 @@
-->
<target name="clean" description="Remove all build products" depends="declare.common">
<delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${tempdir}" />
<fileset dir="${build.nativewindow}" />
<fileset dir="${javadoc}" />
<fileset dir="${javadoc.spec}" />
<fileset dir="${javadoc.dev}" />
</delete>
+ <antcall target="java.generate.cleantemp" inheritRefs="true" />
+ </target>
+
+ <target name="java.generate.cleantemp">
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${tempdir}/gensrc" />
+ </delete>
+ </target>
+
+ <target name="java.generate.copy2temp">
+ <copy todir="${tempdir}">
+ <fileset dir="${build.nativewindow}"
+ includes="gensrc/classes/**" />
+ </copy>
</target>
<!-- ================================================================== -->