summaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml52
1 files changed, 33 insertions, 19 deletions
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>