[NetworkManager-openconnect/lr/gtk-4.0: 7/13] build: use non-recursive make




commit 6806fd660dff047554f4ff37d11dcd0f40993a23
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Oct 25 16:43:56 2021 +0200

    build: use non-recursive make

 Makefile.am             | 241 ++++++++++++++++++++++++++++++++++++++++++++----
 auth-dialog/Makefile.am |  30 ------
 configure.ac            |   4 -
 properties/Makefile.am  | 110 ----------------------
 shared/Makefile.am      |  14 ---
 src/Makefile.am         |  45 ---------
 6 files changed, 221 insertions(+), 223 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 764fe86..bc0ec62 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,14 @@
-SUBDIRS = shared properties src po
+AUTOMAKE_OPTIONS = subdir-objects
 
-if WITH_GNOME
-if WITH_AUTHDLG
-SUBDIRS += auth-dialog
-endif
-endif
+SUBDIRS = . po
+
+EXTRA_DIST =
+
+libexec_PROGRAMS =
+
+plugin_LTLIBRARIES =
+
+CLEANFILES = *.bak *~
 
 dbusservicedir = $(sysconfdir)/dbus-1/system.d
 dbusservice_DATA = nm-openconnect-service.conf
@@ -12,6 +16,187 @@ dbusservice_DATA = nm-openconnect-service.conf
 nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
 nmvpnservice_DATA = nm-openconnect-service.name
 
+###############################################################################
+
+src_cppflags = \
+       -I"$(top_srcdir)"/shared \
+       $(GLIB_CFLAGS) \
+       $(LIBNM_CFLAGS) \
+       $(NULL)
+
+libexec_PROGRAMS += src/nm-openconnect-service
+
+src_nm_openconnect_service_CPPFLAGS = \
+       $(src_cppflags) \
+       -DLIBEXECDIR=\""$(libexecdir)"\" \
+       -DNM_OPENCONNECT_LOCALEDIR=\"$(datadir)/locale\" \
+       $(NULL)
+
+src_nm_openconnect_service_SOURCES = \
+       $(top_srcdir)/shared/nm-utils/nm-shared-utils.c \
+       $(top_srcdir)/shared/nm-utils/nm-shared-utils.h \
+       src/nm-openconnect-service.c \
+       src/nm-openconnect-service.h \
+       $(NULL)
+
+src_nm_openconnect_service_LDADD = \
+       $(GLIB_LIBS) \
+       $(LIBNM_LIBS)
+
+libexec_PROGRAMS += src/nm-openconnect-service-openconnect-helper
+
+src_nm_openconnect_service_openconnect_helper_CPPFLAGS = \
+       $(src_cppflags) \
+       $(NULL)
+
+src_nm_openconnect_service_openconnect_helper_SOURCES = \
+       $(top_srcdir)/shared/nm-utils/nm-shared-utils.c \
+       $(top_srcdir)/shared/nm-utils/nm-shared-utils.h \
+       src/nm-openconnect-service-openconnect-helper.c
+
+src_nm_openconnect_service_openconnect_helper_LDADD = \
+       $(GTHREAD_LIBS) \
+       $(LIBNM_LIBS)
+
+###############################################################################
+
+plugindir = $(libdir)/NetworkManager
+plugin_LTLIBRARIES += properties/libnm-vpn-plugin-openconnect.la
+if WITH_GNOME
+plugin_LTLIBRARIES += properties/libnm-vpn-plugin-openconnect-editor.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += properties/libnm-openconnect-properties.la
+endif
+endif
+
+plugin_sources = \
+       properties/nm-openconnect-editor-plugin.c \
+       properties/nm-openconnect-editor-plugin.h \
+       $(NULL)
+
+editor_sources = \
+       properties/auth-helpers.c \
+       properties/auth-helpers.h \
+       properties/nm-openconnect-editor.c \
+       properties/nm-openconnect-editor.h
+       $(NULL)
+
+uidir = $(datadir)/gnome-vpn-properties/openconnect
+if WITH_GNOME
+ui_DATA = properties/nm-openconnect-dialog.ui
+endif
+
+properties_cppflags = \
+       $(GLIB_CFLAGS) \
+       $(OPENCONNECT_CFLAGS) \
+       -I$(top_srcdir)/shared \
+       -DUIDIR=\""$(uidir)"\" \
+       -DLOCALEDIR=\"$(datadir)/locale\"
+
+###############################################################################
+
+properties_libnm_vpn_plugin_openconnect_la_SOURCES = \
+       $(top_srcdir)/shared/nm-utils/nm-vpn-editor-plugin-call.h \
+       $(top_srcdir)/shared/nm-utils/nm-vpn-plugin-utils.c \
+       $(top_srcdir)/shared/nm-utils/nm-vpn-plugin-utils.h \
+       $(plugin_sources)
+
+properties_libnm_vpn_plugin_openconnect_la_CFLAGS = \
+       -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_BASE \
+       -DNM_PLUGIN_DIR=\"$(NM_PLUGIN_DIR)\" \
+       $(properties_cppflags) \
+       $(LIBNM_CFLAGS)
+
+properties_libnm_vpn_plugin_openconnect_la_LIBADD = \
+       $(LIBNM_LIBS) \
+       $(OPENCONNECT_LIBS) \
+       $(DL_LIBS) \
+       $(NULL)
+
+properties_libnm_vpn_plugin_openconnect_la_LDFLAGS = \
+       -avoid-version \
+       -Wl,--version-script="$(srcdir)/properties/libnm-vpn-plugin-openconnect.ver"
+
+###############################################################################
+
+properties_libnm_vpn_plugin_openconnect_editor_la_SOURCES = \
+       $(editor_sources)
+
+properties_libnm_vpn_plugin_openconnect_editor_la_CFLAGS = \
+       -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR \
+       $(properties_cppflags) \
+       $(GTK_CFLAGS) \
+       $(LIBNM_CFLAGS)
+
+properties_libnm_vpn_plugin_openconnect_editor_la_LIBADD = \
+       $(GTK_LIBS) \
+       $(LIBNM_LIBS) \
+       $(OPENCONNECT_LIBS)
+
+properties_libnm_vpn_plugin_openconnect_editor_la_LDFLAGS = \
+       -avoid-version \
+       -Wl,--version-script="$(srcdir)/properties/libnm-vpn-plugin-openconnect-editor.ver"
+
+###############################################################################
+
+properties_libnm_openconnect_properties_la_SOURCES = \
+       $(plugin_sources) \
+       $(editor_sources)
+
+properties_libnm_openconnect_properties_la_CFLAGS = \
+       -DNM_VPN_OLD \
+       -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
+       $(properties_cppflags) \
+       $(GTK_CFLAGS) \
+       $(LIBNM_GLIB_CFLAGS)
+
+properties_libnm_openconnect_properties_la_LIBADD = \
+       $(GTK_LIBS) \
+       $(LIBNM_GLIB_LIBS) \
+       $(OPENCONNECT_LIBS)
+
+properties_libnm_openconnect_properties_la_LDFLAGS = \
+       -avoid-version \
+       -Wl,--version-script="$(srcdir)/properties/libnm-openconnect-properties.ver"
+
+EXTRA_DIST += \
+       properties/libnm-openconnect-properties.ver \
+       properties/libnm-vpn-plugin-openconnect.ver \
+       properties/libnm-vpn-plugin-openconnect-editor.ver \
+       properties/nm-openconnect-dialog.ui
+
+###############################################################################
+
+if WITH_GNOME
+if WITH_AUTHDLG
+libexec_PROGRAMS += auth-dialog/nm-openconnect-auth-dialog
+endif
+endif
+
+auth_dialog_nm_openconnect_auth_dialog_CPPFLAGS = \
+       $(LIBNM_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(GTK_CFLAGS) \
+       $(GCR_CFLAGS) \
+       $(OPENCONNECT_CFLAGS) \
+       $(LIBXML_CFLAGS) \
+       $(LIBSECRET_CFLAGS) \
+       -I"$(top_srcdir)/shared" \
+       $(NULL)
+
+auth_dialog_nm_openconnect_auth_dialog_SOURCES = \
+       auth-dialog/main.c \
+       $(NULL)
+
+auth_dialog_nm_openconnect_auth_dialog_LDADD = \
+       $(GTK_LIBS) \
+       $(GCR_LIBS) \
+       $(LIBNM_LIBS) \
+       $(OPENCONNECT_LIBS) \
+       $(LIBXML_LIBS) \
+       $(LIBSECRET_LIBS)
+
+
 if WITH_LIBNM_GLIB
 # Install a file with full path to plugins for an old gnome-shell
 # https://bugzilla.gnome.org/show_bug.cgi?id=693590
@@ -42,21 +227,37 @@ nm-openconnect-service.name: $(srcdir)/nm-openconnect-service.name.in
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes
 
-EXTRA_DIST = nm-openconnect-service.name.in \
-             $(dbusservice_DATA)  \
-             $(desktop_in_files)  \
-             $(icon_DATA)         \
-             $(appdata_in_files)  \
-             $(appdata_files)     \
-             intltool-extract.in  \
-             intltool-merge.in    \
-             intltool-update.in   \
-             openconnect-strings.txt
-
-CLEANFILES = $(nmvpnservice_DATA) \
-             $(desktop_DATA)      \
-             $(appdata_files)
+CLEANFILES +=                          \
+       $(nmvpnservice_DATA)            \
+       $(desktop_DATA)                 \
+       $(appdata_files)
 
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 
 ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST += \
+       nm-openconnect-service.name.in \
+       $(dbusservice_DATA) \
+       $(desktop_in_files) \
+       $(icon_DATA) \
+       $(appdata_in_files) \
+       $(appdata_files) \
+       intltool-extract.in \
+       intltool-merge.in \
+       intltool-update.in \
+       openconnect-strings.txt \
+       \
+       shared/README \
+       shared/nm-utils/gsystem-local-alloc.h \
+       shared/nm-utils/nm-glib.h \
+       shared/nm-utils/nm-macros-internal.h \
+       shared/nm-utils/nm-shared-utils.c \
+       shared/nm-utils/nm-shared-utils.h \
+       shared/nm-utils/nm-vpn-editor-plugin-call.h \
+       shared/nm-utils/nm-vpn-plugin-macros.h \
+       shared/nm-utils/nm-vpn-plugin-utils.c \
+       shared/nm-utils/nm-vpn-plugin-utils.h \
+       shared/nm-default.h \
+       shared/nm-service-defines.h \
+       $(NULL)
diff --git a/configure.ac b/configure.ac
index d5a41bc..fff96b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,11 +170,7 @@ fi
 
 AC_CONFIG_FILES([
 Makefile
-src/Makefile
-auth-dialog/Makefile
-properties/Makefile
 po/Makefile.in
-shared/Makefile
 ])
 AC_OUTPUT
 


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