[Android] compile.sh: add "jni" argument

Sébastien Toque git at videolan.org
Wed Mar 20 20:39:28 CET 2013


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Wed Mar 20 16:04:47 2013 +0100| [18c8c2288277a22a59cd5b448bf187aa1453d147] | committer: Sébastien Toque

compile.sh: add "jni" argument

the goal is to build vlc + libvlcjni only.
This is very useful if nothing has changed in contribs/configure and when using eclipse for java.

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

 Makefile   |   14 +++++++++-----
 compile.sh |   17 +++++++++++------
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index e910919..1d8e4d2 100644
--- a/Makefile
+++ b/Makefile
@@ -96,14 +96,18 @@ $(LIBVLCJNI): $(JNI_SOURCES) $(LIBVLCJNI_H) $(PRIVATE_LIBS)
 apkclean:
 	rm -f $(VLC_APK)
 
-clean:
-	cd $(SRC) && rm -rf gen libs obj bin $(VLC_APK)
-	rm -rf java-libs/*/gen java-libs/*/bin
+lightclean:
+	cd $(SRC) && rm -rf libs obj bin $(VLC_APK)
 	rm -f $(PRIVATE_LIBDIR)/*.so $(PRIVATE_LIBDIR)/*.c
 
-distclean: clean
+clean: lightclean
+	rm -rf $(SRC)/gen java-libs/*/gen java-libs/*/bin
+
+jniclean: lightclean
 	rm -f $(LIBVLCJNI) $(LIBVLCJNI_H)
 
+distclean: clean jniclean
+
 install: $(VLC_APK)
 	@echo "=== Installing VLC on device ==="
 	adb wait-for-device
@@ -126,4 +130,4 @@ apkclean-run: apkclean build-and-run
 distclean-run: distclean build-and-run
 	adb logcat -c
 
-.PHONY: clean distclean distclean-run apkclean apkclean-run install run build-and-run
+.PHONY: lightclean clean jniclean distclean distclean-run apkclean apkclean-run install run build-and-run
diff --git a/compile.sh b/compile.sh
index 9d224e0..6c62d4c 100755
--- a/compile.sh
+++ b/compile.sh
@@ -192,11 +192,16 @@ make $MAKEFLAGS
 
 cd ../.. && mkdir -p android && cd android
 
-echo "Bootstraping"
-../bootstrap
-
-echo "Configuring"
-../../configure.sh $OPTS
+if [ $# -eq 1 ] && [ "$1" = "jni" ]; then
+    CLEAN="jniclean"
+    RELEASEFLAG="vlc-android/obj/local/armeabi-v7a/libvlcjni.so"
+else
+    CLEAN="distclean"
+    echo "Bootstraping"
+    ../bootstrap
+    echo "Configuring"
+    ../../configure.sh $OPTS
+fi
 
 echo "Building"
 make $MAKEFLAGS
@@ -214,7 +219,7 @@ export ANDROID_SYS_HEADERS_ICS=${PWD}/android-headers-ics
 export ANDROID_LIBS=${PWD}/android-libs
 export VLC_BUILD_DIR=vlc/android
 
-make distclean
+make $CLEAN
 make -j1 TARGET_TUPLE=$TARGET_TUPLE PLATFORM_SHORT_ARCH=$PLATFORM_SHORT_ARCH CXXSTL=$CXXSTL $RELEASEFLAG
 
 # 3/ Environment script



More information about the Android mailing list