Commit 930825a6 authored by Martin Storsjö's avatar Martin Storsjö

Build stubs for platform private libraries from symbol lists

This avoids having to fetch a 84 MB binary package and keeping
26 MB of libraries, when a fake stub works just as well.
Signed-off-by: Martin Storsjö's avatarMartin Storsjö <martin@martin.st>
parent 8472d0b3
vlc/
android-headers-gingerbread/
android-headers-ics/
android-libs/
android-libs/*.so
update-cm-7.1.0.1-NS-signed.zip
vlc-android/libs/armeabi/
......@@ -5,6 +5,9 @@ VLC_APK=vlc-android/bin/VLC-debug.apk
LIBVLCJNI=vlc-android/libs/armeabi/libvlcjni.so
LIBVLCJNI_H=vlc-android/jni/libvlcjni.h
PRIVATE_LIBDIR=android-libs
PRIVATE_LIBS=$(PRIVATE_LIBDIR)/libstagefright.so $(PRIVATE_LIBDIR)/libmedia.so $(PRIVATE_LIBDIR)/libutils.so $(PRIVATE_LIBDIR)/libbinder.so
# Verbose level: -q -v or nothing (default verbose)
VERBOSE ?= -v
......@@ -27,7 +30,14 @@ $(LIBVLCJNI_H):
BUILTINS="$$BUILTINS NULL\n};\n"; \
printf "/* Autogenerated from the list of modules */\n $$DEFINITION\n $$BUILTINS\n" > $@
$(LIBVLCJNI): $(JNI_SOURCES) $(LIBVLCJNI_H)
$(PRIVATE_LIBDIR)/%.so: $(PRIVATE_LIBDIR)/%.c
arm-linux-androideabi-gcc $< -shared -o $@ --sysroot=$(ANDROID_NDK)/platforms/android-3/arch-arm
$(PRIVATE_LIBDIR)/%.c: $(PRIVATE_LIBDIR)/%.symbols
rm -f $@
for s in `cat $<`; do echo "void $$s() {}" >> $@; done
$(LIBVLCJNI): $(JNI_SOURCES) $(LIBVLCJNI_H) $(PRIVATE_LIBS)
@if [ -z "$(VLC_BUILD_DIR)" ]; then echo "VLC_BUILD_DIR not defined" ; exit 1; fi
@if [ -z "$(ANDROID_NDK)" ]; then echo "ANDROID_NDK not defined" ; exit 1; fi
@echo "=== Building libvlcjni with$${NO_NEON:+out} neon ==="
......@@ -53,6 +63,7 @@ vlc-android/local.properties:
clean:
cd vlc-android && rm -rf gen libs obj bin $(VLC_APK)
rm -f $(PRIVATE_LIBDIR)/*.so $(PRIVATE_LIBDIR)/*.c
distclean: clean
rm -f $(LIBVLCJNI) $(LIBVLCJNI_H) vlc-android/local.properties
......
......@@ -99,15 +99,6 @@ cyanogen_headers hardware/libhardware ics
export ANDROID_SYS_HEADERS_GINGERBREAD=${PWD}/android-headers-gingerbread
export ANDROID_SYS_HEADERS_ICS=${PWD}/android-headers-ics
echo "Fetching Android libraries for linking"
# Libraries from any froyo/gingerbread device/emulator should work
# fine, since the symbols used should be available on most of them.
if [ ! -f "update-cm-7.1.0.1-NS-signed.zip" ]; then
curl -O http://mirror.sea.tdrevolution.net/cm/stable/gingerbread/update-cm-7.1.0.1-NS-signed.zip
unzip update-cm-7.1.0.1-NS-signed.zip system/lib/\*
mv system/lib android-libs
rmdir system
fi
export ANDROID_LIBS=${PWD}/android-libs
export VLC_BUILD_DIR=vlc/android
......
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