[Android] build: add NDK_BUILD
Thomas Guillem
git at videolan.org
Tue May 14 16:47:28 CEST 2019
vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May 13 16:17:03 2019 +0200| [08f4dee887232cdffa17cebbcb7b3282407cba4c] | committer: Thomas Guillem
build: add NDK_BUILD
And handle Windows specific command line in one file.
> https://code.videolan.org/videolan/vlc-android/commit/08f4dee887232cdffa17cebbcb7b3282407cba4c
---
compile-libvlc.sh | 4 +++-
compile-medialibrary.sh | 6 +-----
compile.sh | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 7b9e5a890..fc16718d5 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -98,7 +98,9 @@ if [ ! -z "$MSYSTEM_PREFIX" ] ; then
# The make.exe and awk.exe from the toolchain don't work in msys
export PATH="$MSYSTEM_PREFIX/bin:/usr/bin:${NDK_TOOLCHAIN_PATH}:${PATH}"
ON_WINDOWS=1
+ OSCMD=.cmd
fi
+NDK_BUILD=$ANDROID_NDK/ndk-build$OSCMD
##########
# CFLAGS #
@@ -681,7 +683,7 @@ LOCAL_CXXFLAGS := -std=c++11
include $(BUILD_SHARED_LIBRARY)
EOF
-$ANDROID_NDK/ndk-build$OSCMD -C build \
+$NDK_BUILD -C build \
APP_STL="c++_shared" \
APP_CPPFLAGS="-frtti -fexceptions" \
VLC_SRC_DIR="$VLC_SRC_DIR" \
diff --git a/compile-medialibrary.sh b/compile-medialibrary.sh
index b6cf8630f..d0d0d6a8c 100755
--- a/compile-medialibrary.sh
+++ b/compile-medialibrary.sh
@@ -163,11 +163,7 @@ MEDIALIBRARY_LDLIBS="$VLC_OUT_LDLIBS \
-L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3 \
-L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND}"
-if [ $ON_WINDOWS -eq 1 ]; then
- OSCMD=.cmd
-fi
-
-$ANDROID_NDK/ndk-build$OSCMD -C medialibrary \
+$NDK_BUILD -C medialibrary \
APP_STL="c++_shared" \
LOCAL_CPP_FEATURES="rtti exceptions" \
APP_BUILD_SCRIPT=jni/Android.mk \
diff --git a/compile.sh b/compile.sh
index 9b529aac7..e675b628d 100755
--- a/compile.sh
+++ b/compile.sh
@@ -276,7 +276,7 @@ compile() {
AVLC_SOURCED=1 . ./compile-libvlc.sh
avlc_build
- $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
+ $NDK_BUILD -C libvlc \
VLC_SRC_DIR="$VLC_SRC_DIR" \
VLC_BUILD_DIR="$VLC_BUILD_DIR" \
VLC_OUT_LDLIBS="$VLC_OUT_LDLIBS" \
More information about the Android
mailing list