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
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
2019-04-14 12:00:29 +02:00
|
|
|
shared_c_stdaux = static_library(
|
|
|
|
|
'c-stdaux',
|
|
|
|
|
c_args: '-std=c11',
|
|
|
|
|
sources: files('c-stdaux/src/c-stdaux.h'),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
shared_c_stdaux_dep = declare_dependency(
|
|
|
|
|
include_directories: shared_inc,
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
2018-04-06 17:04:31 +02:00
|
|
|
shared_c_siphash = static_library(
|
|
|
|
|
'c-siphash',
|
2019-04-14 12:00:29 +02:00
|
|
|
include_directories: [
|
|
|
|
|
include_directories('c-stdaux/src'),
|
|
|
|
|
],
|
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
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
2018-09-04 10:50:40 +02:00
|
|
|
shared_c_rbtree = static_library(
|
|
|
|
|
'c-rbtree',
|
|
|
|
|
c_args: '-std=c11',
|
2019-04-14 12:00:29 +02:00
|
|
|
include_directories: [
|
|
|
|
|
include_directories('c-stdaux/src'),
|
|
|
|
|
],
|
2018-09-04 10:50:40 +02:00
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
2018-09-04 08:25:07 +02:00
|
|
|
|
2018-09-19 16:38:38 +02:00
|
|
|
if enable_ebpf
|
2018-09-04 08:25:07 +02:00
|
|
|
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: [
|
2019-04-14 12:00:29 +02:00
|
|
|
include_directories('c-stdaux/src'),
|
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('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,
|
2018-10-18 12:50:20 +02:00
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
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
|
|
|
|
2019-02-01 10:38:33 +01:00
|
|
|
###############################################################################
|
|
|
|
|
|
2019-04-14 13:36:32 +02:00
|
|
|
shared_nm_std_aux = static_library(
|
|
|
|
|
'nm-std-aux',
|
|
|
|
|
sources: files('nm-std-aux/c-list-util.c'),
|
|
|
|
|
c_args: [
|
|
|
|
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=0',
|
|
|
|
|
],
|
|
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
shared_nm_std_aux_dep = declare_dependency(
|
|
|
|
|
link_with: shared_nm_std_aux,
|
|
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
shared_nm_glib_aux_c_args = [
|
2019-02-01 10:38:33 +01:00
|
|
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
|
|
|
|
]
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
shared_nm_glib_aux = static_library(
|
2019-02-01 10:38:33 +01:00
|
|
|
'nm-utils-base',
|
2019-04-15 08:16:00 +02:00
|
|
|
sources: files('nm-glib-aux/nm-dedup-multi.c',
|
|
|
|
|
'nm-glib-aux/nm-enum-utils.c',
|
|
|
|
|
'nm-glib-aux/nm-errno.c',
|
|
|
|
|
'nm-glib-aux/nm-hash-utils.c',
|
|
|
|
|
'nm-glib-aux/nm-io-utils.c',
|
2019-05-03 11:57:35 +02:00
|
|
|
'nm-glib-aux/nm-keyfile-aux.c',
|
2019-04-15 08:16:00 +02:00
|
|
|
'nm-glib-aux/nm-random-utils.c',
|
|
|
|
|
'nm-glib-aux/nm-secret-utils.c',
|
|
|
|
|
'nm-glib-aux/nm-shared-utils.c',
|
|
|
|
|
'nm-glib-aux/nm-time-utils.c'),
|
|
|
|
|
c_args: shared_nm_glib_aux_c_args,
|
2019-02-01 10:38:33 +01:00
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
glib_dep,
|
2019-04-14 13:36:32 +02:00
|
|
|
shared_nm_std_aux_dep,
|
2019-02-01 10:38:33 +01:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
shared_nm_glib_aux_dep = declare_dependency(
|
|
|
|
|
link_with: shared_nm_glib_aux,
|
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
|
|
|
)
|
2018-10-12 18:05:48 +02:00
|
|
|
|
2019-04-15 08:16:00 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
2019-04-15 07:39:31 +02:00
|
|
|
shared_nm_udev_aux = static_library(
|
|
|
|
|
'nm-udev-aux',
|
|
|
|
|
sources: files('nm-udev-aux/nm-udev-utils.c'),
|
2019-04-15 08:16:00 +02:00
|
|
|
c_args: shared_nm_glib_aux_c_args,
|
2019-02-01 10:38:33 +01:00
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
glib_dep,
|
2019-04-15 08:16:00 +02:00
|
|
|
shared_nm_glib_aux_dep,
|
2019-02-01 10:38:33 +01:00
|
|
|
libudev_dep,
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2019-04-15 07:39:31 +02:00
|
|
|
shared_nm_udev_aux_dep = declare_dependency(
|
|
|
|
|
link_with: shared_nm_udev_aux,
|
2019-02-01 10:38:33 +01:00
|
|
|
include_directories: [
|
|
|
|
|
top_inc,
|
|
|
|
|
shared_inc,
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
glib_dep,
|
2019-04-15 08:16:00 +02:00
|
|
|
shared_nm_glib_aux_dep,
|
2019-02-01 10:38:33 +01:00
|
|
|
libudev_dep,
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2018-10-12 18:05:48 +02:00
|
|
|
###############################################################################
|
|
|
|
|
|
2018-12-28 18:11:16 +01:00
|
|
|
libnm_systemd_shared = static_library(
|
|
|
|
|
'nm-systemd-shared',
|
|
|
|
|
sources: files(
|
|
|
|
|
'systemd/src/basic/alloc-util.c',
|
|
|
|
|
'systemd/src/basic/escape.c',
|
|
|
|
|
'systemd/src/basic/env-file.c',
|
|
|
|
|
'systemd/src/basic/env-util.c',
|
|
|
|
|
'systemd/src/basic/ether-addr-util.c',
|
|
|
|
|
'systemd/src/basic/extract-word.c',
|
|
|
|
|
'systemd/src/basic/fd-util.c',
|
|
|
|
|
'systemd/src/basic/fileio.c',
|
|
|
|
|
'systemd/src/basic/fs-util.c',
|
|
|
|
|
'systemd/src/basic/hash-funcs.c',
|
|
|
|
|
'systemd/src/basic/hashmap.c',
|
|
|
|
|
'systemd/src/basic/hexdecoct.c',
|
|
|
|
|
'systemd/src/basic/hostname-util.c',
|
|
|
|
|
'systemd/src/basic/in-addr-util.c',
|
|
|
|
|
'systemd/src/basic/io-util.c',
|
2019-04-04 09:49:37 +02:00
|
|
|
'systemd/src/basic/memory-util.c',
|
2018-12-28 18:11:16 +01:00
|
|
|
'systemd/src/basic/mempool.c',
|
|
|
|
|
'systemd/src/basic/parse-util.c',
|
|
|
|
|
'systemd/src/basic/path-util.c',
|
|
|
|
|
'systemd/src/basic/prioq.c',
|
|
|
|
|
'systemd/src/basic/process-util.c',
|
|
|
|
|
'systemd/src/basic/random-util.c',
|
|
|
|
|
'systemd/src/basic/socket-util.c',
|
|
|
|
|
'systemd/src/basic/stat-util.c',
|
|
|
|
|
'systemd/src/basic/string-table.c',
|
|
|
|
|
'systemd/src/basic/string-util.c',
|
|
|
|
|
'systemd/src/basic/strv.c',
|
|
|
|
|
'systemd/src/basic/time-util.c',
|
|
|
|
|
'systemd/src/basic/tmpfile-util.c',
|
|
|
|
|
'systemd/src/basic/utf8.c',
|
|
|
|
|
'systemd/src/basic/util.c',
|
|
|
|
|
'systemd/nm-sd-utils-shared.c',
|
|
|
|
|
),
|
|
|
|
|
include_directories: include_directories(
|
|
|
|
|
'systemd/sd-adapt-shared',
|
|
|
|
|
'systemd/src/basic',
|
|
|
|
|
),
|
2019-04-15 08:16:00 +02:00
|
|
|
dependencies: shared_nm_glib_aux_dep,
|
2018-12-28 18:11:16 +01:00
|
|
|
c_args: [
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
|
|
|
|
'-DG_LOG_DOMAIN="libnm"',
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libnm_systemd_shared_dep = declare_dependency(
|
|
|
|
|
include_directories: include_directories(
|
|
|
|
|
'systemd/sd-adapt-shared',
|
|
|
|
|
'systemd/src/basic',
|
|
|
|
|
),
|
|
|
|
|
dependencies: [
|
2019-04-15 08:16:00 +02:00
|
|
|
shared_nm_glib_aux_dep,
|
2018-12-28 18:11:16 +01:00
|
|
|
],
|
|
|
|
|
link_with: [
|
|
|
|
|
libnm_systemd_shared,
|
|
|
|
|
],
|
|
|
|
|
)
|
2018-12-28 21:30:03 +01:00
|
|
|
|
|
|
|
|
libnm_systemd_logging_stub = static_library(
|
|
|
|
|
'nm-systemd-logging-stub',
|
|
|
|
|
sources: files(
|
|
|
|
|
'systemd/nm-logging-stub.c',
|
|
|
|
|
),
|
|
|
|
|
include_directories: include_directories(
|
|
|
|
|
'systemd/sd-adapt-shared',
|
|
|
|
|
'systemd/src/basic',
|
|
|
|
|
),
|
2019-04-15 08:16:00 +02:00
|
|
|
dependencies: shared_nm_glib_aux_dep,
|
2018-12-28 21:30:03 +01:00
|
|
|
c_args: [
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
|
|
|
|
'-DG_LOG_DOMAIN="libnm"',
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libnm_systemd_shared_no_logging_dep = declare_dependency(
|
|
|
|
|
dependencies: [
|
|
|
|
|
libnm_systemd_shared_dep,
|
|
|
|
|
],
|
|
|
|
|
link_with: [
|
|
|
|
|
libnm_systemd_logging_stub,
|
|
|
|
|
],
|
|
|
|
|
)
|
shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core
"libnm-core" implements common functionality for "NetworkManager" and
"libnm".
Note that clients like "nmcli" cannot access the internal API provided
by "libnm-core". So, if nmcli wants to do something that is also done by
"libnm-core", , "libnm", or "NetworkManager", the code would have to be
duplicated.
Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
Note that:
0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
On the other hand, "libnm-libnm-core-aux.la" is not used by
libnm-core, but provides utilities on top of it.
1) they both extend "libnm-core" with utlities that are not public
API of libnm itself. Maybe part of the code should one day become
public API of libnm. On the other hand, this is code for which
we may not want to commit to a stable interface or which we
don't want to provide as part of the API.
2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
and thus directly available to "libnm" and "NetworkManager".
On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
and "NetworkManager".
Both libraries may be statically linked by libnm clients (like
nmcli).
3) it must only use glib, libnm-glib-aux.la, and the public API
of libnm-core.
This is important: it must not use "libnm-core/nm-core-internal.h"
nor "libnm-core/nm-utils-private.h" so the static library is usable
by nmcli which couldn't access these.
Note that "shared/nm-meta-setting.c" is an entirely different case,
because it behaves differently depending on whether linking against
"libnm-core" or the client programs. As such, this file must be compiled
twice.
2019-04-15 09:26:53 +02:00
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
2019-04-21 10:11:16 +02:00
|
|
|
exe = executable(
|
|
|
|
|
'nm-utils/tests/test-shared-general',
|
|
|
|
|
[ 'nm-utils/tests/test-shared-general.c' ],
|
|
|
|
|
c_args: [
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
shared_nm_glib_aux_dep,
|
|
|
|
|
shared_c_siphash_dep,
|
shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core
"libnm-core" implements common functionality for "NetworkManager" and
"libnm".
Note that clients like "nmcli" cannot access the internal API provided
by "libnm-core". So, if nmcli wants to do something that is also done by
"libnm-core", , "libnm", or "NetworkManager", the code would have to be
duplicated.
Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
Note that:
0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
On the other hand, "libnm-libnm-core-aux.la" is not used by
libnm-core, but provides utilities on top of it.
1) they both extend "libnm-core" with utlities that are not public
API of libnm itself. Maybe part of the code should one day become
public API of libnm. On the other hand, this is code for which
we may not want to commit to a stable interface or which we
don't want to provide as part of the API.
2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
and thus directly available to "libnm" and "NetworkManager".
On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
and "NetworkManager".
Both libraries may be statically linked by libnm clients (like
nmcli).
3) it must only use glib, libnm-glib-aux.la, and the public API
of libnm-core.
This is important: it must not use "libnm-core/nm-core-internal.h"
nor "libnm-core/nm-utils-private.h" so the static library is usable
by nmcli which couldn't access these.
Note that "shared/nm-meta-setting.c" is an entirely different case,
because it behaves differently depending on whether linking against
"libnm-core" or the client programs. As such, this file must be compiled
twice.
2019-04-15 09:26:53 +02:00
|
|
|
],
|
|
|
|
|
)
|
2019-04-21 10:11:16 +02:00
|
|
|
|
shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core
"libnm-core" implements common functionality for "NetworkManager" and
"libnm".
Note that clients like "nmcli" cannot access the internal API provided
by "libnm-core". So, if nmcli wants to do something that is also done by
"libnm-core", , "libnm", or "NetworkManager", the code would have to be
duplicated.
Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
Note that:
0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
On the other hand, "libnm-libnm-core-aux.la" is not used by
libnm-core, but provides utilities on top of it.
1) they both extend "libnm-core" with utlities that are not public
API of libnm itself. Maybe part of the code should one day become
public API of libnm. On the other hand, this is code for which
we may not want to commit to a stable interface or which we
don't want to provide as part of the API.
2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
and thus directly available to "libnm" and "NetworkManager".
On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
and "NetworkManager".
Both libraries may be statically linked by libnm clients (like
nmcli).
3) it must only use glib, libnm-glib-aux.la, and the public API
of libnm-core.
This is important: it must not use "libnm-core/nm-core-internal.h"
nor "libnm-core/nm-utils-private.h" so the static library is usable
by nmcli which couldn't access these.
Note that "shared/nm-meta-setting.c" is an entirely different case,
because it behaves differently depending on whether linking against
"libnm-core" or the client programs. As such, this file must be compiled
twice.
2019-04-15 09:26:53 +02:00
|
|
|
test(
|
2019-04-21 10:11:16 +02:00
|
|
|
'shared/nm-utils/tests/test-shared-general',
|
|
|
|
|
test_script,
|
|
|
|
|
args: test_args + [exe.full_path()]
|
shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core
"libnm-core" implements common functionality for "NetworkManager" and
"libnm".
Note that clients like "nmcli" cannot access the internal API provided
by "libnm-core". So, if nmcli wants to do something that is also done by
"libnm-core", , "libnm", or "NetworkManager", the code would have to be
duplicated.
Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
Note that:
0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
On the other hand, "libnm-libnm-core-aux.la" is not used by
libnm-core, but provides utilities on top of it.
1) they both extend "libnm-core" with utlities that are not public
API of libnm itself. Maybe part of the code should one day become
public API of libnm. On the other hand, this is code for which
we may not want to commit to a stable interface or which we
don't want to provide as part of the API.
2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
and thus directly available to "libnm" and "NetworkManager".
On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
and "NetworkManager".
Both libraries may be statically linked by libnm clients (like
nmcli).
3) it must only use glib, libnm-glib-aux.la, and the public API
of libnm-core.
This is important: it must not use "libnm-core/nm-core-internal.h"
nor "libnm-core/nm-utils-private.h" so the static library is usable
by nmcli which couldn't access these.
Note that "shared/nm-meta-setting.c" is an entirely different case,
because it behaves differently depending on whether linking against
"libnm-core" or the client programs. As such, this file must be compiled
twice.
2019-04-15 09:26:53 +02:00
|
|
|
)
|