2021-02-12 15:01:09 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
|
|
|
|
|
|
src_inc = include_directories('.')
|
|
|
|
|
|
2021-02-19 12:31:57 +01:00
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
libc_siphash = static_library(
|
|
|
|
|
'c-siphash',
|
|
|
|
|
sources: 'c-siphash/src/c-siphash.c',
|
|
|
|
|
include_directories: include_directories('c-stdaux/src'),
|
|
|
|
|
c_args: '-std=c11',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libc_rbtree = static_library(
|
|
|
|
|
'c-rbtree',
|
|
|
|
|
sources: 'c-rbtree/src/c-rbtree.c',
|
|
|
|
|
include_directories: include_directories('c-stdaux/src'),
|
|
|
|
|
c_args: '-std=c11',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libn_acd = static_library(
|
|
|
|
|
'n-acd',
|
|
|
|
|
sources: files(
|
|
|
|
|
'n-acd/src/n-acd.c',
|
|
|
|
|
'n-acd/src/n-acd-probe.c',
|
|
|
|
|
'n-acd/src/util/timer.c',
|
build/meson: cleanup build for c-util and nettools helper libraries
We have a number of static helper libraries. When a user is using such a
library, they need to set the include search paths (-I) and link with
the static library at the right place.
The first part, the include search path, is now trivial. We no longer
add the individual search paths but everybody uses "-I. -Isrc/".
The second part means that when we build a shared library or an
executable that uses symbols from the static library, we need to link
it. But only then, and not earlier so that not multiple intermediate
build products (static libraries too) contain the same code. Note that
for libnm-device-plugin-*.so and other core plugins it's even that
those shared modules should not themselves link with the static
helpers. Instead, the need to use the symbols from NetworkManager.
Easy enough. Previously, we would sometimes define dependencies in
meson. But as it's really simple, I think that those dependencies
obfuscate more than help. Instead drop them, and only explicitly link
where we need it. The exception is libNetworkManagerTest_dep, which
is still a dependency. Maybe that dependency is fine, as it is much
later in the process. Or maybe that will also be replaced in the future.
2021-02-24 11:38:39 +01:00
|
|
|
enable_ebpf ? 'n-acd/src/n-acd-bpf.c' : 'n-acd/src/n-acd-bpf-fallback.c',
|
2021-02-19 12:31:57 +01:00
|
|
|
),
|
|
|
|
|
include_directories: include_directories(
|
|
|
|
|
'c-list/src',
|
|
|
|
|
'c-rbtree/src',
|
|
|
|
|
'c-siphash/src',
|
|
|
|
|
'c-stdaux/src',
|
|
|
|
|
),
|
|
|
|
|
c_args: [
|
|
|
|
|
'-std=c11',
|
|
|
|
|
'-D_GNU_SOURCE',
|
|
|
|
|
'-DSO_ATTACH_BPF=50',
|
|
|
|
|
'-Wno-pointer-arith',
|
|
|
|
|
'-Wno-vla',
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libn_dhcp4 = static_library(
|
|
|
|
|
'n-dhcp4',
|
|
|
|
|
sources: files(
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-c-connection.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-c-lease.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-client.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-c-probe.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-incoming.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-outgoing.c',
|
|
|
|
|
'n-dhcp4/src/n-dhcp4-socket.c',
|
|
|
|
|
'n-dhcp4/src/util/packet.c',
|
|
|
|
|
'n-dhcp4/src/util/socket.c',
|
|
|
|
|
),
|
build/meson: cleanup build for c-util and nettools helper libraries
We have a number of static helper libraries. When a user is using such a
library, they need to set the include search paths (-I) and link with
the static library at the right place.
The first part, the include search path, is now trivial. We no longer
add the individual search paths but everybody uses "-I. -Isrc/".
The second part means that when we build a shared library or an
executable that uses symbols from the static library, we need to link
it. But only then, and not earlier so that not multiple intermediate
build products (static libraries too) contain the same code. Note that
for libnm-device-plugin-*.so and other core plugins it's even that
those shared modules should not themselves link with the static
helpers. Instead, the need to use the symbols from NetworkManager.
Easy enough. Previously, we would sometimes define dependencies in
meson. But as it's really simple, I think that those dependencies
obfuscate more than help. Instead drop them, and only explicitly link
where we need it. The exception is libNetworkManagerTest_dep, which
is still a dependency. Maybe that dependency is fine, as it is much
later in the process. Or maybe that will also be replaced in the future.
2021-02-24 11:38:39 +01:00
|
|
|
include_directories: include_directories(
|
|
|
|
|
'c-list/src',
|
|
|
|
|
'c-siphash/src',
|
|
|
|
|
'c-stdaux/src',
|
|
|
|
|
),
|
2021-02-19 12:31:57 +01:00
|
|
|
c_args: [
|
|
|
|
|
'-std=c11',
|
|
|
|
|
'-D_GNU_SOURCE',
|
|
|
|
|
'-Wno-declaration-after-statement',
|
|
|
|
|
'-Wno-pointer-arith',
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
2021-02-18 17:37:47 +01:00
|
|
|
subdir('libnm-std-aux')
|
2021-02-18 17:37:47 +01:00
|
|
|
subdir('libnm-glib-aux')
|
|
|
|
|
subdir('libnm-log-null')
|
|
|
|
|
subdir('libnm-log-core')
|
2021-02-18 08:13:35 +01:00
|
|
|
subdir('libnm-systemd-shared')
|
2021-05-27 16:40:23 +02:00
|
|
|
subdir('libnm-systemd-core')
|
2021-02-18 08:13:35 +01:00
|
|
|
subdir('libnm-udev-aux')
|
|
|
|
|
subdir('libnm-base')
|
2021-02-18 08:13:35 +01:00
|
|
|
subdir('libnm-platform')
|
lldp: add libnm-lldp as fork of systemd's sd_lldp_rx
We currently use the systemd LLDP client, which we consume by forking
systemd code. That is a maintenance burden, because it's not a
self-contained, stable library that we use. Hence there is a need for an
individual library or properly integrating the fork in our tree.
Optimally, we would create a new nettools project with an LLDP library.
That was not done because:
- nettools may want to be dual licensed with LGPL-2.1+ and Apache.
Systemd code is LGPL-2.1+ so it is fine for NetworkManager but
possibly not for nettools.
- nettools provides independent librares, as such they don't have an
event loop, instead they expose an epoll file descriptor and the user
needs to integrate it. Systemd and NetworkManager on the other hand
have their established event loop (sd_event and GMainContext,
respectively). It's simpler to implement the library on those terms,
in particular porting the systemd library from sd_event to
GMainContext.
- NetworkManager uses glib and has various helper utils. While it's
possible to do without them, it's more work.
The main reason to not write a new NetworkManager-agnostic library from
scratch, is that it's much simpler to fork the systemd library and make
it part of NetworkManager, than making it a nettools library.
Do it.
2022-09-06 13:33:18 +02:00
|
|
|
subdir('libnm-lldp')
|
2022-03-18 18:12:54 +01:00
|
|
|
subdir('libnm-crypto')
|
2021-02-12 15:01:09 +01:00
|
|
|
subdir('libnm-core-public')
|
|
|
|
|
subdir('libnm-core-intern')
|
|
|
|
|
subdir('libnm-core-aux-intern')
|
|
|
|
|
subdir('libnm-core-impl')
|
|
|
|
|
subdir('libnm-core-aux-extern')
|
2021-02-19 15:23:34 +01:00
|
|
|
subdir('libnm-client-public')
|
|
|
|
|
subdir('libnm-client-impl')
|
|
|
|
|
subdir('libnm-client-aux-extern')
|
2021-03-01 12:42:48 +01:00
|
|
|
subdir('libnmc-base')
|
|
|
|
|
subdir('libnmc-setting')
|
2021-03-14 14:58:43 +01:00
|
|
|
if enable_nmtui
|
|
|
|
|
subdir('libnmt-newt')
|
|
|
|
|
endif
|
2021-03-14 09:26:51 +01:00
|
|
|
subdir('nmcli')
|
2021-02-24 20:31:37 +01:00
|
|
|
subdir('nm-dispatcher')
|
2021-12-13 16:06:16 +01:00
|
|
|
subdir('nm-priv-helper')
|
2021-05-24 21:49:35 +02:00
|
|
|
subdir('nm-daemon-helper')
|
2021-03-01 13:58:36 +01:00
|
|
|
subdir('nm-online')
|
2021-03-14 14:54:09 +01:00
|
|
|
if enable_nmtui
|
|
|
|
|
subdir('nmtui')
|
|
|
|
|
endif
|
2021-03-09 09:30:13 +01:00
|
|
|
subdir('nm-initrd-generator')
|
2021-03-14 09:26:51 +01:00
|
|
|
if enable_nm_cloud_setup
|
|
|
|
|
subdir('nm-cloud-setup')
|
|
|
|
|
endif
|
2021-03-09 09:30:13 +01:00
|
|
|
subdir('core')
|
2021-02-20 14:52:23 +01:00
|
|
|
subdir('contrib')
|
2021-02-18 08:13:35 +01:00
|
|
|
|
|
|
|
|
if enable_tests
|
2021-02-20 12:37:48 +01:00
|
|
|
subdir('libnm-client-test')
|
2021-02-18 17:37:47 +01:00
|
|
|
subdir('libnm-glib-aux/tests')
|
2021-02-18 08:13:35 +01:00
|
|
|
subdir('libnm-platform/tests')
|
2021-02-18 16:08:11 +01:00
|
|
|
subdir('libnm-core-impl/tests')
|
2021-02-19 15:23:34 +01:00
|
|
|
subdir('libnm-client-impl/tests')
|
2021-03-01 12:42:48 +01:00
|
|
|
subdir('libnm-client-aux-extern/tests')
|
|
|
|
|
subdir('libnmc-setting/tests')
|
2021-02-24 20:31:37 +01:00
|
|
|
subdir('nm-dispatcher/tests')
|
2021-03-09 09:30:13 +01:00
|
|
|
subdir('nm-initrd-generator/tests')
|
2021-03-14 09:26:51 +01:00
|
|
|
if enable_nm_cloud_setup
|
|
|
|
|
subdir('nm-cloud-setup/tests')
|
|
|
|
|
endif
|
2021-03-15 10:59:24 +01:00
|
|
|
subdir('tests/client')
|
2021-02-20 14:52:23 +01:00
|
|
|
subdir('contrib/tests')
|
2021-02-18 08:13:35 +01:00
|
|
|
endif
|