summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.co.uk>2011-05-13 15:44:54 (GMT)
committerDerek Foreman <derek.foreman@collabora.co.uk>2011-05-13 15:44:54 (GMT)
commit770d0ec89b95574df22c123c443bb79a0cd6606c (patch)
tree37ade3b41db4a32a30fdcb3e63d6bda8b534599c
parent9fcc28e0e8f84968d1fb8b6d544a42efb13803ec (diff)
downloadlibdaemon-770d0ec89b95574df22c123c443bb79a0cd6606c.tar.gz
libdaemon-770d0ec89b95574df22c123c443bb79a0cd6606c.tar.xz
Support building on Android
-rw-r--r--.gitignore1
-rw-r--r--Android.mk33
-rw-r--r--libdaemon/Makefile.am10
3 files changed, 44 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 213e254..f348de0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+Android.mk
compile
*~
*.tar.gz
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..43edd6b
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LIBDAEMON_BUILT_SOURCES := \
+ libdaemon/Android.mk
+
+libdaemon-configure-real:
+ cd $(LIBDAEMON_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) \
+ $(LIBDAEMON_TOP)/bootstrap.sh --host=arm-linux-androideabi \
+ ac_cv_func_setpgrp_void=yes \
+ --disable-Werror && \
+ for file in $(LIBDAEMON_BUILT_SOURCES); do \
+ rm -f $$file && \
+ make -C $$(dirname $$file) $$(basename $$file) ; \
+ done
+
+libdaemon-configure: libdaemon-configure-real
+
+.PHONY: libdaemon-configure
+
+CONFIGURE_TARGETS += libdaemon-configure
+
+#include all the subdirs...
+-include $(LIBDAEMON_TOP)/libdaemon/Android.mk
diff --git a/libdaemon/Makefile.am b/libdaemon/Makefile.am
index 220006a..878707f 100644
--- a/libdaemon/Makefile.am
+++ b/libdaemon/Makefile.am
@@ -40,3 +40,13 @@ libdaemon_la_SOURCES = \
$(pkg_include_HEADERS)
libdaemon_la_LDFLAGS = -version-info $(LIBDAEMON_VERSION_INFO) $(LDFLAGS_NOUNDEFINED)
+
+Android.mk: Makefile.am
+ androgenizer -:PROJECT libdaemon -:SHARED daemon -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libdaemon_la_SOURCES) \
+ -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CFLAGS) \
+ -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS)\
+ -:LDFLAGS $(libdaemon_la_LDFLAGS) -llog \
+ > $@