summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-08-20 12:27:39 (GMT)
committerHelio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-08-20 12:27:39 (GMT)
commit7326c577859d2981c9fbd3cf515d3fede53092f0 (patch)
treeca495f5a8bb4749a42dedaae52e52a25e3ba476b
parentcb8314565b4e4a80e60700cc8fbb52bb33a7407d (diff)
downloadx264-7326c577859d2981c9fbd3cf515d3fede53092f0.tar.gz
x264-7326c577859d2981c9fbd3cf515d3fede53092f0.tar.xz
Converted x264 Android.mk to new buildsystem
-rw-r--r--Android.mk81
1 files changed, 52 insertions, 29 deletions
diff --git a/Android.mk b/Android.mk
index 81395cf..3df02ca 100644
--- a/Android.mk
+++ b/Android.mk
@@ -6,31 +6,28 @@ 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 \
+X264_BUILT_MAKEFILES := \
+ $(X264_TOP)/x264.mk
+
+# Any final product file from ./configure will do.
+X264_CONFIGURE_TARGET := $(LIBFFI_TOP)/Makefile
+
+$(X264_CONFIGURE_TARGET): $(CONFIGURE_DEPENDENCIES) \
+ $(X264_TOP)/configure.ac
+ 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) \
+ ./configure \
+ --host=arm-linux-androideabi \
+ --prefix=/system \
+ --enable-shared
+
+X264_SOURCES := 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 \
@@ -41,8 +38,34 @@ LOCAL_SRC_FILES := common/mc.c common/predict.c common/pixel.c \
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
+$(X264_BUILT_MAKEFILES): $(X264_CONFIGURE_TARGET)
+ androgenizer \
+ -:PROJECT x264 \
+ -:SHARED libx264 \
+ \
+ -:TAGS eng debug \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ -:SOURCES $(X264_SOURCES) \
+ -:CFLAGS $(DEFS) $(CFLAGS) $(CONFIGURE_CFLAGS) $(INCLUDES) \
+ $(AM_CFLAGS) \
+ -:CPPFLAGS $(CPPFLAGS) $(CONFIGURE_CPPFLAGS) \
+ -:PASSTHROUGH 'x264-clean: clean-x264' \
+ > $@
+
+
+.PHONY: x264-reset x264-clean
+
+x264-reset:
+ cd $(X264_TOP) && \
+ git clean -qdxf && \
+ git reset --hard HEAD
+
+x264-clean:
+
+collabora-reset: x264-reset
+collabora-clean: x264-clean
+
+CONFIGURE_PKG_CONFIG_LIBDIR := $(CONFIGURE_PKG_CONFIG_LIBDIR):$(abspath $(X264_TOP))
+
+include $(X264_BUILT_MAKEFILES)
-include $(BUILD_SHARED_LIBRARY)