network-manager-wireguard-u.../Makefile.am

324 lines
9.0 KiB
Makefile
Raw Normal View History

2017-11-06 15:02:05 +03:00
AUTOMAKE_OPTIONS = foreign subdir-objects
DISTCHECK_CONFIGURE_FLAGS = \
--enable-more-warnings=yes
libexec_PROGRAMS =
noinst_LTLIBRARIES =
EXTRA_DIST =
CLEANFILES =
check_programs =
noinst_PROGRAMS =
SUBDIRS = \
. \
po
plugindir = $(libdir)/NetworkManager
plugin_LTLIBRARIES =
dbusservicedir = $(sysconfdir)/dbus-1/system.d
dbusservice_DATA = nm-wireguard-service.conf
2017-11-06 15:02:05 +03:00
nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
nmvpnservice_DATA = nm-wireguard-service.name
2017-11-06 15:02:05 +03:00
uidir = $(datadir)/gnome-vpn-properties/wireguard
2017-11-06 15:02:05 +03:00
ui_DATA =
###############################################################################
shared_sources = \
shared/nm-utils/nm-shared-utils.c \
shared/utils.c \
shared/import-export.c \
shared/wireguard.c
2017-11-06 15:02:05 +03:00
###############################################################################
src_cppflags = \
-DBINDIR=\"$(bindir)\" \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DDATADIR=\"$(datadir)\" \
2018-02-12 18:06:08 +03:00
-DNM_WIREGUARD_LOCALEDIR=\"$(datadir)/locale\" \
-DG_LOG_DOMAIN=\"nm-wireguard\" \
2017-11-06 15:02:05 +03:00
-I$(srcdir)/shared \
$(GLIB_CFLAGS) \
$(LIBNM_CFLAGS)
noinst_LTLIBRARIES += src/libnm-utils.la
src_libnm_utils_la_SOURCES = $(shared_sources)
src_libnm_utils_la_CPPFLAGS = $(src_cppflags)
src_libnm_utils_la_LIBADD = \
$(GLIB_LIBS) \
$(LIBNM_LIBS)
libexec_PROGRAMS += src/nm-wireguard-service
2017-11-06 15:02:05 +03:00
src_nm_wireguard_service_CPPFLAGS = $(src_cppflags)
src_nm_wireguard_service_LDFLAGS = \
2017-11-06 15:02:05 +03:00
-Wl,--version-script="$(srcdir)/linker-script-binary.ver"
src_nm_wireguard_service_LDADD = \
2017-11-06 15:02:05 +03:00
src/libnm-utils.la \
$(GLIB_LIBS) \
$(LIBNM_LIBS)
EXTRA_src_nm_wireguard_service_DEPENDENCIES = \
2017-11-06 15:02:05 +03:00
linker-script-binary.ver
###############################################################################
properties/resources.h: properties/gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=$(srcdir)/properties --generate-header --internal
properties/resources.c: properties/gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/properties --generate-dependencies $(srcdir)/properties/gresource.xml)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=$(srcdir)/properties --generate-source --internal
CLEANFILES += \
properties/resources.c \
properties/resources.h
EXTRA_DIST += \
properties/gresource.xml
plugin_sources = \
2018-02-12 18:06:08 +03:00
properties/nm-wireguard-editor-plugin.c \
properties/nm-wireguard-editor-plugin.h
2017-11-06 15:02:05 +03:00
editor_sources = \
properties/resources.c \
properties/resources.h \
2018-02-12 18:06:08 +03:00
properties/nm-wireguard-editor.c \
properties/nm-wireguard-editor.h
2017-11-06 15:02:05 +03:00
properties_cppflags = \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
-I$(srcdir)/shared \
$(GLIB_CFLAGS)
###############################################################################
2018-02-12 18:06:08 +03:00
noinst_LTLIBRARIES += properties/libnm-vpn-plugin-wireguard-utils.la
2017-11-06 15:02:05 +03:00
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_utils_la_SOURCES = \
2017-11-06 15:02:05 +03:00
$(shared_sources)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_utils_la_CPPFLAGS = \
2017-11-06 15:02:05 +03:00
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_BASE \
-DNM_PLUGIN_DIR=\"$(NM_PLUGIN_DIR)\" \
$(properties_cppflags) \
$(LIBNM_CFLAGS)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_utils_la_LIBADD = \
2017-11-06 15:02:05 +03:00
$(LIBNM_LIBS) \
$(DL_LIBS)
2018-02-12 18:06:08 +03:00
noinst_LTLIBRARIES += properties/libnm-vpn-plugin-wireguard-core.la
2017-11-06 15:02:05 +03:00
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_core_la_SOURCES = \
2017-11-06 15:02:05 +03:00
shared/nm-utils/nm-vpn-plugin-utils.c \
shared/nm-utils/nm-vpn-plugin-utils.h \
shared/nm-utils/nm-vpn-plugin-macros.h \
$(plugin_sources)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_core_la_CPPFLAGS = \
2017-11-06 15:02:05 +03:00
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_BASE \
-DNM_PLUGIN_DIR=\"$(NM_PLUGIN_DIR)\" \
$(properties_cppflags) \
$(LIBNM_CFLAGS)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_core_la_LIBADD = \
properties/libnm-vpn-plugin-wireguard-utils.la \
2017-11-06 15:02:05 +03:00
$(LIBNM_LIBS) \
$(DL_LIBS)
2018-02-12 18:06:08 +03:00
plugin_LTLIBRARIES += properties/libnm-vpn-plugin-wireguard.la
2017-11-06 15:02:05 +03:00
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_la_SOURCES =
properties_libnm_vpn_plugin_wireguard_la_LIBADD = \
properties/libnm-vpn-plugin-wireguard-core.la
properties_libnm_vpn_plugin_wireguard_la_LDFLAGS = \
2017-11-06 15:02:05 +03:00
-avoid-version \
2018-02-12 18:06:08 +03:00
-Wl,--version-script=$(srcdir)/properties/libnm-vpn-plugin-wireguard.ver
2017-11-06 15:02:05 +03:00
###############################################################################
if WITH_GNOME
2018-02-12 18:06:08 +03:00
plugin_LTLIBRARIES += properties/libnm-vpn-plugin-wireguard-editor.la
2017-11-06 15:02:05 +03:00
endif
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_editor_la_SOURCES = \
2017-11-06 15:02:05 +03:00
$(editor_sources)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_editor_la_CPPFLAGS = \
2017-11-06 15:02:05 +03:00
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR \
$(properties_cppflags) \
$(GTK_CFLAGS) \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_editor_la_LIBADD = \
properties/libnm-vpn-plugin-wireguard-utils.la \
2017-11-06 15:02:05 +03:00
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS)
2018-02-12 18:06:08 +03:00
properties_libnm_vpn_plugin_wireguard_editor_la_LDFLAGS = \
2017-11-06 15:02:05 +03:00
-avoid-version \
2018-02-12 18:06:08 +03:00
-Wl,--version-script=$(srcdir)/properties/libnm-vpn-plugin-wireguard-editor.ver
2017-11-06 15:02:05 +03:00
###############################################################################
if WITH_LIBNM_GLIB
2018-02-12 18:06:08 +03:00
noinst_LTLIBRARIES += properties/libnm-wireguard-properties-core.la
2017-11-06 15:02:05 +03:00
endif
2018-02-12 18:06:08 +03:00
properties_libnm_wireguard_properties_core_la_SOURCES = \
2017-11-06 15:02:05 +03:00
$(shared_sources) \
$(plugin_sources) \
$(editor_sources)
2018-02-12 18:06:08 +03:00
properties_libnm_wireguard_properties_core_la_CPPFLAGS = \
2017-11-06 15:02:05 +03:00
-DNM_VPN_OLD \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
$(properties_cppflags) \
$(GTK_CFLAGS) \
$(LIBNM_GLIB_CFLAGS) \
$(LIBNM_GTK_CFLAGS)
2018-02-12 18:06:08 +03:00
properties_libnm_wireguard_properties_core_la_LIBADD = \
2017-11-06 15:02:05 +03:00
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBNM_GLIB_LIBS) \
$(LIBNM_GTK_LIBS)
if WITH_LIBNM_GLIB
2018-02-12 18:06:08 +03:00
plugin_LTLIBRARIES += properties/libnm-wireguard-properties.la
2017-11-06 15:02:05 +03:00
endif
2018-02-12 18:06:08 +03:00
properties_libnm_wireguard_properties_la_SOURCES =
properties_libnm_wireguard_properties_la_LIBADD = \
properties/libnm-wireguard-properties-core.la
properties_libnm_wireguard_properties_la_LDFLAGS = \
2017-11-06 15:02:05 +03:00
-avoid-version \
2018-02-12 18:06:08 +03:00
-Wl,--version-script=$(srcdir)/properties/libnm-wireguard-properties.ver
2017-11-06 15:02:05 +03:00
EXTRA_DIST += \
2018-02-12 18:06:08 +03:00
properties/libnm-vpn-plugin-wireguard.ver \
properties/libnm-vpn-plugin-wireguard-editor.ver \
properties/libnm-wireguard-properties.ver \
properties/nm-wireguard-dialog.ui
2017-11-06 15:02:05 +03:00
###############################################################################
if WITH_GNOME
2018-02-12 18:06:08 +03:00
libexec_PROGRAMS += auth-dialog/nm-wireguard-auth-dialog
2017-11-06 15:02:05 +03:00
endif
2018-02-12 18:06:08 +03:00
auth_dialog_nm_wireguard_auth_dialog_SOURCES = \
2017-11-06 15:02:05 +03:00
$(shared_sources) \
auth-dialog/main.c
2018-02-12 18:06:08 +03:00
auth_dialog_nm_wireguard_auth_dialog_CPPFLAGS = \
2017-11-06 15:02:05 +03:00
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DBINDIR=\""$(bindir)"\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-I$(srcdir)/shared \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS) \
$(LIBSECRET_CFLAGS)
2018-02-12 18:06:08 +03:00
auth_dialog_nm_wireguard_auth_dialog_LDFLAGS = \
2017-11-06 15:02:05 +03:00
-Wl,--version-script="$(srcdir)/linker-script-binary.ver"
2018-02-12 18:06:08 +03:00
auth_dialog_nm_wireguard_auth_dialog_LDADD = \
2017-11-06 15:02:05 +03:00
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(LIBSECRET_LIBS)
2018-02-12 18:06:08 +03:00
EXTRA_auth_dialog_nm_wireguard_auth_dialog_DEPENDENCIES = \
2017-11-06 15:02:05 +03:00
linker-script-binary.ver
###############################################################################
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
install-data-hook:
mkdir -p $(DESTDIR)$(sysconfdir)/NetworkManager/VPN
sed -e "1s|^|# This file is obsoleted by a file in $(NM_VPN_SERVICE_DIR)\n\n|" \
-e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
-e 's|[@]PLUGINDIR[@]|@NM_PLUGIN_DIR@|g' \
<$(srcdir)/nm-wireguard-service.name.in \
>$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-wireguard-service.name
2017-11-06 15:02:05 +03:00
uninstall-hook:
rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-wireguard-service.name
2017-11-06 15:02:05 +03:00
endif
appdatadir = $(datadir)/appdata
appdata_files = $(appdata_in_files:.xml.in=.xml)
if WITH_GNOME
appdata_DATA = $(appdata_files)
endif
appdata_in_files = appdata/network-manager-wireguard.metainfo.xml.in
2017-11-06 15:02:05 +03:00
@INTLTOOL_XML_RULE@
nm-wireguard-service.name: $(srcdir)/nm-wireguard-service.name.in
2017-11-06 15:02:05 +03:00
$(AM_V_GEN) sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
-e 's|[@]PLUGINDIR[@]/|@NM_PLUGIN_DIR_NAME_FILE@|g' \
$^ >$@
# we always build the tests during regular build.
noinst_PROGRAMS += $(check_programs)
TESTS = $(check_programs)
EXTRA_DIST += \
linker-script-binary.ver \
nm-wireguard-service.name.in \
2017-11-06 15:02:05 +03:00
$(dbusservice_DATA) \
$(appdata_in_files) \
$(appdata_files) \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
\
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-test-utils.h \
shared/nm-default.h \
shared/nm-service-defines.h \
shared/utils.c \
shared/utils.h \
shared/import-export.c \
shared/import-export.h \
2017-11-06 15:02:05 +03:00
$(NULL)
CLEANFILES += \
$(nmvpnservice_DATA) \
$(appdata_files)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
ACLOCAL_AMFLAGS = -I m4