[vlc-commits] commit: Contrib: build some libs for android. ( =?UTF-8?Q?R=C3=A9mi=20Duraffort=20?=)

git at videolan.org git at videolan.org
Tue Dec 28 21:28:38 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Dec 28 21:27:17 2010 +0100| [7998559cf94be7456098f747dc929f182d249de2] | committer: Rémi Duraffort 

Contrib: build some libs for android.

A lot of libraries are still missing.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7998559cf94be7456098f747dc929f182d249de2
---

 extras/contrib/bootstrap                     |   19 +++++++++++++++++++
 extras/contrib/src/Distributions/android.mak |   16 ++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap
index 7e2a1b1..c93ef31 100755
--- a/extras/contrib/bootstrap
+++ b/extras/contrib/bootstrap
@@ -350,6 +350,25 @@ case "$DISTRO" in
   win*)
     add_makefile_cfg "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig"
     ;;
+  android)
+    if test -z "$ANDROID_NDK"; then
+        error "The bootstrap script requires the ANDROID_NDK environment variable "
+        error "to be set when building for Android"
+        exit 1
+    fi
+    # The given host (arm-eabi) is not the real one (arm-linux-androideabi)
+    ln -sfn $TARGET hosts/arm-linux-androideabi
+    CC="arm-linux-androideabi-gcc -nostdlib -lc -lgcc"
+    CXX="arm-linux-androideabi-g++ -nostdlib -lc -lgcc"
+    NM=arm-linux-androideabi-nm
+    AR=arm-linux-androideabi-ar
+    LD=arm-linux-androideabi-ld
+    RANLIB=arm-linux-androideabi-ranlib
+    STRIP=arm-linux-androideabi-strip
+    # Add the PATH to the NDK
+    add_makefile_cfg "ANDROID_NDK = ${ANDROID_NDK}"
+    add_makefile_cfg "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+    add_enabled_makefile_cfg "HAVE_LINUX"
 esac
 
 # Save passed flags
diff --git a/extras/contrib/src/Distributions/android.mak b/extras/contrib/src/Distributions/android.mak
new file mode 100644
index 0000000..e1ca130
--- /dev/null
+++ b/extras/contrib/src/Distributions/android.mak
@@ -0,0 +1,16 @@
+# android rules
+# Not compiling: .shout .ebml .matroska .live .mod .x264 .caca .mpcdec .dirac .schroedinger .libass
+all: .zlib \
+     .a52 .mpeg2 .mad .ogg .vorbis .vorbisenc .theora \
+     .flac .speex .faad .lame .ffmpeg \
+     .twolame \
+     .png .dvbpsi \
+     .dca .kate
+
+
+ANDROID_INCLUDE=$(ANDROID_NDK)/platforms/android-9/arch-arm/usr/include
+ANDROID_LIB=$(ANDROID_NDK)/platforms/android-9/arch-arm/usr/lib
+
+EXTRA_CPPFLAGS=-I$(ANDROID_INCLUDE)
+EXTRA_LDFLAGS=-Wl,-rpath-link=$(ANDROID_LIB),-Bdynamic,-dynamic-linker=/system/bin/linker -Wl,--no-undefined -Wl,-shared -L$(ANDROID_LIB)
+EXTRA_CFLAGS=



More information about the vlc-commits mailing list