mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
android: build client lib for x86 (for emulator)
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
This commit is contained in:
parent
8e501c5373
commit
d3da3dfeb0
@ -31,7 +31,7 @@ fi
|
||||
echo SWIG
|
||||
swig -c++ -java -package $pkg -I$O3/core/client -I$O3/core ovpncli.i
|
||||
|
||||
for TARGET in android-a7a android-a8a ; do
|
||||
for TARGET in android-a7a android-a8a android-x86; do
|
||||
|
||||
if [ "$DEBUG_BUILD" = "1" ]; then
|
||||
. ../vars/vars-${TARGET}-dbg
|
||||
|
@ -15,7 +15,10 @@ cd $DEP_DIR
|
||||
rm -rf lz4
|
||||
mkdir lz4
|
||||
|
||||
for target in android-a8a android-a8a-dbg android-a7a android-a7a-dbg android android-dbg ; do
|
||||
for target in android-a8a android-a8a-dbg \
|
||||
android-a7a android-a7a-dbg \
|
||||
android android-dbg \
|
||||
android-x86 ; do
|
||||
echo '***************' TARGET $target
|
||||
TARGET=$target $O3/core/deps/lz4/build-lz4
|
||||
done
|
||||
|
@ -17,7 +17,10 @@ mini=0
|
||||
|
||||
rm -rf mbedtls
|
||||
|
||||
for target in android-a8a android-a8a-dbg android-a7a android-a7a-dbg android android-dbg ; do
|
||||
for target in android-a8a android-a8a-dbg \
|
||||
android-a7a android-a7a-dbg \
|
||||
android android-dbg \
|
||||
android-x86; do
|
||||
echo '***************' TARGET $target
|
||||
VERBOSE=1 TARGET=$target CMAKE_TARGET=android USE_MINICRYPTO=$mini MINICRYPTO_DIR=$(pwd)/minicrypto/minicrypto-$target $O3/core/deps/mbedtls/build-mbedtls
|
||||
[ "$ANDROID_DBG_ONLY" = "1" ] && exit
|
||||
|
@ -39,9 +39,28 @@ $NDK/build/tools/make-standalone-toolchain.sh \
|
||||
--toolchain=$ABI-$ABI_VER \
|
||||
--stl=gnustl \
|
||||
--arch=arm \
|
||||
--platform=android-14 \
|
||||
--platform=android-26 \
|
||||
--install-dir=$DEST
|
||||
cd $DEST/$ABI/bin
|
||||
ln -s ../../bin/$ABI-gcc cc
|
||||
ln -s ../../libexec/gcc/$ABI/$ABI_VER.x/cc1 cc1
|
||||
ln -s ../../libexec/gcc/$ABI/$ABI_VER.x/cc1plus cc1plus
|
||||
|
||||
# 32 bit x86 for Android emulator
|
||||
cd $DEP_DIR
|
||||
DEST=$(pwd)/tc-x86
|
||||
rm -rf $DEST
|
||||
ABI=x86-linux-android
|
||||
SUB=i686-linux-android
|
||||
ABI_VER=4.9
|
||||
$NDK/build/tools/make-standalone-toolchain.sh \
|
||||
--verbose \
|
||||
--toolchain=$ABI-$ABI_VER \
|
||||
--stl=gnustl \
|
||||
--arch=x86 \
|
||||
--platform=android-26 \
|
||||
--install-dir=$DEST
|
||||
cd $DEST/$SUB/bin
|
||||
ln -s ../../bin/$SUB-gcc cc
|
||||
ln -s ../../libexec/gcc/$SUB/$ABI_VER.x/cc1 cc1
|
||||
ln -s ../../libexec/gcc/$SUB/$ABI_VER.x/cc1plus cc1plus
|
||||
|
15
vars/vars-android-x86
Normal file
15
vars/vars-android-x86
Normal file
@ -0,0 +1,15 @@
|
||||
[ -z "$DEP_DIR" ] && export DEP_DIR=$HOME/src/android
|
||||
export PLATFORM=android-x86
|
||||
export ABI=x86
|
||||
export DEBUG_BUILD=0
|
||||
export OTHER_COMPILER_FLAGS=""
|
||||
export CXX_COMPILER_FLAGS="-std=c++1y"
|
||||
export LIB_OPT_LEVEL="-O3"
|
||||
export LIB_FPIC="-fPIC"
|
||||
export TC=$DEP_DIR/tc-x86
|
||||
export PLATFORM_FLAGS="-march=i686 -fomit-frame-pointer --sysroot=$TC/sysroot"
|
||||
export GPP_CMD="$TC/bin/i686-linux-android-g++"
|
||||
export GCC_CMD="$TC/bin/i686-linux-android-gcc"
|
||||
|
||||
[ -z "$VARS_SAVE_PATH" ] && VARS_SAVE_PATH="$PATH"
|
||||
export PATH="$TC/bin:$TC/i686-linux-android/bin:$VARS_SAVE_PATH"
|
Loading…
Reference in New Issue
Block a user