[network-manager-libreswan/th/vpn-editor-split: 5/18] build: move "common" directory to "shared"
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-libreswan/th/vpn-editor-split: 5/18] build: move "common" directory to "shared"
- Date: Wed, 18 May 2016 10:10:09 +0000 (UTC)
commit 4a1e4b50ecb6f3983a2f4f9de7fff2e94e68f860
Author: Thomas Haller <thaller redhat com>
Date: Tue May 10 09:38:39 2016 +0200
build: move "common" directory to "shared"
Makefile.am | 2 +-
common/Makefile.am | 24 ------------------------
configure.ac | 1 -
properties/Makefile.am | 5 ++---
shared/Makefile.am | 44 +++++++++++++++++++++++++++++++++++++++++++-
{common => shared}/utils.c | 3 ++-
{common => shared}/utils.h | 5 +++++
src/Makefile.am | 5 ++---
8 files changed, 55 insertions(+), 34 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7a67d74..e1bb684 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = shared common src
+SUBDIRS = shared src
if WITH_GNOME
SUBDIRS += auth-dialog properties po
diff --git a/configure.ac b/configure.ac
index 15552ce..19ee0a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,7 +113,6 @@ NM_COMPILER_WARNINGS
AC_CONFIG_FILES([
Makefile
-common/Makefile
src/Makefile
auth-dialog/Makefile
properties/Makefile
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 7865925..f368107 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -8,7 +8,6 @@ common_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
-I"$(top_srcdir)/shared/" \
- -I$(top_srcdir)/common \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(datadir)/locale\"
@@ -35,13 +34,13 @@ libnm_vpn_plugin_libreswan_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
- $(top_builddir)/common/libnm-libreswan-common.la
+ $(top_builddir)/shared/libnm-vpn-plugin-libreswan-shared.la
libnm_libreswan_properties_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_GLIB_LIBS) \
$(LIBNM_GTK_LIBS) \
- $(top_builddir)/common/libnm-vpn-plugin-libreswan-common.la
+ $(top_builddir)/shared/libnm-libreswan-shared.la
libnm_vpn_plugin_libreswan_la_LDFLAGS = \
-avoid-version
diff --git a/shared/Makefile.am b/shared/Makefile.am
index e0219d4..b71ce26 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -1,2 +1,44 @@
+noinst_LTLIBRARIES = \
+ libnm-vpn-plugin-libreswan-shared.la
+if WITH_LIBNM_GLIB
+noinst_LTLIBRARIES += libnm-libreswan-shared.la
+endif
+
+shared_sources = \
+ utils.c \
+ utils.h \
+ nm-service-defines.h
+
+shared_CPPFLAGS = \
+ -DLIBEXECDIR=\""$(libexecdir)"\" \
+ -I"$(top_srcdir)/shared/"
+
+###############################################################################
+
+libnm_vpn_plugin_libreswan_shared_la_CPPFLAGS = \
+ $(LIBNM_CFLAGS) \
+ $(shared_CPPFLAGS)
+
+libnm_vpn_plugin_libreswan_shared_la_SOURCES= \
+ $(shared_sources)
+
+libnm_vpn_plugin_libreswan_shared_la_LIBADD = \
+ $(LIBNM_LIBS)
+
+###############################################################################
+
+libnm_libreswan_shared_la_SOURCES = \
+ $(shared_sources)
+
+libnm_libreswan_shared_la_CPPFLAGS = \
+ -DNM_VPN_OLD \
+ $(LIBNM_GLIB_CFLAGS) \
+ $(shared_CPPFLAGS)
+
+libnm_libreswan_shared_la_LIBADD = \
+ $(LIBNM_GLIB_LIBS)
+
+###############################################################################
+
EXTRA_DIST = \
- nm-service-defines.h
+ nm-service-defines.h
diff --git a/common/utils.c b/shared/utils.c
similarity index 99%
rename from common/utils.c
rename to shared/utils.c
index f46c11a..ba2124c 100644
--- a/common/utils.c
+++ b/shared/utils.c
@@ -24,12 +24,13 @@
#include <unistd.h>
#include <string.h>
#include <glib.h>
-#include <NetworkManager.h>
#ifdef NM_VPN_OLD
#define NM_VPN_LIBNM_COMPAT
#include <nm-connection.h>
#define nm_simple_connection_new nm_connection_new
+#else
+#include <NetworkManager.h>
#endif
#include "nm-service-defines.h"
diff --git a/common/utils.h b/shared/utils.h
similarity index 95%
rename from common/utils.h
rename to shared/utils.h
index 155b1c9..ea3c140 100644
--- a/common/utils.h
+++ b/shared/utils.h
@@ -21,6 +21,9 @@
* Copyright (C) 2010 - 2015 Red Hat, Inc.
*/
+#ifndef __UTILS_H__
+#define __UTILS_H__
+
extern gboolean debug;
static inline void
@@ -50,3 +53,5 @@ nm_libreswan_config_write (gint fd,
NMConnection *connection,
const char *bus_name,
gboolean openswan);
+
+#endif /* __UTILS_H__ */
diff --git a/src/Makefile.am b/src/Makefile.am
index 401cccb..048ca0b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,8 +10,7 @@ AM_CPPFLAGS = \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DDATADIR=\"$(datadir)\" \
-DNM_LIBRESWAN_LOCALEDIR=\"$(datadir)/locale\" \
- -I"$(top_srcdir)/shared/" \
- -I$(top_srcdir)/common/
+ -I"$(top_srcdir)/shared/"
libexec_PROGRAMS = nm-libreswan-service nm-libreswan-service-helper
@@ -41,7 +40,7 @@ nm_libreswan_service_LDADD = \
$(GLIB_LIBS) \
$(LIBNM_LIBS) \
$(LIBNL_LIBS) \
- $(top_builddir)/common/libnm-libreswan-common.la \
+ $(top_builddir)/shared/libnm-vpn-plugin-libreswan-shared.la \
libnm-libreswan-helper-service-dbus.la \
-lutil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]