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

build: add --no-ml to disable medialibrary

parent b775dbba
......@@ -18,6 +18,7 @@ checkfail()
MEDIALIBRARY_HASH=6bfe3c19
BUILD_ML=1
RELEASE=0
ASAN=0
while [ $# -gt 0 ]; do
......@@ -37,6 +38,9 @@ while [ $# -gt 0 ]; do
--asan)
ASAN=1
;;
--no-ml)
BUILD_ML=0
;;
release|--release)
RELEASE=1
;;
......@@ -705,6 +709,8 @@ fi
# MEDIALIBRARY #
################
if [ ${BUILD_ML} = "1" ];then
if [ ! -d "${SRC_DIR}/medialibrary" ]; then
mkdir "${SRC_DIR}/medialibrary"
fi
......@@ -849,6 +855,8 @@ fi
# LINKING #
###########
fi # ${BUILD_ML} = "1"
echo -e "ndk-build vlc"
$ANDROID_NDK/ndk-build$OSCMD -C libvlc \
......@@ -867,7 +875,8 @@ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_ABI=${ANDROID_ABI} \
NDK_PROJECT_PATH=jni \
NDK_TOOLCHAIN_VERSION=clang \
NDK_DEBUG=${NDK_DEBUG}
NDK_DEBUG=${NDK_DEBUG} \
BUILD_ML=${BUILD_ML}
$ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_BUILD_SCRIPT=jni/loader/Android.mk \
......
......@@ -68,6 +68,9 @@ while [ $# -gt 0 ]; do
--asan)
ASAN=1
;;
--no-ml)
NO_ML=1
;;
*)
diagnostic "$0: Invalid option '$1'."
diagnostic "$0: Try --help for more information."
......@@ -260,6 +263,9 @@ fi
if [ "$ASAN" = 1 ]; then
OPTS="$OPTS --asan"
fi
if [ "$NO_ML" = 1 ]; then
OPTS="$OPTS --no-ml"
fi
./compile-libvlc.sh $OPTS
......
......@@ -37,9 +37,14 @@ LOCAL_LDLIBS := \
$(VLC_LDFLAGS) \
-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)
ifeq ($(BUILD_ML), 1)
JNILOADER_INCLUDES := $(LOCAL_PATH)/loader
$(call import-add-path, $(MEDIALIBRARY_JNI_DIR))
$(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