android: make it ready for androgenizer
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Thu, 27 Jan 2011 16:47:25 +0000 (17:47 +0100)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 11 Apr 2011 15:15:55 +0000 (17:15 +0200)
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git

Android.mk [new file with mode: 0644]
android/ges-launch.mk [new file with mode: 0644]
android/ges.mk [new file with mode: 0644]
ges/Makefile.am
tools/Makefile.am

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..ae72d8b
--- /dev/null
@@ -0,0 +1,34 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+GES_TOP := $(LOCAL_PATH)
+
+GES_BUILT_SOURCES :=                   \
+        ges/Android.mk         \
+       tools/Android.mk
+GES_BUILT_SOURCES := $(patsubst %, $(abspath $(GES_TOP))/%, $(GES_BUILT_SOURCES))
+
+.PHONY: ges-configure ges-configure-real
+ges-configure-real:
+       cd $(GES_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 $(GES_TOP))/$(CONFIGURE) --prefix=/system --host=arm-linux-androideabi \
+       --disable-gtk-doc --disable-valgrind && \
+       for file in $(GES_BUILT_SOURCES); do \
+               rm -f $$file && \
+               make -C $$(dirname $$file) $$(basename $$file) ; \
+       done
+
+ges-configure: ges-configure-real
+
+CONFIGURE_TARGETS += ges-configure
+
+-include $(GES_TOP)/ges/Android.mk
+-include $(GES_TOP)/tools/Android.mk
diff --git a/android/ges-launch.mk b/android/ges-launch.mk
new file mode 100644 (file)
index 0000000..068b038
--- /dev/null
@@ -0,0 +1,28 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE:= ges-launch-0.10
+#LOCAL_ARM_MODE := arm
+
+LOCAL_SRC_FILES := ges-launch.c
+LOCAL_SRC_FILES := $(addprefix ../tools/,$(LOCAL_SRC_FILES))
+
+LOCAL_CFLAGS := $(GST_CFLAGS) \
+       -I$(GES_TOP) \
+       $(shell $(PKG_CONFIG) gstreamer-pbutils --cflags)
+
+LOCAL_SHARED_LIBRARIES := \
+       libges-0.10             \
+       libgstpbutils-0.10      \
+       libgstcontroller-0.10   \
+       libgstvideo-0.10        \
+       libgstreamer-0.10       \
+       libglib-2.0             \
+       libgthread-2.0          \
+       libgmodule-2.0          \
+       libgobject-2.0
+
+LOCAL_PRELINK_MODULE := false
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
diff --git a/android/ges.mk b/android/ges.mk
new file mode 100644 (file)
index 0000000..1839508
--- /dev/null
@@ -0,0 +1,71 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE:= libges-0.10
+#LOCAL_ARM_MODE := arm
+
+built_source_make = gesmarshal.c
+
+LOCAL_SRC_FILES :=                             \
+       $(built_source_make)                    \
+       ges.c                                   \
+       ges-enums.c                             \
+       ges-custom-timeline-source.c            \
+       ges-simple-timeline-layer.c             \
+       ges-timeline.c                          \
+       ges-timeline-layer.c                    \
+       ges-timeline-object.c                   \
+       ges-timeline-pipeline.c                 \
+       ges-timeline-source.c                   \
+       ges-timeline-file-source.c              \
+       ges-timeline-operation.c                \
+       ges-timeline-transition.c               \
+       ges-timeline-standard-transition.c      \
+       ges-timeline-test-source.c              \
+       ges-timeline-title-source.c             \
+       ges-timeline-overlay.c                  \
+       ges-timeline-text-overlay.c             \
+       ges-track.c                             \
+       ges-track-object.c                      \
+       ges-track-source.c                      \
+       ges-track-operation.c                   \
+       ges-track-filesource.c                  \
+       ges-track-image-source.c                \
+       ges-track-transition.c                  \
+       ges-track-audio-transition.c            \
+       ges-track-video-transition.c            \
+       ges-track-video-test-source.c           \
+       ges-track-audio-test-source.c           \
+       ges-track-title-source.c                \
+       ges-track-text-overlay.c                \
+       ges-screenshot.c                        \
+       ges-formatter.c                         \
+       ges-keyfile-formatter.c                 \
+       ges-utils.c
+
+$(GES_TOP)/ges/gesmarshal.h:
+       make -C $(GES_TOP)/ges gesmarshal.h
+
+$(GES_TOP)/ges/gesmarshal.c: $(GES_TOP)/ges/gesmarshal.h
+       make -C $(GES_TOP)/ges gesmarshal.c
+
+LOCAL_SRC_FILES := $(addprefix ../ges/,$(LOCAL_SRC_FILES))
+
+LOCAL_CFLAGS := $(GST_CFLAGS) \
+       -I$(GES_TOP) \
+       $(shell $(PKG_CONFIG) gstreamer-pbutils --cflags)
+
+LOCAL_SHARED_LIBRARIES := \
+       libgstpbutils-0.10      \
+       libgstcontroller-0.10   \
+       libgstvideo-0.10        \
+       libgstreamer-0.10       \
+       libglib-2.0             \
+       libgthread-2.0          \
+       libgmodule-2.0          \
+       libgobject-2.0
+
+LOCAL_PRELINK_MODULE := false
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
index 854fb393a9c1b60cdf53b372a7c55a48d64db476..31b352c1fb2f2a88c0f6112cdbe8de2948d26119 100644 (file)
@@ -162,3 +162,19 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
+
+Android.mk: Makefile.am $(BUILT_SOURCES)
+       androgenizer -:PROJECT libges -:SHARED libges-@GST_MAJORMINOR@ \
+        -:TAGS eng debug \
+         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+        -:SOURCES $(libges_@GST_MAJORMINOR@_la_SOURCES) \
+                  $(nodist_libges_@GST_MAJORMINOR@_la_SOURCES) \
+        -:CFLAGS $(DEFS) $(libges_@GST_MAJORMINOR@_la_CFLAGS) \
+        -:LDFLAGS $(libges_@GST_MAJORMINOR@_la_LDFLAGS) \
+                  $(libges_@GST_MAJORMINOR@_la_LIBADD) \
+                  -ldl \
+        -:HEADER_TARGET gstreamer-@GST_MAJORMINOR@/gst/interfaces \
+        -:HEADERS $(libges_@GST_MAJORMINOR@include_HEADERS) \
+                  $(nodist_libges_@GST_MAJORMINOR@include_HEADERS) \
+        -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+       > $@
index 5572ad3fad29f06dd6dacce08c02f2d07670ff21..0aeb3090f547b02e98189c90cd2c46b7380b5c92 100644 (file)
@@ -4,3 +4,13 @@ LDADD = $(top_builddir)/ges/libges-@GST_MAJORMINOR@.la $(GST_PBUTILS_LIBS) $(GST
 
 ges_launch_@GST_MAJORMINOR@_SOURCES = ges-launch.c
 
+Android.mk: Makefile.am $(BUILT_SOURCES)
+       androgenizer \
+       -:PROJECT ges_launch -:EXECUTABLE ges-launch \
+        -:TAGS eng \
+         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+        -:SOURCES $(ges_launch_@GST_MAJORMINOR@_SOURCES) \
+        -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(AM_CFLAGS) \
+        -:LDFLAGS -lges-@GST_MAJORMINOR@ $(GST_PBUTILS_LIBS) $(GST_LIBS) \
+        -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+       > $@