Commit 52c1f9d3 authored by Thomas Guillem's avatar Thomas Guillem

build: add --no-ml to disable medialibrary

parent b775dbba
...@@ -18,6 +18,7 @@ checkfail() ...@@ -18,6 +18,7 @@ checkfail()
MEDIALIBRARY_HASH=6bfe3c19 MEDIALIBRARY_HASH=6bfe3c19
BUILD_ML=1
RELEASE=0 RELEASE=0
ASAN=0 ASAN=0
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
...@@ -37,6 +38,9 @@ while [ $# -gt 0 ]; do ...@@ -37,6 +38,9 @@ while [ $# -gt 0 ]; do
--asan) --asan)
ASAN=1 ASAN=1
;; ;;
--no-ml)
BUILD_ML=0
;;
release|--release) release|--release)
RELEASE=1 RELEASE=1
;; ;;
...@@ -705,6 +709,8 @@ fi ...@@ -705,6 +709,8 @@ fi
# MEDIALIBRARY # # MEDIALIBRARY #
################ ################
if [ ${BUILD_ML} = "1" ];then
if [ ! -d "${SRC_DIR}/medialibrary" ]; then if [ ! -d "${SRC_DIR}/medialibrary" ]; then
mkdir "${SRC_DIR}/medialibrary" mkdir "${SRC_DIR}/medialibrary"
fi fi
...@@ -849,6 +855,8 @@ fi ...@@ -849,6 +855,8 @@ fi
# LINKING # # LINKING #
########### ###########
fi # ${BUILD_ML} = "1"
echo -e "ndk-build vlc" echo -e "ndk-build vlc"
$ANDROID_NDK/ndk-build$OSCMD -C libvlc \ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
...@@ -867,7 +875,8 @@ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \ ...@@ -867,7 +875,8 @@ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_ABI=${ANDROID_ABI} \ APP_ABI=${ANDROID_ABI} \
NDK_PROJECT_PATH=jni \ NDK_PROJECT_PATH=jni \
NDK_TOOLCHAIN_VERSION=clang \ NDK_TOOLCHAIN_VERSION=clang \
NDK_DEBUG=${NDK_DEBUG} NDK_DEBUG=${NDK_DEBUG} \
BUILD_ML=${BUILD_ML}
$ANDROID_NDK/ndk-build$OSCMD -C libvlc \ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_BUILD_SCRIPT=jni/loader/Android.mk \ APP_BUILD_SCRIPT=jni/loader/Android.mk \
......
...@@ -68,6 +68,9 @@ while [ $# -gt 0 ]; do ...@@ -68,6 +68,9 @@ while [ $# -gt 0 ]; do
--asan) --asan)
ASAN=1 ASAN=1
;; ;;
--no-ml)
NO_ML=1
;;
*) *)
diagnostic "$0: Invalid option '$1'." diagnostic "$0: Invalid option '$1'."
diagnostic "$0: Try --help for more information." diagnostic "$0: Try --help for more information."
...@@ -260,6 +263,9 @@ fi ...@@ -260,6 +263,9 @@ fi
if [ "$ASAN" = 1 ]; then if [ "$ASAN" = 1 ]; then
OPTS="$OPTS --asan" OPTS="$OPTS --asan"
fi fi
if [ "$NO_ML" = 1 ]; then
OPTS="$OPTS --no-ml"
fi
./compile-libvlc.sh $OPTS ./compile-libvlc.sh $OPTS
......
...@@ -37,9 +37,14 @@ LOCAL_LDLIBS := \ ...@@ -37,9 +37,14 @@ LOCAL_LDLIBS := \
$(VLC_LDFLAGS) \ $(VLC_LDFLAGS) \
-llog -llog
LOCAL_WHOLE_STATIC_LIBRARIES := libvlcjni_static libmla LOCAL_WHOLE_STATIC_LIBRARIES := libvlcjni_static
ifeq ($(BUILD_ML), 1)
LOCAL_WHOLE_STATIC_LIBRARIES += libmla
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
ifeq ($(BUILD_ML), 1)
JNILOADER_INCLUDES := $(LOCAL_PATH)/loader JNILOADER_INCLUDES := $(LOCAL_PATH)/loader
$(call import-add-path, $(MEDIALIBRARY_JNI_DIR)) $(call import-add-path, $(MEDIALIBRARY_JNI_DIR))
$(call import-module, .) $(call import-module, .)
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment