From 0bd5136c2df8407cea7b0dcc7fb1e62432ba18bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 8 Apr 2019 03:36:31 +0200 Subject: Bug 1190: Define TARGET_PLATFORM_SYSROOT TARGET_PLATFORM_USRROOT TARGET_PLATFORM_USRLIBS for crosscompilation Android Crosscompilation Usage: - TARGET_PLATFORM_ROOT -> TARGET_PLATFORM_SYSROOT General - TARGET_PLATFORM_SYSROOT Crosscompiler and system specified 'sysroot' (as in gcc --print-sysroot) - TARGET_PLATFORM_USRROOT Additional optional user headers and libraries for target - TARGET_PLATFORM_USRLIBS Actual location of target user libraries within TARGET_PLATFORM_USRROOT - TARGET_JAVA_LIBS Actual location of the Java libraries within TARGET_PLATFORM_USRROOT --- make/scripts/make.gluegen.all.android-aarch64-cross.sh | 2 +- make/scripts/make.gluegen.all.android-armv6-cross.sh | 2 +- make/scripts/make.gluegen.all.android-x86-cross.sh | 2 +- make/scripts/make.gluegen.all.linux-aarch64-cross.sh | 7 ++++--- make/scripts/make.gluegen.all.linux-aarch64.sh | 5 +++-- make/scripts/make.gluegen.all.linux-armv6hf-cross.sh | 7 ++++--- make/scripts/make.gluegen.all.linux-armv6hf.sh | 5 +++-- make/scripts/make.gluegen.all.linux-ppc64le.sh | 2 +- 8 files changed, 18 insertions(+), 14 deletions(-) (limited to 'make/scripts') diff --git a/make/scripts/make.gluegen.all.android-aarch64-cross.sh b/make/scripts/make.gluegen.all.android-aarch64-cross.sh index 6d46779..189fae3 100755 --- a/make/scripts/make.gluegen.all.android-aarch64-cross.sh +++ b/make/scripts/make.gluegen.all.android-aarch64-cross.sh @@ -37,7 +37,7 @@ HOST_ARCH=linux-x86_64 export TARGET_TRIPLE=aarch64-linux-android export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/prebuilt/${HOST_ARCH} -export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm64 +export TARGET_PLATFORM_SYSROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm64 # Need to add toolchain bins to the PATH. # May need to create symbolic links within $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin diff --git a/make/scripts/make.gluegen.all.android-armv6-cross.sh b/make/scripts/make.gluegen.all.android-armv6-cross.sh index 7c3043f..81bd8a1 100755 --- a/make/scripts/make.gluegen.all.android-armv6-cross.sh +++ b/make/scripts/make.gluegen.all.android-armv6-cross.sh @@ -37,7 +37,7 @@ HOST_ARCH=linux-x86_64 export TARGET_TRIPLE=arm-linux-androideabi export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/prebuilt/${HOST_ARCH} -export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm +export TARGET_PLATFORM_SYSROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm # Need to add toolchain bins to the PATH. export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$PATH" diff --git a/make/scripts/make.gluegen.all.android-x86-cross.sh b/make/scripts/make.gluegen.all.android-x86-cross.sh index 0889ca7..4c12c2f 100755 --- a/make/scripts/make.gluegen.all.android-x86-cross.sh +++ b/make/scripts/make.gluegen.all.android-x86-cross.sh @@ -38,7 +38,7 @@ export TARGET_TRIPLE=i686-linux-android export TOOLCHAIN_NAME=x86 export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TOOLCHAIN_NAME}-${GCC_VERSION}/prebuilt/${HOST_ARCH} -export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-x86 +export TARGET_PLATFORM_SYSROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-x86 # Need to add toolchain bins to the PATH. # May need to create symbolic links within $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin diff --git a/make/scripts/make.gluegen.all.linux-aarch64-cross.sh b/make/scripts/make.gluegen.all.linux-aarch64-cross.sh index 5d050cd..1b39bd3 100755 --- a/make/scripts/make.gluegen.all.linux-aarch64-cross.sh +++ b/make/scripts/make.gluegen.all.linux-aarch64-cross.sh @@ -17,9 +17,10 @@ export PATH # -DisLinuxARM64=true \ # -DisX11=true \ -export TARGET_PLATFORM_ROOT=/opt-linux-arm64 -export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib -export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/aarch64 +export TARGET_PLATFORM_SYSROOT=`gcc --print-sysroot` +export TARGET_PLATFORM_USRROOT=/opt-linux-arm64 +export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib +export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/jre/lib/aarch64 export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64.xml" diff --git a/make/scripts/make.gluegen.all.linux-aarch64.sh b/make/scripts/make.gluegen.all.linux-aarch64.sh index 42c9ad3..e537fde 100755 --- a/make/scripts/make.gluegen.all.linux-aarch64.sh +++ b/make/scripts/make.gluegen.all.linux-aarch64.sh @@ -8,8 +8,9 @@ # -DisX11=true \ # aarch64-linux-gnue == aarch64 triplet -export TARGET_PLATFORM_LIBS=/usr/lib/aarch64-linux-gnu -export TARGET_JAVA_LIBS=/usr/lib/jvm/java-8-openjdk-aarch64/jre/lib/aarch64 +export TARGET_PLATFORM_USRROOT= +export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib/aarch64-linux-gnu +export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/usr/lib/jvm/java-8-openjdk-aarch64/jre/lib/aarch64 export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64-ontarget.xml" diff --git a/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh b/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh index a3f64a5..6b26153 100755 --- a/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh +++ b/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh @@ -28,9 +28,10 @@ export TARGET_IP=panda02 export TARGET_ROOT=/home/jogamp/projects-cross export TARGET_ANT_HOME=/usr/share/ant -export TARGET_PLATFORM_ROOT=/opt-linux-armv6-armhf -export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib -export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/arm +export TARGET_PLATFORM_SYSROOT=`gcc --print-sysroot` +export TARGET_PLATFORM_USRROOT=/opt-linux-armv6-armhf +export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib +export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/jre/lib/arm export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml" diff --git a/make/scripts/make.gluegen.all.linux-armv6hf.sh b/make/scripts/make.gluegen.all.linux-armv6hf.sh index e66f0e0..8f0cca5 100755 --- a/make/scripts/make.gluegen.all.linux-armv6hf.sh +++ b/make/scripts/make.gluegen.all.linux-armv6hf.sh @@ -8,8 +8,9 @@ # -DisX11=true \ # arm-linux-gnueabihf == armhf triplet -export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabihf -export TARGET_JAVA_LIBS=/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm +export TARGET_PLATFORM_USRROOT= +export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib/arm-linux-gnueabihf +export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml" diff --git a/make/scripts/make.gluegen.all.linux-ppc64le.sh b/make/scripts/make.gluegen.all.linux-ppc64le.sh index 0adc5d4..b5243cb 100644 --- a/make/scripts/make.gluegen.all.linux-ppc64le.sh +++ b/make/scripts/make.gluegen.all.linux-ppc64le.sh @@ -11,7 +11,7 @@ MACHINE=ppc64le ARCH=ppc64el TRIPLET=powerpc64le-linux-gnu -export TARGET_PLATFORM_LIBS=/usr/lib/$TRIPLET +export TARGET_PLATFORM_USRLIBS=/usr/lib/$TRIPLET export TARGET_JAVA_LIBS=/usr/lib/jvm/java-7-openjdk-$ARCH/jre/lib/$MACHINE export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-$MACHINE.xml" -- cgit v1.2.3