]> git.0d.be Git - empathy.git/commitdiff
UOA account plugins: move shared code to a shared lib
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 6 Sep 2012 08:12:44 +0000 (10:12 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 6 Sep 2012 08:59:52 +0000 (10:59 +0200)
Avoid to redefine existing symbols when different plugins are loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=683415

ubuntu-online-accounts/cc-plugins/account-plugins/Makefile.am
ubuntu-online-accounts/cc-plugins/generate-plugins.py

index 1d84b28654c2d15b072c841ed5144a80e9a91030..7a5ac57aec6cc05bac815ee1e811006d97c8f9a6 100644 (file)
@@ -12,6 +12,23 @@ INCLUDES =                                   \
        $(DISABLE_DEPRECATED)                   \
        $(EMPATHY_CFLAGS)
 
+pkglib_LTLIBRARIES = libempathy-uoa-account-plugin.la
+
+# this API is not stable and will never be, so use -release to make the
+# SONAME of the plugin library change with every Empathy release.
+libempathy_uoa_account_plugin_la_LDFLAGS = \
+   -no-undefined \
+   -release $(VERSION)
+
+libempathy_uoa_account_plugin_la_SOURCES = \
+       empathy-accounts-plugin.c \
+       empathy-accounts-plugin.h \
+       empathy-accounts-plugin-widget.c \
+       empathy-accounts-plugin-widget.h
+
+libempathy_uoa_account_plugin_la_LIBADD = \
+       $(UOA_LIBS)
+
 plugin_LTLIBRARIES = \
        libaim.la\
        libgadugadu.la\
@@ -30,196 +47,140 @@ plugin_LTLIBRARIES = \
        $(NULL)
 
 libaim_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-aim.c \
-       empathy-accounts-plugin-aim.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-aim.h
 libaim_la_LDFLAGS = -module -avoid-version
 libaim_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libgadugadu_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-gadugadu.c \
-       empathy-accounts-plugin-gadugadu.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-gadugadu.h
 libgadugadu_la_LDFLAGS = -module -avoid-version
 libgadugadu_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libgroupwise_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-groupwise.c \
-       empathy-accounts-plugin-groupwise.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-groupwise.h
 libgroupwise_la_LDFLAGS = -module -avoid-version
 libgroupwise_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libicq_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-icq.c \
-       empathy-accounts-plugin-icq.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-icq.h
 libicq_la_LDFLAGS = -module -avoid-version
 libicq_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libirc_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-irc.c \
-       empathy-accounts-plugin-irc.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-irc.h
 libirc_la_LDFLAGS = -module -avoid-version
 libirc_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libjabber_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-jabber.c \
-       empathy-accounts-plugin-jabber.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-jabber.h
 libjabber_la_LDFLAGS = -module -avoid-version
 libjabber_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libmxit_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-mxit.c \
-       empathy-accounts-plugin-mxit.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-mxit.h
 libmxit_la_LDFLAGS = -module -avoid-version
 libmxit_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libmyspace_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-myspace.c \
-       empathy-accounts-plugin-myspace.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-myspace.h
 libmyspace_la_LDFLAGS = -module -avoid-version
 libmyspace_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libsip_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-sip.c \
-       empathy-accounts-plugin-sip.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-sip.h
 libsip_la_LDFLAGS = -module -avoid-version
 libsip_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 liblocal_xmpp_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-local-xmpp.c \
-       empathy-accounts-plugin-local-xmpp.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-local-xmpp.h
 liblocal_xmpp_la_LDFLAGS = -module -avoid-version
 liblocal_xmpp_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libsametime_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-sametime.c \
-       empathy-accounts-plugin-sametime.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-sametime.h
 libsametime_la_LDFLAGS = -module -avoid-version
 libsametime_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libyahoojp_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-yahoojp.c \
-       empathy-accounts-plugin-yahoojp.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-yahoojp.h
 libyahoojp_la_LDFLAGS = -module -avoid-version
 libyahoojp_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libyahoo_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-yahoo.c \
-       empathy-accounts-plugin-yahoo.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-yahoo.h
 libyahoo_la_LDFLAGS = -module -avoid-version
 libyahoo_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 
 
 libzephyr_la_SOURCES = \
-       empathy-accounts-plugin.c \
-       empathy-accounts-plugin.h \
        empathy-accounts-plugin-zephyr.c \
-       empathy-accounts-plugin-zephyr.h \
-       empathy-accounts-plugin-widget.c \
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-zephyr.h
 libzephyr_la_LDFLAGS = -module -avoid-version
 libzephyr_la_LIBADD = \
-       $(UOA_LIBS)                                     \
+       libempathy-uoa-account-plugin.la \
        $(top_builddir)/libempathy/libempathy.la \
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
index b3b54f6e2f9f04de1ecde0f10309da80e3bf7774..a5acab4889efe27e775400d08263cb2a09cff3ea 100755 (executable)
@@ -179,15 +179,11 @@ def generate_build_block(p):
     la = 'lib%s_la' % p.protocol.replace('-', '_')
 
     output = '''%s_SOURCES = \\
-       empathy-accounts-plugin.c \\
-       empathy-accounts-plugin.h \\
        empathy-accounts-plugin-%s.c \\
-       empathy-accounts-plugin-%s.h \\
-       empathy-accounts-plugin-widget.c \\
-       empathy-accounts-plugin-widget.h
+       empathy-accounts-plugin-%s.h
 %s_LDFLAGS = -module -avoid-version
 %s_LIBADD = \\
-       $(UOA_LIBS)                                     \\
+       libempathy-uoa-account-plugin.la \\
        $(top_builddir)/libempathy/libempathy.la \\
        $(top_builddir)/libempathy-gtk/libempathy-gtk.la
 ''' % (la, p.protocol, p.protocol, la, la)
@@ -228,6 +224,23 @@ INCLUDES =                                 \\
        $(DISABLE_DEPRECATED)                   \\
        $(EMPATHY_CFLAGS)
 
+pkglib_LTLIBRARIES = libempathy-uoa-account-plugin.la
+
+# this API is not stable and will never be, so use -release to make the
+# SONAME of the plugin library change with every Empathy release.
+libempathy_uoa_account_plugin_la_LDFLAGS = \\
+   -no-undefined \\
+   -release $(VERSION)
+
+libempathy_uoa_account_plugin_la_SOURCES = \\
+       empathy-accounts-plugin.c \\
+       empathy-accounts-plugin.h \\
+       empathy-accounts-plugin-widget.c \\
+       empathy-accounts-plugin-widget.h
+
+libempathy_uoa_account_plugin_la_LIBADD = \\
+       $(UOA_LIBS)
+
 plugin_LTLIBRARIES = \\
 %s \\
        $(NULL)