From a41e6a6a3716bd043c593ef2fba964d2f4a29820 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 13 May 2011 15:21:42 -0400 Subject: [PATCH] Support building for Android --- .gitignore | 1 + Android.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ telepathy-glib/Makefile.am | 11 +++++++++++ 3 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 Android.mk diff --git a/.gitignore b/.gitignore index 754014e..70758d4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ Makefile *.typelib .semanticache _gen +Android.mk FIXME.out INSTALL aclocal.m4 diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..bbd2f52 --- /dev/null +++ b/Android.mk @@ -0,0 +1,42 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +include ../telepathy-glib/telepathy-glib/codegen.am + +TELEPATHY_GLIB_BUILT_SOURCES := \ + telepathy-glib/telepathy-glib.pc \ + telepathy-glib/telepathy-glib-uninstalled.pc \ + telepathy-glib/Android.mk + +TELEPATHY_GLIB_GENMARSHAL := $(nodist_libtelepathy_glib_internal_la_SOURCES) \ + $(nodist_geninclude_HEADERS) + +telepathy-glib-configure-real: + cd $(TELEPATHY_GLIB_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=$(PKG_CONFIG_TOP_BUILD_DIR) \ + $(TELEPATHY_GLIB_TOP)/$(CONFIGURE) --host=arm-linux-androideabi && \ + for file in $(TELEPATHY_GLIB_BUILT_SOURCES); do \ + rm -f $$file && \ + make -C $$(dirname $$file) $$(basename $$file) ; \ + done && \ + for file in $(TELEPATHY_GLIB_GENMARSHAL); do \ + rm -f telepathy-glib/$$file && \ + make -C telepathy-glib $$file ; \ + done + +telepathy-glib-configure: telepathy-glib-configure-real + +.PHONY: telepathy-glib-configure + +CONFIGURE_TARGETS += telepathy-glib-configure + +#include all the subdirs... +-include $(TELEPATHY_GLIB_TOP)/telepathy-glib/Android.mk diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 552776d..fe038fa 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -280,3 +280,14 @@ ALL_LIBS = \ include abi.am include codegen.am include introspection.am + +Android.mk: Makefile.am + androgenizer -:PROJECT telepathy-glib -:SHARED libtelepathy-glib -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libtelepathy_glib_internal_la_SOURCES) \ + $(nodist_libtelepathy_glib_internal_la_SOURCES) \ + -:CFLAGS $(DEFAULT_INCLUDES) $(DEFS) $(CFLAGS) $(GIO_UNIX_CFLAGS) $(DBUS_CFLAGS) $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) $(INCLUDES) \ + -:LDFLAGS $(libtelepathy_glib_internal_la_LIBADD) \ + $(libtelepathy_glib_internal_la_LDFLAGS) \ + > $@ -- 1.7.7