[network-manager-openconnect/lr/libnm: 4/5] fixup! build: split the plugin into two halves



commit 74f7ee265f4548ddb30322e501a531e93979c677
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Jul 16 17:41:41 2015 +0200

    fixup! build: split the plugin into two halves

 nm-openconnect-service.name.in |    2 +-
 properties/Makefile.am         |   40 +++++++++++++++-------------------------
 properties/auth-helpers.h      |    4 ++--
 properties/nm-openconnect.c    |    6 +++---
 4 files changed, 21 insertions(+), 31 deletions(-)
---
diff --git a/nm-openconnect-service.name.in b/nm-openconnect-service.name.in
index ad74b19..036aa04 100644
--- a/nm-openconnect-service.name.in
+++ b/nm-openconnect-service.name.in
@@ -4,7 +4,7 @@ service=org.freedesktop.NetworkManager.openconnect
 program= LIBEXECDIR@/nm-openconnect-service
 
 [libnm]
-properties= PLUGINDIR@/libnm-openvpn-properties-new
+properties= PLUGINDIR@/libnm-openvpn-properties
 
 [GNOME]
 auth-dialog= LIBEXECDIR@/nm-openconnect-auth-dialog
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 53cd992..207f146 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,28 +1,23 @@
 plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-openconnect-properties-new.la libnm-openconnect-properties-old.la
+plugin_LTLIBRARIES = libnm-openconnect-properties.la libnm-openconnect-properties-old.la
 
-libnm_openconnect_properties_new_la_SOURCES = \
+libnm_openconnect_properties_la_SOURCES = \
        auth-helpers.c \
        auth-helpers.h \
        nm-openconnect.c \
        nm-openconnect.h
 
 libnm_openconnect_properties_old_la_SOURCES = \
-       auth-helpers.c \
-       auth-helpers.h \
-       nm-openconnect.c \
-       nm-openconnect.h
+       $(libnm_openconnect_properties_la_SOURCES)
 
 uidir = $(datadir)/gnome-vpn-properties/openconnect
 ui_DATA = nm-openconnect-dialog.ui
 
-libnm_openconnect_properties_new_la_CFLAGS =            \
-       -DNM_OPENCONNECT_NEW                            \
+common_CFLAGS =                                         \
        $(GLIB_CFLAGS)                                  \
        $(GTK_CFLAGS)                                   \
-       $(LIBNM_CFLAGS)                                 \
        $(OPENCONNECT_CFLAGS)                           \
-       -I$(top_srcdir)/src                             \
+       -I$(top_srcdir)/src                             \
        -DICONDIR=\""$(datadir)/pixmaps"\"              \
        -DUIDIR=\""$(uidir)"\"                          \
        -DG_DISABLE_DEPRECATED                          \
@@ -30,23 +25,18 @@ libnm_openconnect_properties_new_la_CFLAGS =            \
        -DLOCALEDIR=\"$(datadir)/locale\"               \
        -DVERSION=\"$(VERSION)\"
 
+libnm_openconnect_properties_la_CFLAGS =                \
+       $(common_CFLAGS)                                \
+       $(LIBNM_CFLAGS)
+
 libnm_openconnect_properties_old_la_CFLAGS =            \
        -DNM_OPENCONNECT_OLD                            \
-       $(GLIB_CFLAGS)                                  \
-       $(GTK_CFLAGS)                                   \
-       $(NM_CFLAGS)                                    \
-       $(OPENCONNECT_CFLAGS)                           \
-       -I$(top_srcdir)/src                             \
-       -DICONDIR=\""$(datadir)/pixmaps"\"              \
-       -DUIDIR=\""$(uidir)"\"                          \
-       -DG_DISABLE_DEPRECATED                          \
-       -DGDK_DISABLE_DEPRECATED                        \
-       -DLOCALEDIR=\"$(datadir)/locale\"               \
-       -DVERSION=\"$(VERSION)\"
+       $(common_CFLAGS)                                \
+       $(NM_CFLAGS)
 
-libnm_openconnect_properties_new_la_LIBADD = \
+libnm_openconnect_properties_la_LIBADD = \
        $(GTK_LIBS) \
-       $(NM_LIBS) \
+       $(LIBNM_LIBS) \
        $(OPENCONNECT_LIBS)
 
 libnm_openconnect_properties_old_la_LIBADD = \
@@ -54,11 +44,11 @@ libnm_openconnect_properties_old_la_LIBADD = \
        $(NM_LIBS) \
        $(OPENCONNECT_LIBS)
 
-libnm_openconnect_properties_new_la_LDFLAGS = \
+libnm_openconnect_properties_la_LDFLAGS = \
        -avoid-version
 
 libnm_openconnect_properties_old_la_LDFLAGS = \
-       -avoid-version
+       $(libnm_openconnect_properties_la_LDFLAGS)
 
 CLEANFILES = *.bak *~
 
diff --git a/properties/auth-helpers.h b/properties/auth-helpers.h
index 20f968b..97370af 100644
--- a/properties/auth-helpers.h
+++ b/properties/auth-helpers.h
@@ -31,9 +31,9 @@
 #include <nm-setting-vpn.h>
 
 #define NMSettingVpn NMSettingVPN
-#endif
 
-#ifdef NM_OPENCONNECT_NEW
+#else /* !NM_OPENCONNECT_OLD */
+
 #include <NetworkManager.h>
 #endif
 
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index b2f0800..7a64bf9 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -79,9 +79,9 @@
 
 #define OPENCONNECT_PLUGIN_UI_ERROR                   NM_SETTING_VPN_ERROR
 #define OPENCONNECT_PLUGIN_UI_ERROR_INVALID_PROPERTY  NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-#endif
 
-#ifdef NM_OPENCONNECT_NEW
+#else /* !NM_OPENCONNECT_OLD */
+
 #include <NetworkManager.h>
 
 #define OPENCONNECT_PLUGIN_UI_ERROR                   NM_CONNECTION_ERROR
@@ -99,7 +99,7 @@
 
 /************** plugin class **************/
 
-#ifdef NM_OPENCONNECT_NEW
+#ifndef NM_OPENCONNECT_OLD
 enum {
        PROP_0,
        PROP_NAME,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]