summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-01-20 07:21:24 (GMT)
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-05-28 16:16:18 (GMT)
commitc2260430f99491c7bddeb48801d0c1326f8353cb (patch)
tree05f4202aa3bbf9f0ee011a8ce11da02f7c4c4e43
parent37a284f50a93b772d86e8c68a346266aab5de7a5 (diff)
downloadlibtool-c2260430f99491c7bddeb48801d0c1326f8353cb.tar.gz
libtool-c2260430f99491c7bddeb48801d0c1326f8353cb.tar.xz
build: Add an Android-friendly build system
-rw-r--r--Android.mk40
-rw-r--r--libltdl/libltdl-symdef.c51
-rw-r--r--libltdl/ltdl.mk99
3 files changed, 190 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..58ae7af
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,40 @@
+# This file is the top android makefile for all sub-modules.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+ltdl_TOP := $(LOCAL_PATH)
+
+LTDL_BUILT_SOURCES := libltdl/argz.h \
+ libltdl/Android.mk
+
+LTDL_BUILT_SOURCES := $(patsubst %, $(abspath $(ltdl_TOP))/%, $(LTDL_BUILT_SOURCES))
+
+.PHONY: ltdl-configure ltdl-configure-real
+ltdl-configure-real:
+ echo $(LTDL_BUILT_SOURCES)
+ cd $(ltdl_TOP) ; \
+ reconfdirs='libltdl' $(abspath $(ltdl_TOP))/bootstrap ; \
+ cd $(ltdl_TOP)/libltdl ; \
+ 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=/ \
+ $(abspath $(ltdl_TOP))/libltdl/configure --host=$(CONFIGURE_HOST) \
+ --prefix=/system \
+ --enable-ltdl-install \
+ && \
+ for file in $(LTDL_BUILT_SOURCES); do \
+ rm -f $$file && \
+ make -C $$(dirname $$file) $$(basename $$file) ; \
+ done
+
+ltdl-configure: ltdl-configure-real
+
+PA_CONFIGURE_TARGETS += ltdl-configure
+
+-include $(ltdl_TOP)/libltdl/Android.mk
diff --git a/libltdl/libltdl-symdef.c b/libltdl/libltdl-symdef.c
new file mode 100644
index 0000000..0f9b38c
--- /dev/null
+++ b/libltdl/libltdl-symdef.c
@@ -0,0 +1,51 @@
+/* libltdlS.c - symbol resolution table for `libltdl' dlsym emulation. */
+/* Generated by libtool (GNU libtool) 2.4.2.123-1186-dirty */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */
+extern int dlopen_LTX_get_vtable();
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_libltdl_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_libltdl_LTX_preloaded_symbols[] =
+{ { "libltdl", (void *) 0 },
+ {"dlopen.a", (void *) 0},
+ {"dlopen_LTX_get_vtable", (void *) &dlopen_LTX_get_vtable},
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_libltdl_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/libltdl/ltdl.mk b/libltdl/ltdl.mk
index dd3fc62..e02c571 100644
--- a/libltdl/ltdl.mk
+++ b/libltdl/ltdl.mk
@@ -145,3 +145,102 @@ libltdl/argz.h: libltdl/argz_.h
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += libltdl/argz.h \
libltdl/argz.h-t
+
+ANDROID_CFLAGS = -I$(top_srcdir) -DHAVE_CONFIG_H
+
+Android.mk: Makefile.am
+ androgenizer -:PROJECT libltdl \
+ -:STATIC libdlopen \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libltdl_libltdl_dlopen_la_SOURCES) \
+ $(nodist_libltdl_dlopen_la_SOURCES) \
+ -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+ $(libltdl_libltdl_libltdl_la_CFLAGS) \
+ -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+ -:LDFLAGS $(libltdl_libltdl_dlopen_la_LDFLAGS) \
+ $(libltdl_libltdl_dlopen_la_LIBADD) \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ LOCAL_MODULE_PATH:=$$\(TARGET_OUT\)/lib/libltdl \
+ \
+ -:SHARED libltdl \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libltdl_libltdl_libltdl_la_SOURCES) argz.c \
+ $(nodist_libltdl_libltdl_la_SOURCES) libltdl-symdef.c \
+ -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+ $(libltdl_libltdl_libltdl_la_CFLAGS) \
+ -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+ -:LDFLAGS $(libltdl_libltdl_libltdl_la_LDFLAGS) \
+ $(libltdl_libltdl_libltdl_la_LIBADD) -ldl -ldlopen \
+ -:LIBFILTER_STATIC dlopen \
+ -:HEADER_TARGET libltdl \
+ -:HEADERS $(libltdl_libltdl_ltdlinclude_HEADERS) \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ \
+ -:STATIC I_JUST_WANT_TO_INSTALL_A_HEADER \
+ -:TAGS eng debug \
+ -:HEADERS $(include_HEADERS) \
+ > $@
+# we're not building the other loaders for now
+# \
+# -:SHARED dld_link \
+# -:TAGS eng debug \
+# -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+# -:SOURCES $(libltdl_libltdl_dld_link_la_SOURCES) \
+# $(nodist_libltdl_dld_link_la_SOURCES) \
+# -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+# $(libltdl_libltdl_libltdl_la_CFLAGS) \
+# -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+# -:LDFLAGS $(libltdl_libltdl_dld_link_la_LDFLAGS) \
+# $(libltdl_libltdl_dld_link_la_LIBADD) \
+# -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+# \
+# -:SHARED dyld \
+# -:TAGS eng debug \
+# -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+# -:SOURCES $(libltdl_libltdl_dyld_la_SOURCES) \
+# $(nodist_libltdl_dyld_la_SOURCES) \
+# -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+# $(libltdl_libltdl_libltdl_la_CFLAGS) \
+# -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+# -:LDFLAGS $(libltdl_libltdl_dyld_la_LDFLAGS) \
+# $(libltdl_libltdl_dyld_la_LIBADD) \
+# -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+# \
+# -:SHARED load_add_on \
+# -:TAGS eng debug \
+# -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+# -:SOURCES $(libltdl_libltdl_load_add_on_la_SOURCES) \
+# $(nodist_libltdl_load_add_on_la_SOURCES) \
+# -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+# $(libltdl_libltdl_libltdl_la_CFLAGS) \
+# -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+# -:LDFLAGS $(libltdl_libltdl_load_add_on_la_LDFLAGS) \
+# $(libltdl_libltdl_load_add_on_la_LIBADD) \
+# -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+# \
+# -:SHARED loadlibrary \
+# -:TAGS eng debug \
+# -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+# -:SOURCES $(libltdl_libltdl_loadlibrary_la_SOURCES) \
+# $(nodist_libltdl_loadlibrary_la_SOURCES) \
+# -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+# $(libltdl_libltdl_libltdl_la_CFLAGS) \
+# -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+# -:LDFLAGS $(libltdl_libltdl_loadlibrary_la_LDFLAGS) \
+# $(libltdl_libltdl_loadlibrary_la_LIBADD) \
+# -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+# \
+# -:SHARED shl_load \
+# -:TAGS eng debug \
+# -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+# -:SOURCES $(libltdl_libltdl_shl_load_la_SOURCES) \
+# $(nodist_libltdl_shl_load_la_SOURCES) \
+# -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) \
+# $(libltdl_libltdl_libltdl_la_CFLAGS) \
+# -:CPPFLAGS $(libltdl_libltdl_libltdl_la_CPPFLAGS) \
+# -:LDFLAGS $(libltdl_libltdl_shl_load_la_LDFLAGS) \
+# $(libltdl_libltdl_shl_load_la_LIBADD) \
+# -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+#