From 05cac184852d8b5df8f1c5d290d3de73c4c9d921 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 21 Oct 2015 10:36:54 +0200 Subject: [PATCH] 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. --- src/frontends/gnome/properties/Makefile.am | 34 +++++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/frontends/gnome/properties/Makefile.am b/src/frontends/gnome/properties/Makefile.am index 66f2d5124..f98ce73b8 100644 --- a/src/frontends/gnome/properties/Makefile.am +++ b/src/frontends/gnome/properties/Makefile.am @@ -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)