Commit 7998559c authored by Rémi Duraffort's avatar Rémi Duraffort

Contrib: build some libs for android.

A lot of libraries are still missing.
parent ea570fc6
......@@ -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
......
# 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=
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