libetpan - fdik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.3 KiB

#!/bin/bash
build_version=1
ANDROID_PLATFORM=android-18
archs="armeabi armeabi-v7a arm64-v8a x86 x86_64"
package_name=libetpan-android
current_dir="`pwd`"
if test "x$ANDROID_NDK" = x ; then
echo should set ANDROID_NDK before running this script.
exit 1
fi
function build {
rm -rf "$current_dir/obj"
cd "$current_dir/jni"
$ANDROID_NDK/ndk-build TARGET_PLATFORM=$ANDROID_PLATFORM TARGET_ARCH_ABI=$TARGET_ARCH_ABI \
ICONV_PATH=$ICONV_PREFIX
# Copy lib to arch/lib
mkdir -p "$current_dir/$package_name-$build_version/$TARGET_ARCH_ABI/lib"
cp "$current_dir/obj/local/$TARGET_ARCH_ABI/libetpan.a" "$current_dir/$package_name-$build_version/$TARGET_ARCH_ABI/lib"
rm -rf "$current_dir/obj"
}
cd "$current_dir/.."
tar xzf "$current_dir/../build-mac/autogen-result.tar.gz"
./configure
make stamp-prepare
# Copy public headers to include
cp -RL include/libetpan "$current_dir/include"
mkdir -p "$current_dir/$package_name-$build_version/$TARGET_ARCH_ABI/include"
cp -RL include/libetpan "$current_dir/$package_name-$build_version/$TARGET_ARCH_ABI/include"
# Start building.
ANDROID_PLATFORM=android-18
archs="armeabi armeabi-v7a x86"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
done
ANDROID_PLATFORM=android-21
archs="arm64-v8a x86_64"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
done