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/
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2012-01-18 16:53:16 -03:00 committed by Reynaldo H. Verdejo Pinochet
parent 4fd185be6f
commit 766dc7c541
2 changed files with 44 additions and 0 deletions

30
Android.mk Normal file
View file

@ -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

View file

@ -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' \
> $@