nm: Build two plugin binaries from the single source

They're both the same now. We'll port the new one to libnm in follow-up commits.

NetworkManager 1.2 (which is currently versioned as 1.1.0) is going to bring
some new ABI while still supporting the old one. There's new VPN service and
UI plugin APIs in libnm.

There's one difficulty though -- the connection editor 1.2 will be linked
against libnm and a new libnma library it will provide (as opposed to
libnm-glib and libnm-gtk), thus will be incapable of loading of property
plugins that are linked with the old libraries (due to glib type system
limitations).

However, we must not break support for other connection editors (GNOME control
center, older versions of nm-connection-editor, etc.) therefore we need
to build two versions of the property plugin. NetworkManager 1.2's libnm will
provide a shim that makes it easy.
This commit is contained in:
Lubomir Rintel 2015-10-21 10:36:54 +02:00 committed by Tobias Brunner
parent 42c562c27a
commit 05cac18485
1 changed files with 26 additions and 8 deletions

View File

@ -1,25 +1,43 @@
nm_plugin_LTLIBRARIES = libnm-strongswan-properties.la
nm_plugin_LTLIBRARIES = libnm-vpn-plugin-strongswan.la
nm_plugin_LTLIBRARIES += libnm-strongswan-properties.la
libnm_strongswan_properties_la_SOURCES = \
libnm_vpn_plugin_strongswan_la_SOURCES = \
nm-strongswan.c \
nm-strongswan.h
libnm_strongswan_properties_la_SOURCES = \
$(libnm_vpn_plugin_strongswan_la_SOURCES)
uidir = $(datadir)/gnome-vpn-properties/strongswan
ui_DATA = nm-strongswan-dialog.ui
libnm_strongswan_properties_la_CFLAGS = \
common_CFLAGS = \
$(GTK_CFLAGS) \
$(NM_UTILS_CFLAGS) \
-DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DVERSION=\"$(VERSION)\"
-DGDK_DISABLE_DEPRECATED
libnm_strongswan_properties_la_LIBADD = \
libnm_vpn_plugin_strongswan_la_CFLAGS = \
$(NM_UTILS_CFLAGS) \
$(common_CFLAGS)
libnm_strongswan_properties_la_CFLAGS = \
-DNM_STRONGSWAN_OLD \
$(NM_UTILS_CFLAGS) \
$(common_CFLAGS)
libnm_vpn_plugin_strongswan_la_LIBADD = \
$(GTK_LIBS) \
$(NM_UTILS_LIBS)
libnm_strongswan_properties_la_LDFLAGS = \
libnm_strongswan_properties_la_LIBADD = \
$(GTK_LIBS) \
$(NM_UTILS_LIBS)
libnm_vpn_plugin_strongswan_la_LDFLAGS = \
-avoid-version
libnm_strongswan_properties_la_LDFLAGS = \
$(libnm_vpn_plugin_strongswan_la_LDFLAGS)
EXTRA_DIST = $(ui_DATA)