From 2b17a5c733e2bc7e1b839da488796871527def76 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 13 May 2011 15:31:57 -0400 Subject: [PATCH] Support building for Android --- .gitignore | 1 + Android.mk | 38 ++++++++++++++++++++++++ telepathy-ytstenut-glib/Makefile.am | 12 +++++++ telepathy-ytstenut-glib/extensions/Makefile.am | 14 ++++++++- telepathy-ytstenut-glib/tests/Makefile.am | 23 ++++++++++++++ 5 files changed, 87 insertions(+), 1 deletions(-) create mode 100644 Android.mk diff --git a/.gitignore b/.gitignore index fb7c3bb..252a90b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *.bak .deps .libs +Android.mk Makefile Makefile.in TAGS diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..83fb647 --- /dev/null +++ b/Android.mk @@ -0,0 +1,38 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +TELEPATHY_YTSTENUT_BUILT_SOURCES := \ + telepathy-ytstenut-glib/Android.mk \ + telepathy-ytstenut-glib/extensions/Android.mk \ + telepathy-ytstenut-glib/tests/Android.mk + +telepathy-ytstenut-configure-real: + cd $(TELEPATHY_YTSTENUT_TOP) ; \ + CXX="$(CONFIGURE_CXX)" \ + 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_YTSTENUT_TOP)/$(CONFIGURE) --host=arm-linux-androideabi \ + --disable-spec-documentation --disable-qt4 \ + --disable-Werror && \ + for file in $(TELEPATHY_YTSTENUT_BUILT_SOURCES); do \ + rm -f $$file && \ + make -C $$(dirname $$file) $$(basename $$file) ; \ + done + +telepathy-ytstenut-configure: telepathy-ytstenut-configure-real + +.PHONY: telepathy-ytstenut-configure + +CONFIGURE_TARGETS += telepathy-ytstenut-configure + +#include all the subdirs... +-include $(TELEPATHY_YTSTENUT_TOP)/telepathy-ytstenut-glib/Android.mk +-include $(TELEPATHY_YTSTENUT_TOP)/telepathy-ytstenut-glib/extensions/Android.mk +-include $(TELEPATHY_YTSTENUT_TOP)/telepathy-ytstenut-glib/tests/Android.mk diff --git a/telepathy-ytstenut-glib/Makefile.am b/telepathy-ytstenut-glib/Makefile.am index c6c44b0..f0d5a7b 100644 --- a/telepathy-ytstenut-glib/Makefile.am +++ b/telepathy-ytstenut-glib/Makefile.am @@ -170,3 +170,15 @@ _gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \ $(tools_dir)/glib-client-marshaller-gen.py Makefile.am $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< _tp_yts > $@ +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer -:PROJECT telepathy-ytstenut \ + -:SHARED telepathy-ytstenut-glib \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libtelepathy_ytstenut_glib_la_SOURCES) \ + $(nodist_libtelepathy_ytstenut_glib_la_SOURCES) \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(AM_LDFLAGS) $(libtelepathy_ytstenut_glib_la_LIBADD) \ + > $@ diff --git a/telepathy-ytstenut-glib/extensions/Makefile.am b/telepathy-ytstenut-glib/extensions/Makefile.am index 159a93a..e6db5c4 100644 --- a/telepathy-ytstenut-glib/extensions/Makefile.am +++ b/telepathy-ytstenut-glib/extensions/Makefile.am @@ -67,4 +67,16 @@ _gen/cli-connection-future-body.h _gen/cli-connection-future.h: _gen/all.xml \ --subclass-assert=TP_IS_CONNECTION \ --iface-quark-prefix=_TP_YTS_IFACE_QUARK \ --tp-proxy-api=0.7.6 \ - $< _Tp_Yts_Cli _gen/cli-connection-future \ No newline at end of file + $< _Tp_Yts_Cli _gen/cli-connection-future + +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer -:PROJECT telepathy-ytstenut \ + -:SHARED future-extensions -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libfuture_extensions_la_SOURCES) \ + $(nodist_libfuture_extensions_la_SOURCES) \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(AM_LDFLAGS) $(libfuture_extensions_la_LIBADD) \ + > $@ diff --git a/telepathy-ytstenut-glib/tests/Makefile.am b/telepathy-ytstenut-glib/tests/Makefile.am index f052e21..0bb08b4 100644 --- a/telepathy-ytstenut-glib/tests/Makefile.am +++ b/telepathy-ytstenut-glib/tests/Makefile.am @@ -27,3 +27,26 @@ noinst_PROGRAMS = \ server-passing-service \ server-passing-status \ server-file-transfer + +Android.mk: Makefile.am + androgenizer -:PROJECT telepathy-ytstenut-glib \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:EXECUTABLE nosey-status -:TAGS eng debug \ + -:SOURCES nosey-status.c \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(AM_LDFLAGS) $(LDADD) libfuture-extensions.la \ + -:EXECUTABLE passing-service -:TAGS eng debug \ + -:SOURCES passing-service.c \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(AM_LDFLAGS) $(LDADD) libfuture-extensions.la \ + -:EXECUTABLE passing-status -:TAGS eng debug \ + -:SOURCES passing-status.c \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(AM_LDFLAGS) $(LDADD) libfuture-extensions.la \ + > $@ -- 1.7.7.3