summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@collabora.com>2011-12-28 16:13:32 (GMT)
committerReynaldo H. Verdejo Pinochet <reynaldo@thinktank2.cable.virginmedia.net>2012-03-30 16:37:44 (GMT)
commitcb8314565b4e4a80e60700cc8fbb52bb33a7407d (patch)
tree9417dcc85698135bd6819f66321652cefd18a07b
parent5c85e0a2b7992fcaab09418e3fcefc613cffc743 (diff)
downloadx264-cb8314565b4e4a80e60700cc8fbb52bb33a7407d.tar.gz
x264-cb8314565b4e4a80e60700cc8fbb52bb33a7407d.tar.xz
Enables building with Androidandroid
Add Android.mk file for building x264 with Android's buildsystem tools This Android.mk file enables building x264 as a part of android itself (baring modifications to Android's source to hook x264 in) or as an external module with the NDK.
-rw-r--r--Android.mk48
1 files changed, 48 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..81395cf
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,48 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libx264
+LOCAL_MODULE_TAGS := eng debug
+
+X264_TOP := $(LOCAL_PATH)
+
+ifeq ($(NDK_BUILD),true)
+LIB := $(SYSROOT)/usr/lib
+else
+LIB := $(TARGET_OUT_SHARED_LIBRARIES)
+endif
+
+.PHONY: libx264-configure
+libx264-configure: $(TARGET_CRTBEGIN_DYNAMIC_O) $(TARGET_CRTEND_O) $(LIB)/libc.so $(LIB)/libz.so
+ cd $(X264_TOP) ; \
+ CC="$(CONFIGURE_CC)" \
+ CFLAGS="$(CONFIGURE_CFLAGS)" \
+ LD=$(TARGET_LD) \
+ LDFLAGS="$(CONFIGURE_LDFLAGS)" \
+ CPP=$(CONFIGURE_CPP) \
+ CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
+ PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
+ PKG_CONFIG_TOP_BUILD_DIR=/ \
+ $(abspath $(X264_TOP))/configure --host=arm-linux-androideabi \
+ --prefix=/system --enable-shared
+
+CONFIGURE_TARGETS += libx264-configure
+
+-include $(X264_TOP)/config.mak
+
+LOCAL_SRC_FILES := common/mc.c common/predict.c common/pixel.c \
+ common/macroblock.c common/frame.c common/dct.c common/cpu.c common/cabac.c \
+ common/common.c common/osdep.c common/rectangle.c common/set.c common/quant.c \
+ common/deblock.c common/vlc.c common/mvpred.c common/bitstream.c \
+ encoder/analyse.c encoder/me.c encoder/ratecontrol.c encoder/set.c \
+ encoder/macroblock.c encoder/cabac.c encoder/cavlc.c encoder/encoder.c \
+ encoder/lookahead.c common/arm/mc-c.c common/arm/predict-c.c \
+ common/arm/cpu-a.S common/arm/pixel-a.S common/arm/mc-a.S \
+ common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \
+ common/arm/predict-a.S
+
+LOCAL_CFLAGS := $(CFLAGS)
+LOCAL_ASFLAGS := $(ASFLAGS)
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)