From a094e063bef8a5ce6980652735fc778f0b255a57 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 20 Apr 2011 12:14:23 -0400 Subject: [PATCH] Support building on Android --- .gitignore | 1 + Android.mk | 35 +++++++++++++++++++++++++++++++++++ dbus/Makefile.am | 9 +++++++++ 3 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 Android.mk diff --git a/.gitignore b/.gitignore index c568858..5652fa8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.gcda *.libs *.lineno +Android.mk dbus-glib-*.tar.gz Makefile Makefile.in diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..8ba5609 --- /dev/null +++ b/Android.mk @@ -0,0 +1,35 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +DBUS_GLIB_BUILT_SOURCES := \ + dbus-glib-1.pc \ + dbus/Android.mk + +dbus-glib-configure-real: + cd $(DBUS_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) \ + ac_cv_have_abstract_sockets=no \ + ac_cv_lib_expat_XML_ParserCreate_MM=yes \ + $(DBUS_GLIB_TOP)/$(CONFIGURE) --host=arm-linux-androideabi \ + --disable-nls --disable-gtk-doc && \ + for file in $(DBUS_GLIB_BUILT_SOURCES); do \ + rm -f $$file && \ + make -C $$(dirname $$file) $$(basename $$file) ; \ + done + +dbus-glib-configure: dbus-glib-configure-real + +.PHONY: dbus-glib-configure + +CONFIGURE_TARGETS += dbus-glib-configure + +#include all the subdirs... +-include $(DBUS_GLIB_TOP)/dbus/Android.mk diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 325f8bb..b865286 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -101,6 +101,15 @@ dbus_bash_completion_helper_LDADD=$(builddir)/libdbus-gtool.la -lexpat $(builddi EXTRA_DIST=dbus-gmarshal.list dbus-bash-completion.sh.in +Android.mk: Makefile.am + androgenizer -:PROJECT dbus-glib -:SHARED libdbus-glib-1 -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libdbus_glib_1_la_SOURCES) \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -:LDFLAGS $(libdbus_glib_1_la_LIBADD) $(libdbus_glib_1_la_LDFLAGS) \ + > $@ + if DBUS_BUILD_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we -- 1.7.7