[vlc-devel] [PATCH] Put NDK v7 check into environment

Rafaël Carré funman at videolan.org
Sat Jan 28 20:05:10 CET 2012


Le 2012-01-28 14:01, Edward Wang a écrit :
> Alleviates the need to modify files
> ---
>  compile.sh                 |    7 ++++++-
>  vlc-android/jni/Android.mk |    8 +++-----
>  2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/compile.sh b/compile.sh
> index 561b563..7280c22 100755
> --- a/compile.sh
> +++ b/compile.sh
> @@ -10,7 +10,8 @@
>  # export NO_NEON=1
>  # make sure it is set for both the contribs bootstrap next and the configure.sh later.
>  
> -# Also, if you do not have NDK v7 or later, then set HAS_NDK_V7 to 0 in vlc-android/jni/Android.mk:10
> +# Also, if you do not have NDK v7 or later, then run the following:
> +# export NO_NDK_V7=1
>  # to prevent this error message in your compile:
>  # arm-linux-androideabi-g++: /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_static.a: No such file or directory
>  
> @@ -20,6 +21,10 @@ if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
>     exit 1
>  fi
>  
> +if [ -z "$NO_NDK_V7" ]; then
> +    export NO_NDK_V7=0
> +fi

I would just check if the variable is defined at all, like we do for NO_NEON

> +
>  # Add the NDK toolchain to the PATH, needed both for contribs and for building
>  # stub libraries
>  export PATH=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin:${PATH}
> diff --git a/vlc-android/jni/Android.mk b/vlc-android/jni/Android.mk
> index b1183b4..9c378a8 100644
> --- a/vlc-android/jni/Android.mk
> +++ b/vlc-android/jni/Android.mk
> @@ -7,18 +7,16 @@ LOCAL_SRC_FILES := libvlcjni.c aout.c thumbnailer.c
>  
>  LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include
>  
> -HAS_NDK_V7 = 1
> -
>  ifeq ($(NO_NEON),)
>  ARCH=armeabi-v7a
>  else
>  ARCH=armeabi
>  endif
>  
> -ifeq ($(HAS_NDK_V7),1)
> -CPP_STATIC=$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ARCH)/libgnustl_static.a
> -else
> +ifeq ($(NO_NDK_V7),1)
>  CPP_STATIC=$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ARCH)/libstdc++.a
> +else
> +CPP_STATIC=$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ARCH)/libgnustl_static.a
>  endif
>  
>  LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \




More information about the vlc-devel mailing list