Commit 3ef336c2 authored by Thomas Guillem's avatar Thomas Guillem

build: add multiple ABI build

ANDROID_ABI can now contains more than one ABI.

For example:
ANDROID_ABI="armeabi-v7a x86" ./compile.sh
will build an apk containing armeabi-v7a and x86 libs.
parent b16dd9f8
......@@ -46,15 +46,19 @@ VLC_APK=$(SRC)/bin/VLC-debug.apk
NDK_DEBUG=1
endif
$(VLC_APK): $(LIBVLCJNI) $(JAVA_SOURCES)
define build_apk
@echo
@echo "=== Building $@ for $(ARCH) ==="
@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)
endef
$(VLC_APK): $(LIBVLCJNI) $(JAVA_SOURCES)
$(call build_apk)
VLC_MODULES=`./find_modules.sh $(VLC_BUILD_DIR)`
......@@ -103,6 +107,9 @@ $(LIBVLCJNI): $(JNI_SOURCES) $(LIBVLCJNI_H) $(PRIVATE_LIBS)
TARGET_CFLAGS="$$VLC_EXTRA_CFLAGS" \
LIBVLC_LIBS="$(LIBVLC_LIBS)"
apk:
$(call build_apk)
apkclean:
rm -f $(VLC_APK)
......
......@@ -25,6 +25,26 @@ if [ -z "$NO_ARMV6" ];then
NO_ARMV6=0
fi
if [ `set -- ${ANDROID_ABI}; echo $#` -gt 1 ]; then
ANDROID_ABI_LIST="${ANDROID_ABI}"
echo "More than one ABI specified: ${ANDROID_ABI_LIST}"
for i in ${ANDROID_ABI_LIST}; do
echo "$i starts building"
ANDROID_NDK=$ANDROID_NDK ANDROID_SDK=$ANDROID_SDK \
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
echo "$i build OK"
done
for i in ${ANDROID_ABI_LIST}; do
cp -r obj/$i vlc-android/libs/
rm -rf obj/$i
done
make -b -j1 apk || exit 1
exit 0
fi
BUILD=0
FETCH=0
RELEASE=0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment