summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-test.xml2
-rw-r--r--make/build.xml52
-rwxr-xr-xmake/gluegen-cpptasks-base.xml156
-rwxr-xr-xmake/gluegen-properties.xml14
-rw-r--r--make/jogamp-androidtasks.xml2
-rw-r--r--make/lib/cpptasks.jarbin377953 -> 380532 bytes
-rwxr-xr-xmake/scripts/make.gluegen.all.ios.amd64.sh35
-rwxr-xr-xmake/scripts/make.gluegen.all.ios.arm64.sh35
-rw-r--r--make/stub_includes/jni/jni.h4
9 files changed, 268 insertions, 32 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index 6372696..f39f0bf 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -234,7 +234,7 @@
<condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
- <cc outtype="shared"
+ <cc outtype="${output.lib.type}"
objdir="${build_t.obj}"
outfile="${build_t.lib}/@{output.lib.name}"
optimize="${c.compiler.optimise}"
diff --git a/make/build.xml b/make/build.xml
index 147cbe7..3d247f3 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -389,6 +389,20 @@
<property name="c.src.dir.os" value="unix" />
</target>
+ <target name="declare.ios.amd64" if="isIOSAmd64">
+ <echo message="IOSAmd64" />
+ <property name="compiler.cfg.id" value="compiler.cfg.ios.amd64" />
+ <property name="linker.cfg.id" value="linker.cfg.ios.amd64" />
+ <property name="c.src.dir.os" value="unix" />
+ </target>
+
+ <target name="declare.ios.arm64" if="isIOSArm64">
+ <echo message="IOSArm64" />
+ <property name="compiler.cfg.id" value="compiler.cfg.ios.arm64" />
+ <property name="linker.cfg.id" value="linker.cfg.ios.arm64" />
+ <property name="c.src.dir.os" value="unix" />
+ </target>
+
<target name="declare.freebsd.amd64" if="isFreeBSDAMD64">
<echo message="FreeBSDAMD64" />
<property name="compiler.cfg.id" value="compiler.cfg.freebsd" />
@@ -414,31 +428,25 @@
<property name="c.src.dir.os" value="unix" />
</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" />
+ <target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler,declare.win32,declare.linux,declare.android,declare.solaris,declare.macosx,declare.ios.amd64,declare.ios.arm64,declare.freebsd,declare.hpux,gluegen.cpptasks.configure.compiler" />
<target name="c.rename.lib.mingw" if="isMingW">
<!-- FIXME: this is a hack; the cpptask should have an option to change the
suffix or at least understand the override from .so to .dll -->
- <move file="${build}/obj/libgluegen-rt.so" tofile="${build}/obj/gluegen-rt.dll" />
- </target>
-
- <target name="c.rename.lib.macosx" if="isOSX">
- <copy file="${build}/obj/libgluegen-rt.dylib" tofile="${build}/obj/libgluegen-rt.so" />
+ <move file="${build}/obj/libgluegen_rt.so" tofile="${build}/obj/gluegen_rt.dll" />
</target>
<target name="c.manifest" if="isVC8Family">
<!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
- <msvc.manifest objdir="${build}/obj" dllname="gluegen-rt" />
+ <msvc.manifest objdir="${build}/obj" dllname="gluegen_rt" />
</target>
<target name="gluegen.build.native" depends="init, c.configure" >
<property name="c.compiler.src.files.common" value="src/native/common/*.c" />
<property name="c.compiler.src.files.os" value="src/native/${c.src.dir.os}/*.c" />
- <property name="output.lib.name" value="gluegen-rt" />
- <condition property="output.lib.name.os" value="lib${output.lib.name}.so"><isset property="isUnix"/></condition>
- <condition property="output.lib.name.os" value="${output.lib.name}.dll"><isset property="isWindows"/></condition>
- <condition property="output.lib.name.os" value="lib${output.lib.name}.dylib"><isset property="isOSX"/></condition>
+ <property name="output.lib.name" value="gluegen_rt" /> <!-- dash replaced by underscore to allow static linkage via JEP 178 -->
+ <property name="output.lib.name.os" value="${native.library.prefix}${output.lib.name}.${native.library.suffix}" />
<uptodate property="gluegen.build.skip.native">
<srcfiles dir= "${project.root}" includes="${c.compiler.src.files.os}"/>
@@ -463,14 +471,15 @@
<javah destdir="${src.generated.c}/Unix" classpath="${classes}" class="jogamp.common.os.UnixDynamicLinkerImpl" />
<javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.common.os.WindowsDynamicLinkerImpl"/>
- <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os}" />
+ <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os} [${output.lib.type}]" />
<mkdir dir="${gluegen.lib.dir}"/>
<echo message="Compiling ${c.compiler.src.files.os} ${c.compiler.src.files.common}" />
<echo message="user.dir=${user.dir}" />
- <cc outtype="shared"
+ <cc outtype="${output.lib.type}"
+ usehighleveltool="true"
objdir="${gluegen.lib.dir}"
outfile="${gluegen.lib.dir}/${output.lib.name}"
optimize="${c.compiler.optimise}"
@@ -502,6 +511,7 @@
<includepath path="${src.generated.c}" />
<includepath path="${src.generated.c}/Unix" if="isUnix"/>
<includepath path="${src.generated.c}/Unix" if="isOSX"/>
+ <includepath path="${src.generated.c}/Unix" if="isIOS"/>
<includepath path="${src.generated.c}/Windows" if="isWindows"/>
</compiler>
@@ -509,7 +519,10 @@
</cc>
<antcall target="c.rename.lib.mingw" inheritRefs="true" />
- <antcall target="c.rename.lib.macosx" inheritRefs="true" />
+
+ <gluegen.make.libsymbols builddir="${build}"
+ nativelib="${gluegen.lib.dir}/${output.lib.name.os}"
+ symbolsfile="${gluegen.lib.dir}/${native.library.prefix}${output.lib.name}.symbols" />
<antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
<param name="libdir" value="${gluegen.lib.dir}"/>
@@ -542,7 +555,7 @@
nativejarfile="${build}/gluegen-rt-natives-${os.and.arch}.jar"
manifestfile="${build}/Manifest-rt-natives.temp"
module="common"
- includelibs="*gluegen-rt.${native.library.suffix}" />
+ includelibs="*${output.lib.name}.${native.library.suffix}" />
<!-- Produce duplicates for different configurations, since non-native-jar aliasing (Bug 1023/Bug 1024) -->
<copy file="${build}/gluegen-rt-natives-${os.and.arch}.jar" tofile="${build}/gluegen-rt-android-natives-${os.and.arch}.jar"/>
@@ -1206,7 +1219,7 @@
jarbuilddir="${build}"
jarbasename="gluegen-rt-android"
nativebuilddir="${gluegen.lib.dir}"
- nativebasename="gluegen-rt"
+ nativebasename="${output.lib.name}"
android.abi="${android.abi}"
androidmanifest.path="resources/android/AndroidManifest-Runtime.xml"
androidresources.path="resources/android/res"
@@ -1227,8 +1240,9 @@
<target name="all.ide" description="Debug IDE build including all junit tests, but don't tag the build or create archives" depends="init.debug, base.compile, tag.build, junit.compile" />
<target name="clean" depends="init">
- <delete includeEmptyDirs="true">
+ <delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${build}" />
+ <fileset dir="${project.root}/build-temp" />
<fileset dir="${project.root}" includes="make/GnuCTreeParserTokenTypes.txt make/STDCTokenTypes.txt" />
</delete>
</target>
@@ -1244,11 +1258,11 @@
<echo message='gluegen.build.sha.natives=${gluegen.build.sha.natives}${line.separator}' file="${build}/artifact.properties" append="true"/>
</target>
- <target name="junit.compile" depends="init">
+ <target name="junit.compile" depends="init" if="${build.dynamiclibs}">
<ant antfile="build-test.xml" target="junit.compile"/>
</target>
- <target name="junit.run" depends="init,junit.compile">
+ <target name="junit.run" depends="init,junit.compile" if="${build.dynamiclibs}">
<ant antfile="build-test.xml" target="junit.run"/>
</target>
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index e31707a..7aee9c9 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -56,6 +56,9 @@
- isLinuxSparc
- isOSX
- isOSXPPC
+ - isIOS
+ - isIOSAmd64
+ - isIOSArm64
- isSolaris
- isSolaris32Bit
- isSolaris64Bit
@@ -70,15 +73,21 @@
- jvmDataModel32Bit
- jvmDataModel.arg either one of [ "-d64", "-d32" or "-Djnlp.no.jvm.data.model.set=true" ]
+
+ - build.dynamiclibs
+ - build.staticlibs (usually = !build.dynamiclibs)
+ - output.lib.type
+
-
- - isX11 is set if: !isWindows && !isOSX && !noX11
+ - isX11 is set if: !isWindows && !isOSX !isIOS && !noX11
-
- It also sets the following properties which are useful for
- building native library jar files for Java Web Start and
- understanding on what OS and architecture things are being built.
-
- os.and.arch (i.e., "windows-i586")
- - native.library.suffix (i.e.., "so", "dll")
+ - native.library.prefix (i.e.., "lib", "")
+ - native.library.suffix (i.e.., "so", "dll", "dylib")
-
- The gluegen.cpptasks.setup.compiler target is the preferred target
- to depend upon in your build.xml. It depends on gluegen.cpptasks.detect.compiler
@@ -148,6 +157,8 @@
- compiler.cfg.win32.mingw
- compiler.cfg.win32.msvc
- compiler.cfg.macosx
+ - compiler.cfg.ios.amd64
+ - compiler.cfg.ios.arm64
- compiler.cfg.freebsd
- compiler.cfg.hpux
- linker.cfg.linux
@@ -173,6 +184,8 @@
- linker.cfg.win32.mingw
- linker.cfg.win32.msvc
- linker.cfg.macosx
+ - linker.cfg.ios.amd64
+ - linker.cfg.ios.arm64
- linker.cfg.hpux
-
- This project file also defines a macrodef called "msvc.manifest"
@@ -255,6 +268,8 @@
<condition property="is64Bit">
<or>
<istrue value="${isAMD64}" />
+ <istrue value="${isIOSAmd64}"/>
+ <istrue value="${isIOSArm64}"/>
<os arch="IA64" />
<os arch="sparcv9" />
<os arch="armv8a" />
@@ -262,10 +277,19 @@
</or>
</condition>
+ <condition property="isIOS">
+ <or>
+ <istrue value="${isIOSAmd64}"/>
+ <istrue value="${isIOSArm64}"/>
+ </or>
+ </condition>
<condition property="isOSX">
<and>
<os family="mac"/>
<os family="unix"/>
+ <not>
+ <istrue value="${isIOS}"/>
+ </not>
</and>
</condition>
<condition property="isUnix">
@@ -532,6 +556,7 @@
<and>
<isfalse value="${isWindows}" />
<isfalse value="${isOSX}" />
+ <isfalse value="${isIOS}" />
<isfalse value="${isAndroid}" />
<isfalse value="${noX11}" />
</and>
@@ -563,6 +588,9 @@
<condition property="jvmDataModel.arg" value="-d64"><isset property="jvmDataModel64Bit"/></condition>
<condition property="jvmDataModel.arg" value="-d32"><isset property="jvmDataModel32Bit"/></condition>
<property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" /> <!-- dummy placeholder, valid jvm arg, won't override above spec -->
+ <condition property="build.dynamiclibs" value="false" else="true"><istrue value="${isIOS}"/></condition>
+ <condition property="build.staticlibs" value="false" else="true"><istrue value="${build.dynamiclibs}"/></condition>
+ <condition property="output.lib.type" value="shared" else="static"><istrue value="${build.dynamiclibs}"/></condition>
</target>
<target name="gluegen.cpptasks.detect.os.refine" unless="gluegen.cpptasks.detected.os.2">
@@ -633,6 +661,9 @@
<echo message="OS X PPC=${use.macosppc}" />
<echo message="OS X x32=${use.macosx32}" />
<echo message="OS X x64=${use.macosx64}" />
+ <echo message="iOS=${isIOS}" />
+ <echo message="iOSAmd64=${isIOSAmd64}" />
+ <echo message="iOSArm64=${isIOSArm64}" />
<echo message="Solaris=${isSolaris}" />
<echo message="Solaris32Bit=${isSolaris32Bit}" />
<echo message="Solaris64Bit=${isSolaris64Bit}" />
@@ -646,6 +677,9 @@
<echo message="os=${os.name}" />
<echo message="os=${os.version}" />
<echo message="arch=${os.arch}" />
+ <echo message="build.dynamiclibs=${build.dynamiclibs}" />
+ <echo message="build.staticlibs=${build.staticlibs}" />
+ <echo message="output.lib.type=${output.lib.type}" />
</target>
<!-- Consult jogamp.common.os.PlatformPropsImpl.getOSAndArch(..) to complete/sync mapping! -->
@@ -747,10 +781,23 @@
<target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
- <property name="native.library.suffix" value="*lib" />
+ <property name="native.library.prefix" value="lib" />
+ <property name="native.library.suffix" value="dylib" />
<property name="os.and.arch" value="macosx-universal" />
</target>
+ <target name="gluegen.cpptasks.detect.os.ios.amd64" unless="gluegen.cpptasks.detected.os.2" if="isIOSAmd64">
+ <property name="native.library.prefix" value="lib" />
+ <property name="native.library.suffix" value="a" />
+ <property name="os.and.arch" value="ios-amd64" />
+ </target>
+
+ <target name="gluegen.cpptasks.detect.os.ios.arch64" unless="gluegen.cpptasks.detected.os.2" if="isIOSArm64">
+ <property name="native.library.prefix" value="lib" />
+ <property name="native.library.suffix" value="a" />
+ <property name="os.and.arch" value="ios-arm64" />
+ </target>
+
<target name="gluegen.cpptasks.detect.os.solaris.sparc" unless="gluegen.cpptasks.detected.os.2" if="isSolarisSparc">
<property name="os.and.arch" value="solaris-sparc" />
</target>
@@ -770,6 +817,7 @@
<target name="gluegen.cpptasks.detect.os.solaris" depends="gluegen.cpptasks.detect.os.solaris.sparc,gluegen.cpptasks.detect.os.solaris.sparcv9,gluegen.cpptasks.detect.os.solaris.amd64,gluegen.cpptasks.detect.os.solaris.x86" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.unix" unless="gluegen.cpptasks.detected.os.2" if="isUnix">
+ <property name="native.library.prefix" value="lib" />
<property name="native.library.suffix" value="so" />
</target>
@@ -782,10 +830,11 @@
</target>
<target name="gluegen.cpptasks.detect.os.windows" depends="gluegen.cpptasks.detect.os.windows.amd64,gluegen.cpptasks.detect.os.windows.x86" unless="gluegen.cpptasks.detected.os.2" if="isWindows">
+ <property name="native.library.prefix" value="" />
<property name="native.library.suffix" value="dll" />
</target>
- <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.refine,gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os.2">
+ <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.refine,gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.ios.amd64,gluegen.cpptasks.detect.os.ios.arch64,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os.2">
<propertyregex property="os.and.arch.dot"
input="${os.and.arch}"
regexp="-"
@@ -811,6 +860,10 @@
<isset property="isOSX"/>
</condition>
<condition property="system.env.library.path"
+ value="DYLD_LIBRARY_PATH">
+ <isset property="isIOS"/>
+ </condition>
+ <condition property="system.env.library.path"
value="LD_LIBRARY_PATH">
<isset property="isUnix"/>
</condition>
@@ -822,6 +875,7 @@
<!-- NOTE: the value of the c.strip.tool and c.strip.args attribute will not be overridden if already set externally -->
<property name="c.strip.tool" value="strip" />
<condition property="c.strip.args" value="-S -x"><isset property="isOSX"/></condition>
+ <condition property="c.strip.args" value="-S -x"><isset property="isIOS"/></condition>
<property name="c.strip.args" value="" />
</target>
@@ -1180,6 +1234,36 @@
</defineset>
</compiler>
+ <compiler id="compiler.cfg.ios.amd64" name="${gcc.compat.compiler}">
+ <!-- compilerarg value="-v"/ -->
+ <compilerarg value="-arch"/>
+ <compilerarg value="x86_64"/>
+ <compilerarg value="-Wmost" />
+ <compilerarg value="-ObjC" />
+ <compilerarg value="-miphoneos-version-min=11.0"/>
+ <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ -->
+ <defineset>
+ <define name="_DEBUG" if="c.compiler.use-debug"/>
+ <define name="DEBUG" if="c.compiler.use-debug"/>
+ <define name="NDEBUG" unless="c.compiler.use-debug"/>
+ </defineset>
+ </compiler>
+
+ <compiler id="compiler.cfg.ios.arm64" name="${gcc.compat.compiler}">
+ <!-- compilerarg value="-v"/ -->
+ <compilerarg value="-arch"/>
+ <compilerarg value="arm64"/>
+ <compilerarg value="-Wmost" />
+ <compilerarg value="-ObjC" />
+ <compilerarg value="-miphoneos-version-min=11.0"/>
+ <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ -->
+ <defineset>
+ <define name="_DEBUG" if="c.compiler.use-debug"/>
+ <define name="DEBUG" if="c.compiler.use-debug"/>
+ <define name="NDEBUG" unless="c.compiler.use-debug"/>
+ </defineset>
+ </compiler>
+
<!-- Windows compiler configuration -->
<!--compiler id="compiler.cfg.linux64.mingw64" classname="net.sf.antcontrib.cpptasks.gcc.Gcc64CCompiler"-->
@@ -1367,7 +1451,7 @@
<!-- MacOSX linker configuration -->
<linker id="linker.cfg.macosx" name="${gcc.compat.compiler}">
- <!-- Note: Apple doesn't seem to provide ppc binaries on Snow Leopard -->
+ <!-- compilerarg value="-v"/ -->
<linkerarg value="-arch" if="use.macosppc"/>
<linkerarg value="ppc" if="use.macosppc"/>
<linkerarg value="-arch" if="use.macosx32"/>
@@ -1377,7 +1461,24 @@
<linkerarg value="-mmacosx-version-min=10.5"/>
<linkerarg value="-static-libgcc" if="isGCC"/>
<linkerarg value="-static-libstdc++" if="isGCC"/>
- <!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard -->
+ </linker>
+
+ <linker id="linker.cfg.ios.amd64" name="${gcc.compat.compiler}">
+ <!-- compilerarg value="-v"/ -->
+ <linkerarg value="-arch"/>
+ <linkerarg value="x86_64"/>
+ <linkerarg value="-miphoneos-version-min=11.0"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
+ <linkerarg value="-static-libstdc++" if="isGCC"/>
+ </linker>
+
+ <linker id="linker.cfg.ios.arm64" name="${gcc.compat.compiler}">
+ <!-- compilerarg value="-v"/ -->
+ <linkerarg value="-arch"/>
+ <linkerarg value="arm64"/>
+ <linkerarg value="-miphoneos-version-min=11.0"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
+ <linkerarg value="-static-libstdc++" if="isGCC"/>
</linker>
<!-- Windows linker configuration -->
@@ -1631,6 +1732,28 @@
<property name="java.lib.dir.platform" value="/System/Library/Frameworks/JavaVM.framework/Libraries" />
</target>
+ <target name="gluegen.cpptasks.declare.compiler.ios.amd64" if="isIOSAmd64">
+ <echo message="iOSAmd64" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.ios.amd64" />
+ <property name="linker.cfg.id.base" value="linker.cfg.ios.amd64" />
+ <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/libjvm.a"/>
+ </condition>
+ </target>
+
+ <target name="gluegen.cpptasks.declare.compiler.ios.arm64" if="isIOSArm64">
+ <echo message="iOSArm64" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.ios.arm64" />
+ <property name="linker.cfg.id.base" value="linker.cfg.ios.arm64" />
+ <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/libjvm.a"/>
+ </condition>
+ </target>
+
<target name="gluegen.cpptasks.declare.compiler.freebsd.x86" if="isFreeBSDX86">
<echo message="FreeBSD" />
<property name="compiler.cfg.id.base" value="compiler.cfg.freebsd" />
@@ -1657,7 +1780,7 @@
<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" >
+ <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.ios.amd64,gluegen.cpptasks.declare.compiler.ios.arm64,gluegen.cpptasks.declare.compiler.freebsd,gluegen.cpptasks.declare.compiler.hpux" >
<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}" />
@@ -1746,4 +1869,23 @@
</delete>
</sequential>
</macrodef>
+
+ <macrodef name="gluegen.make.libsymbols">
+ <attribute name="builddir" />
+ <attribute name="nativelib" />
+ <attribute name="symbolsfile" />
+ <sequential>
+ <!-- invoke nm in a most compatible way, tested on GNU/Linux and MacOS -->
+ <exec executable="nm" dir="@{builddir}" output="@{symbolsfile}.raw">
+ <arg value="--extern-only"/>
+ <arg value="--defined-only"/>
+ <arg value="@{nativelib}"/>
+ </exec>
+ <exec executable="awk" dir="@{builddir}" output="@{symbolsfile}">
+ <arg value="{ print $3 }"/>
+ <arg value="@{symbolsfile}.raw"/>
+ </exec>
+ <delete file="@{symbolsfile}.raw" quiet="true" failonerror="false" />
+ </sequential>
+ </macrodef>
</project>
diff --git a/make/gluegen-properties.xml b/make/gluegen-properties.xml
index 8038de3..54fbc8c 100755
--- a/make/gluegen-properties.xml
+++ b/make/gluegen-properties.xml
@@ -88,10 +88,16 @@
<!-- maybe overriden, e.g. with "clang" -->
<echo message="Setting default gcc.compat.compiler" />
<condition property="gcc.compat.compiler" value="xcode.clang"> <!-- default for OSX -->
- <and>
- <os family="mac"/>
- <os family="unix"/>
- </and>
+ <or>
+ <istrue value="${isOSX}"/>
+ <istrue value="${isIOS}"/>
+ <istrue value="${isIOSAmd64}"/>
+ <istrue value="${isIOSArm64}"/>
+ <and>
+ <os family="mac"/>
+ <os family="unix"/>
+ </and>
+ </or>
</condition>
<property name="gcc.compat.compiler" value="gcc"/> <!-- default for all others .. -->
<echo message="gcc.compat.compiler=${gcc.compat.compiler}" />
diff --git a/make/jogamp-androidtasks.xml b/make/jogamp-androidtasks.xml
index 24aea10..82679c4 100644
--- a/make/jogamp-androidtasks.xml
+++ b/make/jogamp-androidtasks.xml
@@ -28,7 +28,7 @@
jarbuilddir="${build}" // jar build location
jarbasename="gluegen-rt" // jar base file name
nativebuilddir="${gluegen.lib.dir}" // native library build location
- nativebasename="gluegen-rt" // native library base file name "*${nativebasename}*.${native.library.suffix}"
+ nativebasename="${output.lib.name}" // native library base file name "*${nativebasename}*.${native.library.suffix}"
androidmanifest.path="resources/android/AndroidManifest.xml"
androidresources.path="resources/android/res"
jarmanifest.path="${build}/Manifest-rt.temp" // optional
diff --git a/make/lib/cpptasks.jar b/make/lib/cpptasks.jar
index 44a82ed..152e69d 100644
--- a/make/lib/cpptasks.jar
+++ b/make/lib/cpptasks.jar
Binary files differ
diff --git a/make/scripts/make.gluegen.all.ios.amd64.sh b/make/scripts/make.gluegen.all.ios.amd64.sh
new file mode 100755
index 0000000..67831d3
--- /dev/null
+++ b/make/scripts/make.gluegen.all.ios.amd64.sh
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+if [ -e /opt-share/etc/profile.ant ] ; then
+ . /opt-share/etc/profile.ant
+fi
+
+# -Dc.compiler.debug=true
+#
+# -Dtarget.sourcelevel=1.6 \
+# -Dtarget.targetlevel=1.6 \
+# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
+# Force OSX SDK 10.6, if desired
+# export SDKROOT=macosx10.6
+
+export SDKROOT=iphonesimulator12.2
+xcrun --show-sdk-path
+
+JAVA_HOME=`/usr/libexec/java_home -version 1.8`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+which java
+java -version
+
+export SOURCE_LEVEL=1.6
+export TARGET_LEVEL=1.6
+export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+ -Drootrel.build=build-ios-amd64 \
+ -DisIOSAmd64=true \
+ $* 2>&1 | tee make.gluegen.all.ios-amd64.log
diff --git a/make/scripts/make.gluegen.all.ios.arm64.sh b/make/scripts/make.gluegen.all.ios.arm64.sh
new file mode 100755
index 0000000..77cc1e9
--- /dev/null
+++ b/make/scripts/make.gluegen.all.ios.arm64.sh
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+if [ -e /opt-share/etc/profile.ant ] ; then
+ . /opt-share/etc/profile.ant
+fi
+
+# -Dc.compiler.debug=true
+#
+# -Dtarget.sourcelevel=1.6 \
+# -Dtarget.targetlevel=1.6 \
+# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
+# Force OSX SDK 10.6, if desired
+# export SDKROOT=macosx10.6
+
+export SDKROOT=iphoneos12.2
+xcrun --show-sdk-path
+
+JAVA_HOME=`/usr/libexec/java_home -version 1.8`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+which java
+java -version
+
+export SOURCE_LEVEL=1.6
+export TARGET_LEVEL=1.6
+export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+ -Drootrel.build=build-ios-arm64 \
+ -DisIOSArm64=true \
+ $* 2>&1 | tee make.gluegen.all.ios-arm64.log
diff --git a/make/stub_includes/jni/jni.h b/make/stub_includes/jni/jni.h
index b4c6c1d..eac2640 100644
--- a/make/stub_includes/jni/jni.h
+++ b/make/stub_includes/jni/jni.h
@@ -164,6 +164,7 @@ typedef long JNIEnv;
#define JDK1_2
#define JDK1_4
+#define JDK1_8
#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
@@ -171,6 +172,7 @@ typedef long JNIEnv;
#define JNI_VERSION_1_2 0x00010002
#define JNI_VERSION_1_4 0x00010004
#define JNI_VERSION_1_6 0x00010006
+#define JNI_VERSION_1_8 0x00010008
#else /* __GLUEGEN__ */
@@ -1859,6 +1861,7 @@ typedef struct JavaVMAttachArgs {
#define JDK1_2
#define JDK1_4
+#define JDK1_8
struct JNIInvokeInterface_ {
void *reserved0;
@@ -1923,6 +1926,7 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
#define JNI_VERSION_1_2 0x00010002
#define JNI_VERSION_1_4 0x00010004
#define JNI_VERSION_1_6 0x00010006
+#define JNI_VERSION_1_8 0x00010008
#endif /* __GLUEGEN__ */