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
|
|
|
shared_inc = include_directories('.')
|
2018-04-06 17:04:31 +02:00
|
|
|
|
|
|
|
|
shared_c_siphash = static_library(
|
|
|
|
|
'c-siphash',
|
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: 'c-siphash/src/c-siphash.c',
|
2018-04-06 17:04:31 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
shared_c_siphash_dep = declare_dependency(
|
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
|
|
|
include_directories: shared_inc,
|
|
|
|
|
link_with: shared_c_siphash,
|
2018-04-06 17:04:31 +02:00
|
|
|
)
|
|
|
|
|
|
2018-09-04 10:50:40 +02:00
|
|
|
shared_c_rbtree = static_library(
|
|
|
|
|
'c-rbtree',
|
|
|
|
|
c_args: '-std=c11',
|
|
|
|
|
sources: files('c-rbtree/src/c-rbtree.c',
|
|
|
|
|
'c-rbtree/src/c-rbtree.h',
|
|
|
|
|
'c-rbtree/src/c-rbtree-private.h'),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
shared_c_rbtree_dep = declare_dependency(
|
|
|
|
|
include_directories: shared_inc,
|
|
|
|
|
link_with: shared_c_rbtree,
|
|
|
|
|
)
|
|
|
|
|
|
2018-09-04 08:25:07 +02:00
|
|
|
|
|
|
|
|
if get_option('ebpf')
|
|
|
|
|
shared_n_acd_bpf_files = files('n-acd/src/n-acd-bpf.c')
|
|
|
|
|
else
|
|
|
|
|
shared_n_acd_bpf_files = files('n-acd/src/n-acd-bpf-fallback.c')
|
|
|
|
|
endif
|
|
|
|
|
|
2018-04-06 17:04:31 +02:00
|
|
|
shared_n_acd = static_library(
|
|
|
|
|
'n-acd',
|
2018-09-04 11:10:59 +02:00
|
|
|
sources: files('n-acd/src/n-acd.c',
|
|
|
|
|
'n-acd/src/n-acd.h',
|
|
|
|
|
'n-acd/src/n-acd-private.h',
|
|
|
|
|
'n-acd/src/n-acd-probe.c',
|
|
|
|
|
'n-acd/src/util/timer.c',
|
2018-09-04 08:25:07 +02:00
|
|
|
'n-acd/src/util/timer.h')
|
|
|
|
|
+ shared_n_acd_bpf_files,
|
2018-09-04 11:10:59 +02:00
|
|
|
c_args: [
|
|
|
|
|
'-D_GNU_SOURCE',
|
2018-09-04 08:25:07 +02:00
|
|
|
'-DSO_ATTACH_BPF=50',
|
2018-09-04 11:10:59 +02:00
|
|
|
'-std=c11',
|
|
|
|
|
'-Wno-pointer-arith',
|
|
|
|
|
'-Wno-vla',
|
|
|
|
|
],
|
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
|
|
|
include_directories: [
|
|
|
|
|
include_directories('c-siphash/src'),
|
|
|
|
|
include_directories('c-list/src'),
|
2018-09-04 11:10:59 +02:00
|
|
|
include_directories('c-rbtree/src'),
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
shared_c_siphash_dep,
|
|
|
|
|
shared_c_rbtree_dep
|
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
|
|
|
],
|
2018-04-06 17:04:31 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
shared_n_acd_dep = declare_dependency(
|
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
|
|
|
include_directories: shared_inc,
|
2018-04-06 17:04:31 +02:00
|
|
|
link_with: shared_n_acd,
|
|
|
|
|
)
|
|
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
version_conf = configuration_data()
|
|
|
|
|
version_conf.set('NM_MAJOR_VERSION', nm_major_version)
|
|
|
|
|
version_conf.set('NM_MINOR_VERSION', nm_minor_version)
|
|
|
|
|
version_conf.set('NM_MICRO_VERSION', nm_micro_version)
|
|
|
|
|
|
|
|
|
|
version_header = configure_file(
|
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
|
|
|
input: 'nm-version-macros.h.in',
|
|
|
|
|
output: 'nm-version-macros.h',
|
|
|
|
|
configuration: version_conf,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
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
|
|
|
shared_nm_ethtool_utils_c = files('nm-ethtool-utils.c')
|
|
|
|
|
|
2018-08-02 10:58:24 +02:00
|
|
|
shared_nm_meta_setting_c = files('nm-meta-setting.c')
|
2017-11-25 11:39:06 +01:00
|
|
|
|
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
|
|
|
shared_nm_test_utils_impl_c = files('nm-test-utils-impl.c')
|
2017-11-25 11:39:06 +01:00
|
|
|
|
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
|
|
|
shared_nm_utils_nm_vpn_plugin_utils_c = files('nm-utils/nm-vpn-plugin-utils.c')
|
2017-11-25 11:39:06 +01:00
|
|
|
|
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
|
|
|
shared_files_libnm_core = files('''
|
|
|
|
|
c-siphash/src/c-siphash.c
|
|
|
|
|
nm-utils/c-list-util.c
|
|
|
|
|
nm-utils/nm-dedup-multi.c
|
|
|
|
|
nm-utils/nm-enum-utils.c
|
|
|
|
|
nm-utils/nm-hash-utils.c
|
2018-08-30 15:00:39 +02:00
|
|
|
nm-utils/nm-io-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
|
|
|
nm-utils/nm-random-utils.c
|
2018-08-28 21:20:36 +02:00
|
|
|
nm-utils/nm-secret-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
|
|
|
nm-utils/nm-shared-utils.c
|
|
|
|
|
nm-utils/nm-udev-utils.c
|
|
|
|
|
'''.split())
|
2017-11-25 11:39:06 +01:00
|
|
|
|
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
|
|
|
shared_files_clients_common = files('''
|
|
|
|
|
c-siphash/src/c-siphash.c
|
|
|
|
|
nm-utils/nm-enum-utils.c
|
|
|
|
|
nm-utils/nm-hash-utils.c
|
|
|
|
|
nm-utils/nm-random-utils.c
|
|
|
|
|
nm-utils/nm-shared-utils.c
|
|
|
|
|
'''.split())
|
2017-11-25 11:39:06 +01:00
|
|
|
|
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
|
|
|
shared_files_libnm_util = files('''
|
|
|
|
|
nm-utils/nm-shared-utils.c
|
|
|
|
|
'''.split())
|
|
|
|
|
|
|
|
|
|
shared_files_libnm_glib = files('''
|
|
|
|
|
nm-utils/nm-udev-utils.c
|
|
|
|
|
'''.split())
|
2018-01-07 15:39:42 +01:00
|
|
|
|
|
|
|
|
shared_dep = declare_dependency(
|
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
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
dependencies: glib_dep,
|
2018-01-07 15:39:42 +01:00
|
|
|
)
|