[PATCH] build: Androigenizer build boilerplate
Stefan Sauer
ensonic at users.sf.net
Fri Dec 16 02:49:08 PST 2011
---
Android.mk | 37 +++++++++++++++++++++++++++++++++++++
configure.ac | 4 ++++
gst-libs/gst/gl/Makefile.am | 17 +++++++++++++++++
gst/gl/Makefile.am | 16 ++++++++++++++++
4 files changed, 74 insertions(+), 0 deletions(-)
create mode 100644 Android.mk
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..2f22356
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,37 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+GST_PLUGINS_GL_TOP := $(LOCAL_PATH)
+
+GST_PLUGINS_GL_BUILT_SOURCES := \
+ gst-libs/gst/gl/Android.mk \
+ gst/gl/Android.mk
+
+GST_PLUGINS_GL_BUILT_SOURCES := $(patsubst %, $(abspath $(GST_PLUGINS_GL_TOP))/%, $(GST_PLUGINS_GL_BUILT_SOURCES))
+
+.PHONY: gst-plugins-gl-configure gst-plugins-gl-configure-real
+
+gst-plugins-gl-configure-real:
+ cd $(GST_PLUGINS_GL_TOP) ; \
+ CC="$(CONFIGURE_CC)" \
+ CFLAGS="$(CONFIGURE_CFLAGS)" \
+ LD=$(TARGET_LD) \
+ LDFLAGS="$(CONFIGURE_LDFLAGS) -Wl,--warn-unresolved-symbols" \
+ CPP=$(CONFIGURE_CPP) \
+ CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
+ PKG_CONFIG_LIBDIR="$(CONFIGURE_PKG_CONFIG_LIBDIR)" \
+ PKG_CONFIG_TOP_BUILD_DIR=/ \
+ $(abspath $(GST_PLUGINS_GL_TOP))/$(CONFIGURE) \
+ --prefix=/system --disable-examples --host=arm-linux-androideabi --disable-gtk-doc \
+ --disable-valgrind && \
+ for file in $(GST_PLUGINS_GL_BUILT_SOURCES); do \
+ rm -f $$file && \
+ make -C $$(dirname $$file) $$(basename $$file) ; \
+ done
+
+gst-plugins-gl-configure: gst-plugins-gl-configure-real
+
+CONFIGURE_TARGETS += gst-plugins-gl-configure
+
+-include $(GST_PLUGINS_GL_TOP)/gst-libs/gst/gl/Android.mk
+-include $(GST_PLUGINS_GL_TOP)/gst/gl/Android.mk
diff --git a/configure.ac b/configure.ac
index 1688a74..c9e5fd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,6 +181,10 @@ case $host in
GL_BACKEND=x11
GL_TYPE=gl
else
+ AC_CHECK_HEADERS([GLES2/gl2.h], [HAVE_GLES2=yes], [HAVE_GLES2=no])
+ if test "x$HAVE_GLES2" = "xno"; then
+ AC_MSG_ERROR([OH NOES GLES2 is required])
+ fi
AC_CHECK_HEADERS([EGL/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no])
if test "x$HAVE_EGL" = "xyes"; then
AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h,, AC_MSG_ERROR([EGL is required]))
diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index 2ef7afc..9894bb3 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
@@ -61,3 +61,20 @@ libgstgl_ at GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=OBJC
else
libgstgl_ at GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=CC
endif
+
+Android.mk: $(BUILT_SOURCES) Makefile.am
+ androgenizer -:PROJECT libgstgl -:STATIC libgstgl- at GST_MAJORMINOR@ \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libgstgl_ at GST_MAJORMINOR@_la_SOURCES) \
+ $(built_sources) \
+ -:CFLAGS $(DEFS) $(libgstgl_ at GST_MAJORMINOR@_la_CFLAGS) \
+ -:LDFLAGS $(libgstgl_ at GST_MAJORMINOR@_la_LDFLAGS) \
+ $(libgstgl at GST_MAJORMINOR@_la_LIBADD) \
+ -ldl \
+ -:HEADER_TARGET gstreamer- at GST_MAJORMINOR@/gst/codecparsers \
+ -:HEADERS $(libgstglinclude_HEADERS) \
+ $(built_headers) \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ > $@
+
diff --git a/gst/gl/Makefile.am b/gst/gl/Makefile.am
index 41a3119..340bc97 100644
--- a/gst/gl/Makefile.am
+++ b/gst/gl/Makefile.am
@@ -97,3 +97,19 @@ libgstopengl_la_LIBADD = \
libgstopengl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+Android.mk: $(BUILT_SOURCES) Makefile.am
+ androgenizer -:PROJECT libgstopengl -:STATIC libgstopengl- at GST_MAJORMINOR@ \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libgstopengl_ at GST_MAJORMINOR@_la_SOURCES) \
+ $(built_sources) \
+ -:CFLAGS $(DEFS) $(libgstopengl_ at GST_MAJORMINOR@_la_CFLAGS) \
+ -:LDFLAGS $(libgstopengl_ at GST_MAJORMINOR@_la_LDFLAGS) \
+ $(libgstopengl at GST_MAJORMINOR@_la_LIBADD) \
+ -ldl \
+ -:HEADER_TARGET gstreamer- at GST_MAJORMINOR@/gst/codecparsers \
+ -:HEADERS $(libgstopenglinclude_HEADERS) \
+ $(built_headers) \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ > $@
+
--
1.7.3.1
--------------010508070904020605020902
Content-Type: text/x-patch;
name="0002-include-gst-plugins-gl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0002-include-gst-plugins-gl.patch"
More information about the gstreamer-android
mailing list