summaryrefslogtreecommitdiff
path: root/dbus/Makefile.am
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@chromium.org>2014-08-20 15:43:23 -0700
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-20 20:49:45 +0000
commit57696a2e8a5eb2df3177f5b52c512a14f3cab1f5 (patch)
tree01646dc540fc6d36b4d5e00a1bce6d42564b3a30 /dbus/Makefile.am
parent7d214f4d5855c43a7aa0bec385d93e4a67a09f5f (diff)
downloaddbus-57696a2e8a5eb2df3177f5b52c512a14f3cab1f5.tar.gz
Link dbus-daemon and dbus-daemon-lauch-helper against libdbus
The shared can be used by dbus-daemon and dbus-daemon-launch-helper by exporting the private symbols needed, reducing the size of dbus by about 500k. The private symbols are exposed under the version LIBDBUS_PRIVATE_@VERSION_NUMBER@. [Altered by Simon McVittie and Ralf Habacker to clear up some problematic linking.] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'dbus/Makefile.am')
-rw-r--r--dbus/Makefile.am23
1 files changed, 9 insertions, 14 deletions
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index 2dcb0c39..56668d30 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -54,9 +54,6 @@ else
dbus_res =
dbus_res_ldflag =
no_undefined =
-## don't export symbols that start with "_" (we use this
-## convention for internal symbols)
-export_symbols = -export-symbols-regex "^[^_].*"
intllibs = @LTLIBINTL@
@@ -275,34 +272,33 @@ libdbus_1_la_SOURCES= \
$(DBUS_SHARED_SOURCES)
libdbus_internal_la_SOURCES= \
- $(DBUS_LIB_SOURCES) \
- $(DBUS_SHARED_SOURCES) \
$(DBUS_UTIL_SOURCES)
BUILT_SOURCES=$(nodist_dbusarchinclude_HEADERS)
EXTRA_DIST=dbus-arch-deps.h.in
-## this library is the same as libdbus, but exports all the symbols
-## and is only used for static linking within the dbus package.
noinst_LTLIBRARIES=libdbus-internal.la
libdbus_1_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-Ddbus_1_EXPORTS \
$(NULL)
+
+if HAVE_LD_VERSION_SCRIPT
+SYMBOL_EXPORT_LDFLAGS=-Wl,--version-script=Version
+else
+SYMBOL_EXPORT_LDFLAGS=
+endif
+
libdbus_1_la_LIBADD= $(LIBDBUS_LIBS)
libdbus_1_la_LDFLAGS = \
$(AM_LDFLAGS) \
- $(export_symbols) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ $(SYMBOL_EXPORT_LDFLAGS) \
-no-undefined \
$(NULL)
-libdbus_internal_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DDBUS_STATIC_BUILD \
- $(NULL)
-libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS)
+libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) libdbus-1.la
if DBUS_WIN
# This must be a separate convenience library, otherwise libtool notices
@@ -312,7 +308,6 @@ if DBUS_WIN
noinst_LTLIBRARIES += libdbus-init-win.la
libdbus_init_win_la_SOURCES = dbus-init-win.cpp
libdbus_1_la_LIBADD += libdbus-init-win.la
-libdbus_internal_la_LIBADD += libdbus-init-win.la
endif
noinst_PROGRAMS =