diff options
| author | Michael Biebl <biebl@debian.org> | 2019-04-21 21:09:51 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-04-21 21:09:51 +0200 |
| commit | 85563b7fc7ec2cd21e38debb9b28db342e2e8e7c (patch) | |
| tree | cce7b0b02d28fae2df9fdf2c1804cacd1500f2d7 /shared/meson.build | |
| parent | 9a6dcbf895f9da01768e64b73cec88c16157d91e (diff) | |
New upstream version 1.18.0 upstream/1.18.0
Diffstat (limited to 'shared/meson.build')
| -rw-r--r-- | shared/meson.build | 125 |
1 files changed, 79 insertions, 46 deletions
diff --git a/shared/meson.build b/shared/meson.build index a6e94d6b..ed9bf03f 100644 --- a/shared/meson.build +++ b/shared/meson.build @@ -1,5 +1,7 @@ shared_inc = include_directories('.') +############################################################################### + shared_c_siphash = static_library( 'c-siphash', sources: 'c-siphash/src/c-siphash.c', @@ -10,6 +12,8 @@ shared_c_siphash_dep = declare_dependency( link_with: shared_c_siphash, ) +############################################################################### + shared_c_rbtree = static_library( 'c-rbtree', c_args: '-std=c11', @@ -23,6 +27,7 @@ shared_c_rbtree_dep = declare_dependency( link_with: shared_c_rbtree, ) +############################################################################### if enable_ebpf shared_n_acd_bpf_files = files('n-acd/src/n-acd-bpf.c') @@ -62,6 +67,8 @@ shared_n_acd_dep = declare_dependency( link_with: shared_n_acd, ) +############################################################################### + version_conf = configuration_data() version_conf.set('NM_MAJOR_VERSION', nm_major_version) version_conf.set('NM_MINOR_VERSION', nm_minor_version) @@ -73,8 +80,6 @@ version_header = configure_file( configuration: version_conf, ) -shared_nm_ethtool_utils_c = files('nm-ethtool-utils.c') - shared_nm_meta_setting_c = files('nm-meta-setting.c') shared_nm_test_utils_impl_c = files('nm-test-utils-impl.c') @@ -83,35 +88,60 @@ shared_nm_utils_nm_vpn_plugin_utils_c = files('nm-utils/nm-vpn-plugin-utils.c') ############################################################################### -shared_nm_utils_c_args = [ +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, + ], +) + +############################################################################### + +shared_nm_glib_aux_c_args = [ '-DG_LOG_DOMAIN="@0@"'.format(libnm_name), '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)', ] -shared_nm_utils_base = static_library( +shared_nm_glib_aux = static_library( 'nm-utils-base', - sources: files('nm-utils/c-list-util.c', - 'nm-utils/nm-dedup-multi.c', - 'nm-utils/nm-enum-utils.c', - 'nm-utils/nm-errno.c', - 'nm-utils/nm-hash-utils.c', - 'nm-utils/nm-io-utils.c', - 'nm-utils/nm-random-utils.c', - 'nm-utils/nm-secret-utils.c', - 'nm-utils/nm-shared-utils.c', - 'nm-utils/nm-time-utils.c'), - c_args: shared_nm_utils_c_args, + 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', + '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, include_directories: [ top_inc, shared_inc, ], dependencies: [ glib_dep, + shared_nm_std_aux_dep, ], ) -shared_nm_utils_base_dep = declare_dependency( - link_with: shared_nm_utils_base, +shared_nm_glib_aux_dep = declare_dependency( + link_with: shared_nm_glib_aux, include_directories: [ top_inc, shared_inc, @@ -119,54 +149,38 @@ shared_nm_utils_base_dep = declare_dependency( dependencies: glib_dep, ) -shared_nm_utils_udev = static_library( - 'nm-utils-udev', - sources: files('nm-utils/nm-udev-utils.c'), - c_args: shared_nm_utils_c_args, +############################################################################### + +shared_nm_udev_aux = static_library( + 'nm-udev-aux', + sources: files('nm-udev-aux/nm-udev-utils.c'), + c_args: shared_nm_glib_aux_c_args, include_directories: [ top_inc, shared_inc, ], dependencies: [ glib_dep, - shared_nm_utils_base_dep, + shared_nm_glib_aux_dep, libudev_dep, ], ) -shared_nm_utils_udev_dep = declare_dependency( - link_with: shared_nm_utils_udev, +shared_nm_udev_aux_dep = declare_dependency( + link_with: shared_nm_udev_aux, include_directories: [ top_inc, shared_inc, ], dependencies: [ glib_dep, - shared_nm_utils_base_dep, + shared_nm_glib_aux_dep, libudev_dep, ], ) ############################################################################### -test_shared_general = 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_utils_base_dep, - link_with: shared_c_siphash, -) -test( - 'shared/nm-utils/test-shared-general', - test_script, - args: test_args + [test_shared_general.full_path()] -) - -############################################################################### - libnm_systemd_shared = static_library( 'nm-systemd-shared', sources: files( @@ -185,6 +199,7 @@ libnm_systemd_shared = static_library( 'systemd/src/basic/hostname-util.c', 'systemd/src/basic/in-addr-util.c', 'systemd/src/basic/io-util.c', + 'systemd/src/basic/memory-util.c', 'systemd/src/basic/mempool.c', 'systemd/src/basic/parse-util.c', 'systemd/src/basic/path-util.c', @@ -206,7 +221,7 @@ libnm_systemd_shared = static_library( 'systemd/sd-adapt-shared', 'systemd/src/basic', ), - dependencies: shared_nm_utils_base_dep, + dependencies: shared_nm_glib_aux_dep, c_args: [ '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED', '-DG_LOG_DOMAIN="libnm"', @@ -219,7 +234,7 @@ libnm_systemd_shared_dep = declare_dependency( 'systemd/src/basic', ), dependencies: [ - shared_nm_utils_base_dep, + shared_nm_glib_aux_dep, ], link_with: [ libnm_systemd_shared, @@ -235,7 +250,7 @@ libnm_systemd_logging_stub = static_library( 'systemd/sd-adapt-shared', 'systemd/src/basic', ), - dependencies: shared_nm_utils_base_dep, + dependencies: shared_nm_glib_aux_dep, c_args: [ '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED', '-DG_LOG_DOMAIN="libnm"', @@ -250,3 +265,21 @@ libnm_systemd_shared_no_logging_dep = declare_dependency( libnm_systemd_logging_stub, ], ) + +############################################################################### + +test_shared_general = 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, + link_with: shared_c_siphash, +) +test( + 'shared/nm-utils/test-shared-general', + test_script, + args: test_args + [test_shared_general.full_path()] +) |