From 9934bdc707529ada492b070ef0079fa23628b7f2 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 16 May 2011 09:54:48 -0400 Subject: [PATCH] Support building under Android --- .gitignore | 1 + Android.mk | 32 ++++++++++++++++++++++++++++++++ wocky/Makefile.am | 11 ++++++++++- 3 files changed, 43 insertions(+), 1 deletions(-) create mode 100644 Android.mk diff --git a/.gitignore b/.gitignore index dcab629..8b1aaec 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ valgrind.*.log .cvsignore Thumbs.db autom4te.cache +Android.mk Makefile Makefile.in INSTALL diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..b9f2c9d --- /dev/null +++ b/Android.mk @@ -0,0 +1,32 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +WOCKY_BUILT_SOURCES := \ + wocky/Android.mk + +wocky-configure-real: + cd $(WOCKY_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) \ + $(WOCKY_TOP)/$(CONFIGURE) --host=arm-linux-androideabi \ + --disable-Werror && \ + for file in $(WOCKY_BUILT_SOURCES); do \ + rm -f $$file && \ + make -C $$(dirname $$file) $$(basename $$file) ; \ + done + +wocky-configure: wocky-configure-real + +.PHONY: wocky-configure + +CONFIGURE_TARGETS += wocky-configure + +#include all the subdirs... +-include $(WOCKY_TOP)/wocky/Android.mk diff --git a/wocky/Makefile.am b/wocky/Makefile.am index 330ff78..4039ed3 100644 --- a/wocky/Makefile.am +++ b/wocky/Makefile.am @@ -238,4 +238,13 @@ $(filter %-enumtypes.c,$(built_sources)): %-enumtypes.c: %.h Makefile.in --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ $< > $@ - +Android.mk: Makefile.am $(built_sources) $(built_headers) + androgenizer -:PROJECT wocky -:SHARED wocky -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(handwritten_sources) $(built_sources) \ + -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFLAGS) \ + -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ + -I$(abs_top_srcdir)/../libgcrypt/src \ + -I$(abs_top_srcdir)/../libgpg-error/src \ + -:LDFLAGS $(AM_LDFLAGS) \ + > $@ -- 1.7.7