2017-11-25 11:39:06 +01:00
|
|
|
libnm_core_inc = include_directories('.')
|
|
|
|
|
|
|
|
|
|
libnm_core_headers = files(
|
|
|
|
|
'nm-connection.h',
|
|
|
|
|
'nm-core-types.h',
|
|
|
|
|
'nm-dbus-interface.h',
|
|
|
|
|
'nm-errors.h',
|
2018-05-22 15:41:29 +02:00
|
|
|
'nm-setting-6lowpan.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-8021x.h',
|
|
|
|
|
'nm-setting-adsl.h',
|
|
|
|
|
'nm-setting-bluetooth.h',
|
|
|
|
|
'nm-setting-bond.h',
|
|
|
|
|
'nm-setting-bridge-port.h',
|
|
|
|
|
'nm-setting-bridge.h',
|
|
|
|
|
'nm-setting-cdma.h',
|
|
|
|
|
'nm-setting-connection.h',
|
|
|
|
|
'nm-setting-dcb.h',
|
|
|
|
|
'nm-setting-dummy.h',
|
2018-09-11 14:42:21 +02:00
|
|
|
'nm-setting-ethtool.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-generic.h',
|
|
|
|
|
'nm-setting-gsm.h',
|
|
|
|
|
'nm-setting-infiniband.h',
|
|
|
|
|
'nm-setting-ip-config.h',
|
|
|
|
|
'nm-setting-ip-tunnel.h',
|
|
|
|
|
'nm-setting-ip4-config.h',
|
|
|
|
|
'nm-setting-ip6-config.h',
|
|
|
|
|
'nm-setting-macsec.h',
|
|
|
|
|
'nm-setting-macvlan.h',
|
2018-08-07 15:52:56 +02:00
|
|
|
'nm-setting-match.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-olpc-mesh.h',
|
|
|
|
|
'nm-setting-ovs-bridge.h',
|
|
|
|
|
'nm-setting-ovs-interface.h',
|
|
|
|
|
'nm-setting-ovs-patch.h',
|
|
|
|
|
'nm-setting-ovs-port.h',
|
2018-10-10 17:23:42 +02:00
|
|
|
'nm-setting-p2p-wireless.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-ppp.h',
|
|
|
|
|
'nm-setting-pppoe.h',
|
|
|
|
|
'nm-setting-proxy.h',
|
|
|
|
|
'nm-setting-serial.h',
|
2018-05-25 12:05:24 +02:00
|
|
|
'nm-setting-sriov.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-tc-config.h',
|
|
|
|
|
'nm-setting-team-port.h',
|
|
|
|
|
'nm-setting-team.h',
|
|
|
|
|
'nm-setting-tun.h',
|
|
|
|
|
'nm-setting-user.h',
|
|
|
|
|
'nm-setting-vlan.h',
|
|
|
|
|
'nm-setting-vpn.h',
|
|
|
|
|
'nm-setting-vxlan.h',
|
|
|
|
|
'nm-setting-wimax.h',
|
|
|
|
|
'nm-setting-wired.h',
|
|
|
|
|
'nm-setting-wireless-security.h',
|
|
|
|
|
'nm-setting-wireless.h',
|
2018-03-09 10:51:49 +01:00
|
|
|
'nm-setting-wpan.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting.h',
|
|
|
|
|
'nm-simple-connection.h',
|
|
|
|
|
'nm-utils.h',
|
|
|
|
|
'nm-version.h',
|
|
|
|
|
'nm-vpn-dbus-interface.h',
|
|
|
|
|
'nm-vpn-editor-plugin.h',
|
2018-10-18 12:50:20 +02:00
|
|
|
'nm-vpn-plugin-info.h',
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2017-12-15 14:35:31 +01:00
|
|
|
libnm_core_settings_sources = files(
|
2018-05-22 15:41:29 +02:00
|
|
|
'nm-setting-6lowpan.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-8021x.c',
|
|
|
|
|
'nm-setting-adsl.c',
|
|
|
|
|
'nm-setting-bluetooth.c',
|
|
|
|
|
'nm-setting-bond.c',
|
|
|
|
|
'nm-setting-bridge-port.c',
|
|
|
|
|
'nm-setting-bridge.c',
|
|
|
|
|
'nm-setting-cdma.c',
|
|
|
|
|
'nm-setting-connection.c',
|
|
|
|
|
'nm-setting-dcb.c',
|
|
|
|
|
'nm-setting-dummy.c',
|
libnm, cli, ifcfg-rh: add NMSettingEthtool setting
Note that in NetworkManager API (D-Bus, libnm, and nmcli),
the features are called "feature-xyz". The "feature-" prefix
is used, because NMSettingEthtool possibly will gain support
for options that are not only -K|--offload|--features, for
example -C|--coalesce.
The "xzy" suffix is either how ethtool utility calls the feature
("tso", "rx"). Or, if ethtool utility specifies no alias for that
feature, it's the name from kernel's ETH_SS_FEATURES ("tx-tcp6-segmentation").
If possible, we prefer ethtool utility's naming.
Also note, how the features "feature-sg", "feature-tso", and
"feature-tx" actually refer to multiple underlying kernel features
at once. This too follows what ethtool utility does.
The functionality is not yet implemented server-side.
2018-07-16 23:37:55 +02:00
|
|
|
'nm-setting-ethtool.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-generic.c',
|
|
|
|
|
'nm-setting-gsm.c',
|
|
|
|
|
'nm-setting-infiniband.c',
|
|
|
|
|
'nm-setting-ip-config.c',
|
|
|
|
|
'nm-setting-ip-tunnel.c',
|
|
|
|
|
'nm-setting-ip4-config.c',
|
|
|
|
|
'nm-setting-ip6-config.c',
|
|
|
|
|
'nm-setting-macsec.c',
|
|
|
|
|
'nm-setting-macvlan.c',
|
2018-08-07 15:52:56 +02:00
|
|
|
'nm-setting-match.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-olpc-mesh.c',
|
|
|
|
|
'nm-setting-ovs-bridge.c',
|
|
|
|
|
'nm-setting-ovs-interface.c',
|
|
|
|
|
'nm-setting-ovs-patch.c',
|
|
|
|
|
'nm-setting-ovs-port.c',
|
2018-10-10 17:23:42 +02:00
|
|
|
'nm-setting-p2p-wireless.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-ppp.c',
|
|
|
|
|
'nm-setting-pppoe.c',
|
|
|
|
|
'nm-setting-proxy.c',
|
|
|
|
|
'nm-setting-serial.c',
|
2018-05-25 12:05:24 +02:00
|
|
|
'nm-setting-sriov.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting-tc-config.c',
|
|
|
|
|
'nm-setting-team-port.c',
|
|
|
|
|
'nm-setting-team.c',
|
|
|
|
|
'nm-setting-tun.c',
|
|
|
|
|
'nm-setting-user.c',
|
|
|
|
|
'nm-setting-vlan.c',
|
|
|
|
|
'nm-setting-vpn.c',
|
|
|
|
|
'nm-setting-vxlan.c',
|
|
|
|
|
'nm-setting-wimax.c',
|
|
|
|
|
'nm-setting-wired.c',
|
|
|
|
|
'nm-setting-wireless-security.c',
|
2018-03-09 10:51:49 +01:00
|
|
|
'nm-setting-wireless.c',
|
2018-10-18 12:50:20 +02:00
|
|
|
'nm-setting-wpan.c',
|
2017-12-15 14:35:31 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libnm_core_sources = libnm_core_settings_sources + files(
|
2018-08-29 18:58:14 +02:00
|
|
|
'nm-crypto.c',
|
2017-12-15 14:35:31 +01:00
|
|
|
'nm-connection.c',
|
|
|
|
|
'nm-dbus-utils.c',
|
|
|
|
|
'nm-errors.c',
|
2018-04-13 22:32:59 +02:00
|
|
|
'nm-keyfile.c',
|
2017-12-15 14:35:31 +01:00
|
|
|
'nm-keyfile-utils.c',
|
|
|
|
|
'nm-property-compare.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
'nm-setting.c',
|
|
|
|
|
'nm-simple-connection.c',
|
|
|
|
|
'nm-utils.c',
|
|
|
|
|
'nm-vpn-editor-plugin.c',
|
2018-10-18 12:50:20 +02:00
|
|
|
'nm-vpn-plugin-info.c',
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2017-12-16 14:59:37 +01:00
|
|
|
enum_headers = libnm_core_headers + [version_header]
|
|
|
|
|
enum_types = 'nm-core-enum-types'
|
2017-11-25 11:39:06 +01:00
|
|
|
|
2017-12-16 14:59:37 +01:00
|
|
|
libnm_core_enum = gnome.mkenums(
|
|
|
|
|
enum_types,
|
|
|
|
|
sources: enum_headers,
|
2017-11-25 11:39:06 +01:00
|
|
|
identifier_prefix: nm_id_prefix,
|
2017-12-16 14:59:37 +01:00
|
|
|
c_template: enum_types + '.c.template',
|
|
|
|
|
h_template: enum_types + '.h.template',
|
2017-11-25 11:39:06 +01:00
|
|
|
install_header: true,
|
2018-10-18 12:50:20 +02:00
|
|
|
install_dir: libnm_pkgincludedir,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
dl_dep,
|
|
|
|
|
libudev_dep,
|
2018-01-07 15:39:42 +01:00
|
|
|
shared_dep,
|
2018-05-30 13:19:07 +02:00
|
|
|
uuid_dep,
|
|
|
|
|
shared_c_siphash_dep,
|
2017-11-25 11:39:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
cflags = [
|
2018-01-09 08:05:15 +01:00
|
|
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
2018-01-02 13:37:06 +01:00
|
|
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
2017-11-25 11:39:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if enable_json_validation
|
2018-01-09 06:20:18 +01:00
|
|
|
libnm_core_sources += files('nm-json.c')
|
2017-11-25 11:39:06 +01:00
|
|
|
deps += jansson_dep
|
|
|
|
|
endif
|
|
|
|
|
|
2018-08-30 08:30:19 +02:00
|
|
|
if (crypto_gnutls_dep.found())
|
|
|
|
|
libnm_crypto_gnutls = static_library(
|
|
|
|
|
'nm-crypto-gnutls',
|
|
|
|
|
sources: [ 'nm-crypto-gnutls.c' ],
|
|
|
|
|
dependencies: deps + [ crypto_gnutls_dep ],
|
2018-10-18 12:50:20 +02:00
|
|
|
c_args: cflags,
|
2018-08-30 08:30:19 +02:00
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if (crypto_nss_dep.found())
|
|
|
|
|
libnm_crypto_nss = static_library(
|
|
|
|
|
'nm-crypto-nss',
|
|
|
|
|
sources: [ 'nm-crypto-nss.c' ],
|
|
|
|
|
dependencies: deps + [ crypto_nss_dep ],
|
2018-10-18 12:50:20 +02:00
|
|
|
c_args: cflags,
|
2018-08-30 08:30:19 +02:00
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if crypto == 'gnutls'
|
|
|
|
|
libnm_crypto = libnm_crypto_gnutls
|
|
|
|
|
elif crypto == 'nss'
|
|
|
|
|
libnm_crypto = libnm_crypto_nss
|
|
|
|
|
else
|
|
|
|
|
error('bug')
|
|
|
|
|
endif
|
|
|
|
|
|
build/meson: fix meson build for shared files
The files in shared/nm-utils are not compiled as one static library,
instead each subproject that needs (parts of) them, re-compiles the
files individually.
The major reason for that is, because we might have different compile
flags, depending on whether we build libnm-core or
libnm-util/libnm-glib. Actually, I think that is not really the case,
and maybe this should be refactored, to indeed build them all as a
static library first.
Anyway, libnm-util, libnm-glib, clients' common lib, they all need a
different set of shared files that they should compile. Refactor
"shared/meson.build" to account for that and handle it like autotools
does.
Another change is, that "shared_c_siphash_dep" no longer advertises
"include_directories: include_directories('c-siphash/src')". We don't
put c-siphash.h into the include search path. Users who need it, should
include it via "#include <c-siphash/src/c-siphash.h>". The only exception
is when building shared_n_acd library, which is not under our control.
2018-05-30 15:16:01 +02:00
|
|
|
libnm_core_sources_all = libnm_core_sources
|
|
|
|
|
libnm_core_sources_all += libnm_core_enum
|
2018-08-02 10:58:24 +02:00
|
|
|
libnm_core_sources_all += shared_nm_meta_setting_c
|
libnm, cli, ifcfg-rh: add NMSettingEthtool setting
Note that in NetworkManager API (D-Bus, libnm, and nmcli),
the features are called "feature-xyz". The "feature-" prefix
is used, because NMSettingEthtool possibly will gain support
for options that are not only -K|--offload|--features, for
example -C|--coalesce.
The "xzy" suffix is either how ethtool utility calls the feature
("tso", "rx"). Or, if ethtool utility specifies no alias for that
feature, it's the name from kernel's ETH_SS_FEATURES ("tx-tcp6-segmentation").
If possible, we prefer ethtool utility's naming.
Also note, how the features "feature-sg", "feature-tso", and
"feature-tx" actually refer to multiple underlying kernel features
at once. This too follows what ethtool utility does.
The functionality is not yet implemented server-side.
2018-07-16 23:37:55 +02:00
|
|
|
libnm_core_sources_all += shared_nm_ethtool_utils_c
|
build/meson: fix meson build for shared files
The files in shared/nm-utils are not compiled as one static library,
instead each subproject that needs (parts of) them, re-compiles the
files individually.
The major reason for that is, because we might have different compile
flags, depending on whether we build libnm-core or
libnm-util/libnm-glib. Actually, I think that is not really the case,
and maybe this should be refactored, to indeed build them all as a
static library first.
Anyway, libnm-util, libnm-glib, clients' common lib, they all need a
different set of shared files that they should compile. Refactor
"shared/meson.build" to account for that and handle it like autotools
does.
Another change is, that "shared_c_siphash_dep" no longer advertises
"include_directories: include_directories('c-siphash/src')". We don't
put c-siphash.h into the include search path. Users who need it, should
include it via "#include <c-siphash/src/c-siphash.h>". The only exception
is when building shared_n_acd library, which is not under our control.
2018-05-30 15:16:01 +02:00
|
|
|
libnm_core_sources_all += shared_files_libnm_core
|
|
|
|
|
libnm_core_sources_all += [version_header]
|
|
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
libnm_core = static_library(
|
|
|
|
|
'nm-core',
|
build/meson: fix meson build for shared files
The files in shared/nm-utils are not compiled as one static library,
instead each subproject that needs (parts of) them, re-compiles the
files individually.
The major reason for that is, because we might have different compile
flags, depending on whether we build libnm-core or
libnm-util/libnm-glib. Actually, I think that is not really the case,
and maybe this should be refactored, to indeed build them all as a
static library first.
Anyway, libnm-util, libnm-glib, clients' common lib, they all need a
different set of shared files that they should compile. Refactor
"shared/meson.build" to account for that and handle it like autotools
does.
Another change is, that "shared_c_siphash_dep" no longer advertises
"include_directories: include_directories('c-siphash/src')". We don't
put c-siphash.h into the include search path. Users who need it, should
include it via "#include <c-siphash/src/c-siphash.h>". The only exception
is when building shared_n_acd library, which is not under our control.
2018-05-30 15:16:01 +02:00
|
|
|
sources: libnm_core_sources_all,
|
2017-11-25 11:39:06 +01:00
|
|
|
dependencies: deps,
|
2018-08-30 08:30:19 +02:00
|
|
|
link_with: libnm_crypto,
|
2018-10-18 12:50:20 +02:00
|
|
|
c_args: cflags,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2018-01-07 15:39:42 +01:00
|
|
|
nm_core_dep = declare_dependency(
|
|
|
|
|
sources: libnm_core_enum[1],
|
|
|
|
|
include_directories: libnm_core_inc,
|
2018-05-30 13:19:07 +02:00
|
|
|
dependencies: [
|
|
|
|
|
shared_dep,
|
|
|
|
|
shared_c_siphash_dep,
|
2018-12-28 21:30:03 +01:00
|
|
|
libnm_systemd_shared_dep,
|
2018-05-30 13:19:07 +02:00
|
|
|
],
|
2018-01-07 15:39:42 +01:00
|
|
|
)
|
|
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
enums_to_docbook = join_paths(meson.source_root(), 'tools', 'enums-to-docbook.pl')
|
|
|
|
|
|
|
|
|
|
docbooks = [
|
|
|
|
|
['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'],
|
2018-10-18 12:50:20 +02:00
|
|
|
['nm-vpn-dbus-types', 'nm-vpn-dbus-interface.h', 'VPN Plugin D-Bus API Types'],
|
2017-11-25 11:39:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
foreach docbook: docbooks
|
|
|
|
|
output = docbook[0] + '.xml'
|
|
|
|
|
|
|
|
|
|
xml = custom_target(
|
|
|
|
|
output,
|
|
|
|
|
input: docbook[1],
|
|
|
|
|
output: output,
|
|
|
|
|
capture: true,
|
2017-12-24 14:52:02 +01:00
|
|
|
command: [perl, enums_to_docbook, docbook[0], docbook[2], '@INPUT@'],
|
|
|
|
|
# FIXME: gtkdoc does not depend directly on this.
|
|
|
|
|
# https://github.com/mesonbuild/meson/pull/2806
|
2018-10-18 12:50:20 +02:00
|
|
|
build_by_default: true,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
content_files += xml.full_path()
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
if enable_tests
|
|
|
|
|
subdir('tests')
|
|
|
|
|
endif
|