aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath2
-rw-r--r--make/build.xml5
-rwxr-xr-xmake/gluegen-cpptasks-base.xml38
-rw-r--r--make/lib/gluegen-cpptasks-android-aarch64.xml3
-rw-r--r--make/lib/gluegen-cpptasks-android-armv6.xml2
-rw-r--r--make/lib/gluegen-cpptasks-linux-32bit.xml2
-rwxr-xr-xmake/scripts/make.gluegen.all.macosx-java6.sh4
-rw-r--r--make/stub_includes/jni/macosx/jawt_md.h2
-rw-r--r--test/native/sizeof_dump.c18
9 files changed, 37 insertions, 39 deletions
diff --git a/.classpath b/.classpath
index 92580a8..5a9ae3d 100644
--- a/.classpath
+++ b/.classpath
@@ -25,7 +25,7 @@
<classpathentry kind="src" path="jcpp/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/>
- <classpathentry kind="lib" path="make/lib/antlr.jar"/>
+ <classpathentry kind="lib" path="make/lib/antlr.jar" sourcepath="make/lib/antlr-src.zip"/>
<classpathentry kind="lib" path="make/lib/android-sdk/15/android.jar" sourcepath="make/lib/android-sdk/15/android-java-src.zip"/>
<classpathentry kind="lib" path="make/lib/junit.jar" sourcepath="make/lib/junit-sources.jar"/>
<classpathentry kind="lib" path="make/lib/semantic-versioning/semver.jar" sourcepath="make/lib/semantic-versioning/semver-src.zip"/>
diff --git a/make/build.xml b/make/build.xml
index e92da5b..c342a47 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -250,7 +250,6 @@
<target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.vc9,declare.win32.mingw,declare.win64.mingw" if="isWindows" >
<property name="c.src.dir.os" value="windows" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/win32" />
</target>
<target name="declare.linux.x86" if="isLinuxX86">
@@ -327,7 +326,6 @@
<target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
<property name="c.src.dir.os" value="unix" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
</target>
<target name="declare.android" if="isAndroid" >
@@ -354,7 +352,6 @@
<target name="declare.solaris" depends="declare.solaris32,declare.solarisSparcv9,declare.solarisAMD64" if="isSolaris" >
<property name="c.src.dir.os" value="unix" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/solaris" />
</target>
<target name="declare.macosx" if="isOSX">
@@ -380,7 +377,6 @@
<target name="declare.freebsd" depends="declare.freebsd.x86,declare.freebsd.amd64" if="isFreeBSD" >
<property name="c.src.dir.os" value="unix" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/freebsd" />
</target>
<target name="declare.hpux" if="isHPUX">
@@ -388,7 +384,6 @@
<property name="compiler.cfg.id" value="compiler.cfg.hpux" />
<property name="linker.cfg.id" value="linker.cfg.hpux" />
<property name="c.src.dir.os" value="unix" />
- <property name="java.includes.dir.hpux" value="${java.includes.dir}/hp-ux" />
</target>
<target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler,declare.win32,declare.linux,declare.android,declare.solaris,declare.macosx,declare.freebsd,declare.hpux,gluegen.cpptasks.configure.compiler" unless="build.javaonly" />
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 426bfae..03c0e38 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -88,9 +88,9 @@
- and the following properties:
-
- java.home.dir : path to the JDK home directory
- - java.includes.dir : path to the JNI headers (.../jdk/include)
- - java.includes.dir.platform : path to the platform JNI headers (.../jdk/include/linux)
- java.lib.dir.platform : path to the Java library dir (libjawt.so, etc.)
+ - java.includes.dir : path to the GlueGen JNI headers: gluegen/make/stub_includes/jni
+ - java.includes.dir.platform : path to the GlueGen Platform JNI headers: gluegen/make/stub_includes/jni/<platform>
-
- If your project requires only minimal changes to the compiler
- configuration, you may be able to simply refer to the
@@ -922,7 +922,6 @@
<target name="setup.java.home.dir.nonmacosx" unless="isOSX">
<!-- java home dir is up one directory as java.home points to '<java-install-dir>/jre' -->
<property name="java.home.dir" value="${java.home}/.." />
- <property name="java.includes.dir" value="${java.home.dir}/include" />
</target>
<target name="setup.java.home.dir.macosx" if="isOSX">
<!-- Java7 std location -->
@@ -930,15 +929,11 @@
value="${java.home}/..">
<available file="${java.home}/../include/jni.h"/>
</condition>
- <condition property="java.includes.dir"
- value="${java.home}/../include">
- <available file="${java.home}/../include/jni.h"/>
- </condition>
<!-- Fallback value Java6 -->
<property name="java.home.dir" value="/System/Library/Frameworks/JavaVM.framework/Home" />
- <property name="java.includes.dir" value="/System/Library/Frameworks/JavaVM.framework/Headers" />
</target>
<target name="setup.java.home.dir" depends="setup.java.home.dir.nonmacosx,setup.java.home.dir.macosx">
+ <property name="java.includes.dir" value="${gluegen.root.abs-path}/make/stub_includes/jni" />
<echo message="java.home.dir ${java.home.dir}" />
<echo message="java.includes.dir ${java.includes.dir}" />
</target>
@@ -1519,7 +1514,7 @@
</target>
<target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
- <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>
<target name="gluegen.cpptasks.declare.compiler.solaris32" if="isSolaris32Bit">
@@ -1541,7 +1536,7 @@
</target>
<target name="gluegen.cpptasks.declare.compiler.solaris" depends="gluegen.cpptasks.declare.compiler.solaris32,gluegen.cpptasks.declare.compiler.solaris.sparcv9,gluegen.cpptasks.declare.compiler.solaris.amd64" if="isSolaris">
- <property name="java.includes.dir.platform" value="${java.includes.dir}/solaris" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/${solaris.cpu}" />
</target>
@@ -1549,25 +1544,13 @@
<echo message="MacOSX" />
<property name="compiler.cfg.id.base" value="compiler.cfg.macosx" />
<property name="linker.cfg.id.base" value="linker.cfg.macosx" />
- <!-- Java7 std location -->
- <!-- Temporary workaround:
- Provided darwin/jawt_md.h from Oracle for OSX / Java7
- has X11 dependencies and does not define JAWT_SurfaceLayers.
- value="${java.includes.dir}/darwin">
- -->
- <condition property="java.includes.dir.platform"
- value="${gluegen.root.abs-path}/make/stub_includes/jni/macosx">
- <available file="${java.includes.dir}/darwin/jawt_md.h"/>
- </condition>
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/macosx" />
<condition property="java.lib.dir.platform"
value="${java.home.dir}/jre/lib">
<available file="${java.home.dir}/jre/lib/libjawt.dylib"/>
</condition>
<!-- Fallback value Java6 -->
- <property name="java.includes.dir.platform" value="/System/Library/Frameworks/JavaVM.framework/Headers" />
<property name="java.lib.dir.platform" value="/System/Library/Frameworks/JavaVM.framework/Libraries" />
- <echo message="java.includes.dir.platform ${java.includes.dir.platform}" />
- <echo message="java.lib.dir.platform ${java.lib.dir.platform}" />
</target>
<target name="gluegen.cpptasks.declare.compiler.freebsd.x86" if="isFreeBSDX86">
@@ -1585,19 +1568,22 @@
</target>
<target name="gluegen.cpptasks.declare.compiler.freebsd" depends="gluegen.cpptasks.declare.compiler.freebsd.x86,gluegen.cpptasks.declare.compiler.freebsd.amd64" if="isFreeBSD">
- <property name="java.includes.dir.platform" value="${java.includes.dir}/freebsd" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>
<target name="gluegen.cpptasks.declare.compiler.hpux" if="isHPUX">
<echo message="HP-UX" />
<property name="compiler.cfg.id.base" value="compiler.cfg.hpux" />
<property name="linker.cfg.id.base" value="linker.cfg.hpux" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/hp-ux" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/PA_RISC2.0" />
</target>
<target name="gluegen.cpptasks.declare.compiler" depends="gluegen.cpptasks.declare.compiler.environment,gluegen.cpptasks.declare.compiler.win32,gluegen.cpptasks.declare.compiler.linux,gluegen.cpptasks.declare.compiler.solaris,gluegen.cpptasks.declare.compiler.macosx,gluegen.cpptasks.declare.compiler.freebsd,gluegen.cpptasks.declare.compiler.hpux" >
- <echo message="java.lib.dir.platform: ${java.lib.dir.platform}" />
+ <echo message="java.home.dir ${java.home.dir}" />
+ <echo message="java.includes.dir ${java.includes.dir}" />
+ <echo message="java.includes.dir.platform ${java.includes.dir.platform}" />
+ <echo message="java.lib.dir.platform ${java.lib.dir.platform}" />
</target>
<target name="gluegen.cpptasks.setup.compiler" depends="gluegen.cpptasks.detect.compiler,gluegen.cpptasks.configure.compiler,gluegen.cpptasks.declare.compiler" />
diff --git a/make/lib/gluegen-cpptasks-android-aarch64.xml b/make/lib/gluegen-cpptasks-android-aarch64.xml
index fcf2875..de1e1da 100644
--- a/make/lib/gluegen-cpptasks-android-aarch64.xml
+++ b/make/lib/gluegen-cpptasks-android-aarch64.xml
@@ -20,7 +20,6 @@
<property name="gluegen.cpptasks.detected.os" value="true" />
<property name="isUnix" value="true" />
<property name="isAndroid" value="true" />
- <property name="isAndroidARMv6" value="false" />
<property name="isAndroidARM64" value="true" />
<property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
<property name="isCrosscompilation" value="true" />
@@ -127,7 +126,7 @@
<property name="compiler.cfg.id.base" value="compiler.cfg.android" />
<property name="linker.cfg.id.base" value="linker.cfg.android" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/i386" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>
<target name="declare.linux.android">
diff --git a/make/lib/gluegen-cpptasks-android-armv6.xml b/make/lib/gluegen-cpptasks-android-armv6.xml
index bcb3f53..46b79eb 100644
--- a/make/lib/gluegen-cpptasks-android-armv6.xml
+++ b/make/lib/gluegen-cpptasks-android-armv6.xml
@@ -128,7 +128,7 @@
<property name="compiler.cfg.id.base" value="compiler.cfg.android" />
<property name="linker.cfg.id.base" value="linker.cfg.android" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/i386" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>
<target name="declare.linux.android">
diff --git a/make/lib/gluegen-cpptasks-linux-32bit.xml b/make/lib/gluegen-cpptasks-linux-32bit.xml
index 69afca8..025c0fa 100644
--- a/make/lib/gluegen-cpptasks-linux-32bit.xml
+++ b/make/lib/gluegen-cpptasks-linux-32bit.xml
@@ -44,7 +44,7 @@
<property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
<property name="linker.cfg.id.base" value="linker.cfg.linux" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/i386" />
- <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>
</project>
diff --git a/make/scripts/make.gluegen.all.macosx-java6.sh b/make/scripts/make.gluegen.all.macosx-java6.sh
index 0a5a8f2..55dd48a 100755
--- a/make/scripts/make.gluegen.all.macosx-java6.sh
+++ b/make/scripts/make.gluegen.all.macosx-java6.sh
@@ -25,5 +25,5 @@ export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
ant \
- -Drootrel.build=build-macosx \
- $* 2>&1 | tee make.gluegen.all.macosx.log
+ -Drootrel.build=build-macosx-java6 \
+ $* 2>&1 | tee make.gluegen.all.macosx-java6.log
diff --git a/make/stub_includes/jni/macosx/jawt_md.h b/make/stub_includes/jni/macosx/jawt_md.h
index 519a513..5a73e44 100644
--- a/make/stub_includes/jni/macosx/jawt_md.h
+++ b/make/stub_includes/jni/macosx/jawt_md.h
@@ -54,7 +54,7 @@ JAWT_MacOSXDrawingSurfaceInfo;
@property (readonly) CALayer *windowLayer;
@end
-#endif __GLUEGEN__
+#endif /* __GLUEGEN__ */
#ifdef __cplusplus
}
diff --git a/test/native/sizeof_dump.c b/test/native/sizeof_dump.c
new file mode 100644
index 0000000..2d79aa7
--- /dev/null
+++ b/test/native/sizeof_dump.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+
+int main(int argc, const char ** argv) {
+ printf("sizeof int: %lu\n", sizeof(int));
+ printf("sizeof long: %lu\n", sizeof(long));
+ printf("sizeof long long: %lu\n", sizeof(long long));
+ printf("sizeof intptr_t: %lu\n", sizeof(intptr_t));
+ printf("sizeof uintptr_t: %lu\n", sizeof(uintptr_t));
+ printf("sizeof ptrdiff_t: %lu\n", sizeof(ptrdiff_t));
+ printf("sizeof size_t: %lu\n", sizeof(size_t));
+ printf("sizeof float: %lu\n", sizeof(float));
+ printf("sizeof double: %lu\n", sizeof(double));
+ printf("sizeof long double: %lu\n", sizeof(long double));
+
+ return 0;
+}