Fix compilation on Mac OS X.

This commit is contained in:
Ghislain MARY 2013-09-27 17:06:02 +02:00
parent c03c21757a
commit b0d6594940
4 changed files with 42 additions and 33 deletions

View file

@ -160,7 +160,7 @@ clean-x264:
rm -rf $(X264_BUILD_DIR)/x86
#libvpx
BUILD_VPX_DEPS=$(LIBVPX_BUILD_DIR)/arm/libvpx.a
BUILD_VPX_DEPS=$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt $(LIBVPX_BUILD_DIR)/arm/libvpx.a
ifeq ($(BUILD_FOR_X86), 1)
BUILD_VPX_DEPS+=$(LIBVPX_BUILD_DIR)/x86/libvpx.a
endif
@ -168,6 +168,10 @@ LIBVPX_SRC_DIR=$(TOPDIR)/submodules/externals/libvpx
LIBVPX_BUILD_DIR=$(TOPDIR)/submodules/externals/build/libvpx
LIBVPX_CONFIGURE_OPTIONS=--disable-vp9 --disable-examples --disable-unit-tests --disable-postproc --enable-error-concealment --enable-debug
$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt:
@patch -p0 < $(TOPDIR)/patches/libvpx_configure_android_x86.patch
touch $@
$(LIBVPX_BUILD_DIR)/arm/libvpx.a:
mkdir -p $(LIBVPX_BUILD_DIR)/arm && \
cd $(LIBVPX_BUILD_DIR)/arm && \
@ -178,7 +182,7 @@ $(LIBVPX_BUILD_DIR)/arm/libvpx.a:
$(LIBVPX_BUILD_DIR)/x86/libvpx.a:
mkdir -p $(LIBVPX_BUILD_DIR)/x86 && \
cd $(LIBVPX_BUILD_DIR)/x86 && \
$(LIBVPX_SRC_DIR)/configure --target=x86-android-gcc --sdk-path=$(NDK_PATH) $(LIBVPX_CONFIGURE_OPTIONS) --extra-cflags="--sysroot=$(X86_SYSROOT)" && \
$(LIBVPX_SRC_DIR)/configure --target=x86-android-gcc --sdk-path=$(NDK_PATH) $(LIBVPX_CONFIGURE_OPTIONS) && \
make -j${NUMCPUS} \
|| ( echo "Build of libvpx for x86 failed." ; exit 1 )

2
README
View file

@ -4,7 +4,7 @@
To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r9) from google and add it to your path.
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
2) install yasm and the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
On 64 bits linux systems you'll need the ia32-libs package
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ make

View file

@ -1,30 +0,0 @@
--- submodules/externals/ffmpeg/libavcodec/arm/int_neon.S.orig 2011-09-30 19:43:21.935593025 +0200
+++ submodules/externals/ffmpeg/libavcodec/arm/int_neon.S 2011-09-30 19:44:21.115168033 +0200
@@ -35,11 +35,11 @@
vdup.s32 q12, r3
1: vld1.16 {d16-d17}, [r0]!
- vld1.16 {d20-d21}, [r1,:128]!
+ vld1.16 {d20-d21}, [r1]!
vmull.s16 q12, d16, d20
vld1.16 {d18-d19}, [r0]!
vmull.s16 q13, d17, d21
- vld1.16 {d22-d23}, [r1,:128]!
+ vld1.16 {d22-d23}, [r1]!
vmull.s16 q14, d18, d22
vmull.s16 q15, d19, d23
vshl.s32 q8, q12, q12
@@ -55,11 +55,11 @@
b 3f
2: vld1.16 {d16-d17}, [r0]!
- vld1.16 {d20-d21}, [r1,:128]!
+ vld1.16 {d20-d21}, [r1]!
vmlal.s16 q0, d16, d20
vld1.16 {d18-d19}, [r0]!
vmlal.s16 q1, d17, d21
- vld1.16 {d22-d23}, [r1,:128]!
+ vld1.16 {d22-d23}, [r1]!
vmlal.s16 q2, d18, d22
vmlal.s16 q3, d19, d23
subs r2, r2, #16

View file

@ -0,0 +1,35 @@
--- submodules/externals/libvpx/build/make/configure.sh.orig 2013-09-27 16:49:14.000000000 +0200
+++ submodules/externals/libvpx/build/make/configure.sh 2013-09-27 16:49:01.000000000 +0200
@@ -1052,6 +1052,32 @@
os2)
AS=${AS:-nasm}
;;
+ android*)
+ SDK_PATH=${sdk_path}
+ COMPILER_LOCATION=`find "${SDK_PATH}" \
+ -name "i686-linux-android-gcc*" -print -quit`
+ TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/i686-linux-android-
+ CC=${TOOLCHAIN_PATH}gcc
+ CXX=${TOOLCHAIN_PATH}g++
+ AR=${TOOLCHAIN_PATH}ar
+ LD=${TOOLCHAIN_PATH}gcc
+ STRIP=${TOOLCHAIN_PATH}strip
+ NM=${TOOLCHAIN_PATH}nm
+
+ if [ -z "${alt_libc}" ]; then
+ alt_libc=`find "${SDK_PATH}" -name arch-x86 -print | \
+ awk '{n = split($0,a,"/"); \
+ split(a[n-1],b,"-"); \
+ print $0 " " b[2]}' | \
+ sort -g -k 2 | \
+ awk '{ print $1 }' | tail -1`
+ fi
+
+ add_cflags "--sysroot=${alt_libc}"
+ add_ldflags "--sysroot=${alt_libc}"
+
+ soft_enable realtime_only
+ ;;
esac
AS="${alt_as:-${AS:-auto}}"