Files
mpp/build/android/arm/make-Android.bash
Ding Wei 785b0f220d [cmake]: Partly merged Android and Linux branch
Use libmpp.so / libvpu.so on Android.
Use librockchip_mpp.so / librockchip_vpu.so

In early stage we use libmpp.so / libvpu.so on Android. later we found
it is better to use vendor name as library prefix. So we fix the name
rule on Linux platform.

But due to historical reason we can not change all sdk to use the same
name. So we choose to use this ugly method to define the name according
to different target platform.

Also we add version to library but Android has binary name issue so we
have to disable version on Android platform.

Change-Id: I785c3bc740f345e473f2d81c5cd2a4e32a1bf0bc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-12-18 15:15:07 +08:00

50 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Run this from within a bash shell
HOST_IP=`hostname --all-ip-addresses`
if [ ${HOST_IP} == "10.10.10.65" ] || [ ${HOST_IP} == "10.10.10.67" ]; then
ANDROID_NDK=/home/pub/ndk/android-ndk-r10d/
else
ANDROID_NDK=~/work/android/ndk/android-ndk-r10d/
fi
PLATFORM=$ANDROID_NDK/platforms/android-21/arch-arm
cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_FORCE_ARM_BUILD=ON \
-DANDROID_NDK=${ANDROID_NDK} \
-DANDROID_SYSROOT=${PLATFORM} \
-DANDROID_ABI="armeabi-v7a with NEON" \
-DANDROID_TOOLCHAIN_NAME="arm-linux-androideabi-4.8" \
-DANDROID_NATIVE_API_LEVEL=android-21 \
-DANDROID_STL=system \
-DCMAKE_RKPLATFORM_ENABLE=ON \
../../../
# ----------------------------------------------------------------------------
# usefull cmake debug flag
# ----------------------------------------------------------------------------
#-DMPP_NAME="rockchip_mpp" \
#-DVPU_NAME="rockchip_vpu" \
#-DHAVE_DRM \
#-DCMAKE_BUILD_TYPE=Debug \
#-DCMAKE_VERBOSE_MAKEFILE=true \
#--trace \
#--debug-output \
#cmake --build . --clean-first -- V=1
cmake --build .
# ----------------------------------------------------------------------------
# test script
# ----------------------------------------------------------------------------
#adb push osal/test/rk_log_test /system/bin/
#adb push osal/test/rk_thread_test /system/bin/
#adb shell sync
#adb shell logcat -c
#adb shell rk_log_test
#adb shell rk_thread_test
#adb logcat -d|tail -30