gst-omx: Enable building with Android's buildsystem

Reynaldo H. Verdejo Pinochet reynaldo at kemper.freedesktop.org
Thu Jan 19 09:30:06 PST 2012


Module: gst-omx
Branch: master
Commit: 766dc7c54122f97f2a598d4690d9bff38a521372
URL:    http://cgit.freedesktop.org/gstreamer/gst-omx/commit/?id=766dc7c54122f97f2a598d4690d9bff38a521372

Author: Reynaldo H. Verdejo Pinochet <reynaldo at collabora.com>
Date:   Wed Jan 18 16:53:16 2012 -0300

Enable building with Android's buildsystem

This change adds prelimary buildsystem hooks to
build gst-omx with the Android buildsystem. Like
the rest of GStreamer's Android hooks, the process
relies on the availability of androgenizer. A tool
developed by Collabora to automatically generate
Android.mk files from within the auto* setup.

Androgenizer is currently available at:

http://cgit.collabora.com/git/user/derek/androgenizer.git/

---

 Android.mk      |   30 ++++++++++++++++++++++++++++++
 omx/Makefile.am |   14 ++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..bc99d9f
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,30 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+GST_OMX_TOP := $(LOCAL_PATH)
+
+GST_OMX_BUILT_SOURCES := omx/Android.mk
+
+GST_OMX_BUILT_SOURCES := $(patsubst %, $(abspath $(GST_OMX_TOP))/%, $(GST_OMX_BUILT_SOURCES))
+
+.PHONY: gst-omx-configure
+gst-omx-configure:
+	cd $(GST_OMX_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 $(GST_OMX_TOP))/$(CONFIGURE) --host=arm-linux-androideabi \
+	--prefix=/system --disable-orc --disable-valgrind --disable-gtk-doc && \
+	for file in $(GST_OMX_BUILT_SOURCES); do \
+		rm -f $$file && \
+		make -C $$(dirname $$file) $$(basename $$file) ; \
+	done
+
+CONFIGURE_TARGETS += gst-omx-configure
+
+-include $(GST_OMX_TOP)/omx/Android.mk
diff --git a/omx/Makefile.am b/omx/Makefile.am
index a24c39d..c3ef484 100644
--- a/omx/Makefile.am
+++ b/omx/Makefile.am
@@ -62,3 +62,17 @@ libgstopenmax_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 
 EXTRA_DIST = openmax gstomx.conf
 
+Android.mk: Makefile.am $(BUILT_SOURCES)
+	androgenizer \
+	-:PROJECT libgstopenmax -:SHARED libgstopenmax \
+	 -:TAGS eng debug \
+         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+	 -:SOURCES $(libgstopenmax_la_SOURCES) \
+	           $(nodist_libgstopenmax_la_SOURCES) \
+	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstopenmax_la_CFLAGS) \
+	 -:LDFLAGS $(libgstopenmax_la_LDFLAGS) \
+	           $(libgstopenmax_la_LIBADD) \
+	           -ldl \
+	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
+	> $@



More information about the gstreamer-commits mailing list