[Android] maintain Makefile to build libvlc with compile.sh
Geoffrey Métais
git at videolan.org
Fri Nov 14 14:30:17 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 13 19:03:48 2014 +0100| [e8a66be269d765fd54553906273375753193c28e] | committer: Geoffrey Métais
maintain Makefile to build libvlc with compile.sh
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e8a66be269d765fd54553906273375753193c28e
---
Makefile | 31 +++++++++++++++++--------------
compile.sh | 8 ++++----
libvlc/build.xml | 2 +-
vlc-android/project.properties | 2 +-
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
index 4fa0141..42fd0f0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,11 @@ export ANDROID_HOME=$(ANDROID_SDK)
ARCH = $(ANDROID_ABI)
-SRC=vlc-android
-JAVA_SOURCES=$(shell find $(SRC)/src/org/videolan -name "*.java" -o -name "*.aidl")
-JAVA_SOURCES+=$(shell find $(SRC)/res -name "*.xml" -o -name "*.png")
+SRC=libvlc
+APP_SRC=vlc-android
+JAVA_SOURCES=$(shell find $(APP_SRC)/src/org/videolan -name "*.java" -o -name "*.aidl")
+JAVA_SOURCES+=$(shell find $(SRC)/src/org/videolan -name "*.java" -o -name "*.aidl")
+JAVA_SOURCES+=$(shell find $(APP_SRC)/res -name "*.xml" -o -name "*.png")
JNI_SOURCES=$(SRC)/jni/*.c $(SRC)/jni/*.h
LIBVLC_LIBS = libvlcjni
@@ -38,11 +40,11 @@ endif
ifeq ($(RELEASE),1)
ANT_TARGET = release
-VLC_APK=$(SRC)/bin/VLC-release-unsigned.apk
+VLC_APK=$(APP_SRC)/bin/VLC-release-unsigned.apk
NDK_DEBUG=0
else
ANT_TARGET = debug
-VLC_APK=$(SRC)/bin/VLC-debug.apk
+VLC_APK=$(APP_SRC)/bin/VLC-debug.apk
NDK_DEBUG=1
endif
@@ -50,11 +52,11 @@ define build_apk
@echo
@echo "=== Building $(VLC_APK) for $(ARCH) ==="
@echo
- date +"%Y-%m-%d" > $(SRC)/assets/builddate.txt
- echo `id -u -n`@`hostname` > $(SRC)/assets/builder.txt
- git rev-parse --short HEAD > $(SRC)/assets/revision.txt
- ./gen-env.sh $(SRC)
- $(VERBOSE)cd $(SRC) && ant $(ANT_OPTS) $(ANT_TARGET)
+ date +"%Y-%m-%d" > $(APP_SRC)/assets/builddate.txt
+ echo `id -u -n`@`hostname` > $(APP_SRC)/assets/builder.txt
+ git rev-parse --short HEAD > $(APP_SRC)/assets/revision.txt
+ ./gen-env.sh $(APP_SRC)
+ $(VERBOSE)cd $(APP_SRC) && ant $(ANT_OPTS) $(ANT_TARGET)
endef
$(VLC_APK): $(LIBVLCJNI) $(JAVA_SOURCES)
@@ -114,11 +116,12 @@ apkclean:
rm -f $(VLC_APK)
lightclean:
- cd $(SRC) && rm -rf libs obj bin $(VLC_APK)
+ cd $(SRC) && rm -rf libs obj
+ cd $(APP_SRC) && rm -rf bin $(VLC_APK)
rm -f $(PRIVATE_LIBDIR)/*.so $(PRIVATE_LIBDIR)/*.c
clean: lightclean
- rm -rf $(SRC)/gen java-libs/*/gen java-libs/*/bin .sdk vlc-sdk/ vlc-sdk.7z
+ rm -rf $(APP_SRC)/gen java-libs/*/gen java-libs/*/bin .sdk vlc-sdk/ vlc-sdk.7z
jniclean: lightclean
rm -f $(LIBVLCJNI) $(LIBVLCJNI_H)
@@ -156,9 +159,9 @@ vlc-sdk.7z: .sdk
.sdk:
mkdir -p vlc-sdk/libs
- cd vlc-android; cp -r libs/* ../vlc-sdk/libs
+ cd libvlc; cp -r libs/* ../vlc-sdk/libs
mkdir -p vlc-sdk/src/org/videolan
- cp -r vlc-android/src/org/videolan/libvlc vlc-sdk/src/org/videolan
+ cp -r libvlc/src/org/videolan/libvlc vlc-sdk/src/org/videolan
touch $@
.PHONY: lightclean clean jniclean distclean distclean-run apkclean apkclean-run install run build-and-run
diff --git a/compile.sh b/compile.sh
index ab5527b..940b4e5 100755
--- a/compile.sh
+++ b/compile.sh
@@ -2,7 +2,7 @@
# Read the Android Wiki http://wiki.videolan.org/AndroidCompile
# Setup all that stuff correctly.
-# Get the latest Android SDK Platform or modify numbers in configure.sh and vlc-android/default.properties.
+# Get the latest Android SDK Platform or modify numbers in configure.sh and libvlc/default.properties.
set -e
@@ -63,11 +63,11 @@ if [ `set -- ${ANDROID_ABI}; echo $#` -gt 1 ]; then
NO_FPU=$NO_FPU NO_ARMV6=$NO_ARMV6 ANDROID_ABI=$i \
./compile.sh $* --jni || { echo "$i build KO"; exit 1; }
mkdir -p obj/
- cp -r vlc-android/libs/$i obj
+ cp -r libvlc/libs/$i obj
echo "$i build OK"
done
for i in ${ANDROID_ABI_LIST}; do
- cp -r obj/$i vlc-android/libs/
+ cp -r obj/$i libvlc/libs/
rm -rf obj/$i
done
if [ "$JNI" = 0 ];then
@@ -348,7 +348,7 @@ cd ../.. && mkdir -p build-android-${TARGET_TUPLE} && cd build-android-${TARGET_
if [ "$JNI" = 1 ]; then
CLEAN="jniclean"
- TARGET="vlc-android/obj/local/${ANDROID_ABI}/libvlcjni.so"
+ TARGET="libvlc/obj/local/${ANDROID_ABI}/libvlcjni.so"
else
CLEAN="distclean"
TARGET=
diff --git a/libvlc/build.xml b/libvlc/build.xml
index 65eae4e..b512e16 100644
--- a/libvlc/build.xml
+++ b/libvlc/build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="libVLC" default="help">
+<project name="libvlc" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
diff --git a/vlc-android/project.properties b/vlc-android/project.properties
index db9ba9a..4ac9888 100644
--- a/vlc-android/project.properties
+++ b/vlc-android/project.properties
@@ -14,4 +14,4 @@ target=android-21
android.library.reference.1=../java-libs/appcompat
android.library.reference.2=../java-libs/WheelView
android.library.reference.3=../java-libs/cardview
-android.library.reference.4=../libVLC
+android.library.reference.4=../libvlc
More information about the Android
mailing list