[Android] Configure: do not hardcode the libraries flags anymore

Jean-Baptiste Kempf git at videolan.org
Mon Aug 8 15:16:35 CEST 2016


vlc-android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug  8 15:14:32 2016 +0200| [8f2be66137f886178fcce38ebf106a286982007d] | committer: Jean-Baptiste Kempf

Configure: do not hardcode the libraries flags anymore

This is using all the .pc and adjusting because some order matter (ebml,
avcodec) and because some don't have a .pc file

> https://code.videolan.org/videolan/vlc-android/commit/8f2be66137f886178fcce38ebf106a286982007d
---

 compile-libvlc.sh     |  2 ++
 libvlc/jni/Android.mk | 23 +++--------------------
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index abe1884..b103202 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -633,6 +633,7 @@ VLC_MODULES=$(find_modules ${REDEFINED_VLC_MODULES_DIR})
 VLC_SRC_DIR="$SRC_DIR/vlc"
 ANDROID_SYS_HEADERS="$SRC_DIR/android-headers"
 VLC_CONTRIB="$VLC_SRC_DIR/contrib/$TARGET_TUPLE"
+VLC_CONTRIB_LDFLAGS=`for i in $(/bin/ls $VLC_CONTRIB/lib/pkgconfig/*.pc); do pkg-config --libs $i; done |xargs`
 
 if [ "${CHROME_OS}" != "1" ];then
     if [ "${HAVE_64}" != 1 ];then
@@ -659,6 +660,7 @@ $ANDROID_NDK/ndk-build -C libvlc \
     ANDROID_SYS_HEADERS="$ANDROID_SYS_HEADERS" \
     VLC_BUILD_DIR="$VLC_SRC_DIR/$VLC_BUILD_DIR" \
     VLC_CONTRIB="$VLC_CONTRIB" \
+    VLC_CONTRIB_LDFLAGS="$VLC_CONTRIB_LDFLAGS" \
     VLC_MODULES="$VLC_MODULES" \
     TARGET_CFLAGS="$EXTRA_CFLAGS" \
     EXTRA_LDFLAGS="$EXTRA_LDFLAGS" \
diff --git a/libvlc/jni/Android.mk b/libvlc/jni/Android.mk
index 8b5e56e..f3bd0c7 100644
--- a/libvlc/jni/Android.mk
+++ b/libvlc/jni/Android.mk
@@ -13,28 +13,11 @@ LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
 	$(VLC_BUILD_DIR)/lib/.libs/libvlc.a \
 	$(VLC_BUILD_DIR)/src/.libs/libvlccore.a \
 	$(VLC_BUILD_DIR)/compat/.libs/libcompat.a \
+	$(VLC_CONTRIB_LDFLAGS) \
 	-ldl -lz -lm -llog \
-	-ldvbpsi -lmatroska -lebml -ltag \
-	-logg -lFLAC -ltheora -lvorbis \
-	-la52 -lsoxr \
-	-lavformat -lavcodec -lswscale -lavutil -lpostproc -lgsm -lopenjpeg \
 	-lliveMedia -lUsageEnvironment -lBasicUsageEnvironment -lgroupsock \
-	-lspeex -lspeexdsp \
-	-lxml2 -lpng -lgnutls -lgcrypt -lgpg-error \
-	-lnettle -lhogweed -lgmp \
-	-liconv -lass -lfribidi -lopus \
-	-lharfbuzz -lfreetype \
-	-lEGL -lGLESv2 -ljpeg \
-	-ldvdnav -ldvdread -ldvdcss \
-	-ldsm -ltasn1 \
-	-lzvbi \
-	-lssh2 -lnfs \
-	-lmodplug \
-	-lupnp -lthreadutil -lixml \
-	-larchive \
-	-lmpg123 \
-	-llua \
-	-lmicrodns \
+	-la52 -ljpeg \
+	-lavcodec -lebml \
 	$(EXTRA_LDFLAGS)
 
 ifeq ($(HAVE_LIBCOMPAT), 1)



More information about the Android mailing list