[Android] Use a complete path for VLC_SRC_DIR

Jean-Baptiste Kempf git at videolan.org
Thu Feb 5 17:34:38 CET 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  5 17:34:20 2015 +0100| [8e4a46f5fca603b7aaad54fa75a6c66a299a4436] | committer: Jean-Baptiste Kempf

Use a complete path for VLC_SRC_DIR

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8e4a46f5fca603b7aaad54fa75a6c66a299a4436
---

 compile-libvlc.sh     |    9 +++++----
 libvlc/jni/Android.mk |    6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index d06ff2e..22a146d 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -89,6 +89,7 @@ else
 fi
 
 SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
+SRC_DIR=$PWD
 
 ###############
 # DISPLAY ABI #
@@ -441,7 +442,7 @@ echo "Building"
 make $MAKEFLAGS
 checkfail "vlc: make failed"
 
-cd ../..
+cd $SRC_DIR
 
 
 ######################################################################################
@@ -471,8 +472,8 @@ printf "/* Autogenerated from the list of modules */\n $DEFINITION\n $BUILTINS\n
 echo $VLC_BUILD_DIR
 LIBVLC_LIBS="libvlcjni"
 VLC_MODULES=`echo $VLC_MODULES|sed "s|vlc/$VLC_BUILD_DIR|../vlc/$VLC_BUILD_DIR|g"`
-VLC_SRC_DIR="../vlc"
-ANDROID_SYS_HEADERS="../android-headers"
+VLC_SRC_DIR="$SRC_DIR/vlc"
+ANDROID_SYS_HEADERS="$SRC_DIR/android-headers"
 VLC_CONTRIB="$VLC_SRC_DIR/contrib/$TARGET_TUPLE"
 
 echo "Building NDK"
@@ -490,4 +491,4 @@ $ANDROID_NDK/ndk-build -C libvlc \
     APP_PLATFORM=${ANDROID_API} \
     APP_ABI=${ANDROID_ABI} \
     SYSROOT=${SYSROOT} \
-    NDK_PROJECT_PATH=jni
+    NDK_PROJECT_PATH=jni V=1
diff --git a/libvlc/jni/Android.mk b/libvlc/jni/Android.mk
index 5d41a74..06f6b79 100644
--- a/libvlc/jni/Android.mk
+++ b/libvlc/jni/Android.mk
@@ -61,7 +61,7 @@ endif
 ifeq ($(ARCH), armeabi-v7a)
 	LOCAL_CFLAGS += -DHAVE_ARMEABI_V7A
 endif
-ifneq (,$(wildcard $(LOCAL_PATH)/../$(VLC_SRC_DIR)/modules/video_output/android/nativewindowpriv.c))
+ifneq (,$(wildcard $(VLC_SRC_DIR)/modules/video_output/android/nativewindowpriv.c))
 	LOCAL_CFLAGS += -DHAVE_IOMX_DR
 endif
 LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
@@ -155,7 +155,7 @@ endif
 define build_iomx
 include $(CLEAR_VARS)
 LOCAL_MODULE := $(1)
-LOCAL_SRC_FILES  := ../$(VLC_SRC_DIR)/modules/codec/omxil/iomx.cpp
+LOCAL_SRC_FILES  := $(VLC_SRC_DIR)/modules/codec/omxil/iomx.cpp
 LOCAL_C_INCLUDES := $(LIBIOMX_INCLUDES_$(2))
 LOCAL_LDLIBS     := -L$(ANDROID_PRIVATE_LIBDIR) -lgcc -lstagefright -lmedia -lutils -lbinder -llog -lcutils -lui
 LOCAL_CFLAGS     := -Wno-psabi -DAPP_PLATFORM=$(2)
@@ -171,7 +171,7 @@ $(foreach IOMX_MODULE, $(LIBIOMX_LIBS), \
 #######
 # ANW #
 #######
-LIBANW_SRC_FILES_COMMON += ../$(VLC_SRC_DIR)/modules/video_output/android/nativewindowpriv.c
+LIBANW_SRC_FILES_COMMON += $(VLC_SRC_DIR)/modules/video_output/android/nativewindowpriv.c
 # Once we always build this with a version of vlc that contains nativewindowpriv.c,
 # we can remove this condition
 ifneq (,$(wildcard $(LOCAL_PATH)/$(LIBANW_SRC_FILES_COMMON)))



More information about the Android mailing list