mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-26 10:03:40 +03:00
commit
7f9ac71c76
39
meson.build
39
meson.build
@ -1232,14 +1232,10 @@ includes = include_directories('src/basic',
|
||||
'src/libsystemd/sd-netlink',
|
||||
'src/libsystemd/sd-network',
|
||||
'src/libsystemd-network',
|
||||
'.',
|
||||
)
|
||||
'.')
|
||||
|
||||
add_project_arguments('-include', 'config.h', language : 'c')
|
||||
|
||||
gcrypt_util_sources = files('src/shared/gcrypt-util.h',
|
||||
'src/shared/gcrypt-util.c')
|
||||
|
||||
subdir('po')
|
||||
subdir('catalog')
|
||||
subdir('src/systemd')
|
||||
@ -1259,15 +1255,16 @@ libjournal_core = static_library(
|
||||
libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
|
||||
libsystemd = shared_library(
|
||||
'systemd',
|
||||
libsystemd_internal_sources,
|
||||
journal_internal_sources,
|
||||
'src/systemd/sd-id128.h', # pick a header file at random to work around old meson bug
|
||||
version : libsystemd_version,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libsystemd_sym_path],
|
||||
link_with : [libbasic],
|
||||
link_with : [libbasic,
|
||||
libbasic_gcrypt],
|
||||
link_whole : [libsystemd_static,
|
||||
libjournal_client],
|
||||
dependencies : [threads,
|
||||
libgcrypt,
|
||||
librt,
|
||||
libxz,
|
||||
liblz4],
|
||||
@ -1339,7 +1336,7 @@ foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
|
||||
'-shared',
|
||||
'-Wl,--version-script=' + version_script_arg,
|
||||
'-Wl,--undefined'],
|
||||
link_with : [libsystemd_internal,
|
||||
link_with : [libsystemd_static,
|
||||
libbasic],
|
||||
dependencies : [threads,
|
||||
librt],
|
||||
@ -1508,11 +1505,11 @@ endif
|
||||
if conf.get('ENABLE_RESOLVE') == 1
|
||||
executable('systemd-resolved',
|
||||
systemd_resolved_sources,
|
||||
gcrypt_util_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_resolve_core],
|
||||
dependencies : [threads,
|
||||
libgcrypt,
|
||||
libgpg_error,
|
||||
libm,
|
||||
libidn],
|
||||
@ -1522,11 +1519,11 @@ if conf.get('ENABLE_RESOLVE') == 1
|
||||
|
||||
exe = executable('systemd-resolve',
|
||||
systemd_resolve_sources,
|
||||
gcrypt_util_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_resolve_core],
|
||||
dependencies : [threads,
|
||||
libgcrypt,
|
||||
libgpg_error,
|
||||
libm,
|
||||
libidn],
|
||||
@ -1577,7 +1574,7 @@ if conf.get('ENABLE_LOGIND') == 1
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + version_script_arg],
|
||||
link_with : [libsystemd_internal,
|
||||
link_with : [libsystemd_static,
|
||||
libshared_static],
|
||||
dependencies : [threads,
|
||||
libpam,
|
||||
@ -2230,7 +2227,7 @@ if conf.get('ENABLE_HWDB') == 1
|
||||
'src/hwdb/hwdb.c',
|
||||
'src/libsystemd/sd-hwdb/hwdb-internal.h',
|
||||
include_directories : includes,
|
||||
link_with : [libudev_internal],
|
||||
link_with : [libudev_static],
|
||||
install_rpath : udev_rpath,
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
@ -2263,7 +2260,7 @@ exe = executable('systemd-udevd',
|
||||
c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
|
||||
link_with : [libudev_core,
|
||||
libsystemd_network,
|
||||
libudev_internal],
|
||||
libudev_static],
|
||||
dependencies : [threads,
|
||||
libkmod,
|
||||
libidn,
|
||||
@ -2280,7 +2277,7 @@ exe = executable('udevadm',
|
||||
include_directories : includes,
|
||||
link_with : [libudev_core,
|
||||
libsystemd_network,
|
||||
libudev_internal],
|
||||
libudev_static],
|
||||
dependencies : [threads,
|
||||
libkmod,
|
||||
libidn,
|
||||
@ -2354,7 +2351,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
include_directories : includes,
|
||||
link_with : [libnetworkd_core,
|
||||
libsystemd_network,
|
||||
libudev_internal,
|
||||
libudev_static,
|
||||
libshared],
|
||||
dependencies : [threads],
|
||||
install_rpath : rootlibexecdir,
|
||||
|
@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
basic_sources_plain = files('''
|
||||
basic_sources = files('''
|
||||
MurmurHash2.c
|
||||
MurmurHash2.h
|
||||
af-list.c
|
||||
@ -306,7 +306,7 @@ foreach item : [['af', af_list_txt, 'af', ''],
|
||||
generated_gperf_headers += [target1, target2]
|
||||
endforeach
|
||||
|
||||
basic_sources = basic_sources_plain + [missing_h] + generated_gperf_headers
|
||||
basic_sources += [missing_h] + generated_gperf_headers
|
||||
|
||||
libbasic = static_library(
|
||||
'basic',
|
||||
@ -315,6 +315,16 @@ libbasic = static_library(
|
||||
dependencies : [threads,
|
||||
libcap,
|
||||
libblkid,
|
||||
libselinux,
|
||||
],
|
||||
libselinux],
|
||||
c_args : ['-fvisibility=default'],
|
||||
install : false)
|
||||
|
||||
# A convenience library that is separate from libbasic to avoid
|
||||
# unnecessary linking to libgcrypt.
|
||||
libbasic_gcrypt = static_library(
|
||||
'basic-gcrypt',
|
||||
'gcrypt-util.c',
|
||||
'gcrypt-util.h',
|
||||
include_directories : includes,
|
||||
dependencies : [libgcrypt],
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
journal_internal_sources = files('''
|
||||
journal_client_sources = files('''
|
||||
audit-type.c
|
||||
audit-type.h
|
||||
catalog.c
|
||||
@ -38,14 +38,12 @@ journal_internal_sources = files('''
|
||||
'''.split())
|
||||
|
||||
if conf.get('HAVE_GCRYPT') == 1
|
||||
journal_internal_sources += files('''
|
||||
journal_client_sources += files('''
|
||||
journal-authenticate.c
|
||||
journal-authenticate.h
|
||||
fsprg.c
|
||||
fsprg.h
|
||||
'''.split())
|
||||
|
||||
journal_internal_sources += gcrypt_util_sources
|
||||
endif
|
||||
|
||||
############################################################
|
||||
@ -71,7 +69,13 @@ audit_type_to_name = custom_target(
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
journal_internal_sources += [audit_type_to_name]
|
||||
journal_client_sources += [audit_type_to_name]
|
||||
|
||||
libjournal_client = static_library(
|
||||
'journal-client',
|
||||
journal_client_sources,
|
||||
include_directories : includes,
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
||||
############################################################
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
sd_login_c = files('sd-login/sd-login.c')
|
||||
|
||||
libsystemd_internal_sources = files('''
|
||||
libsystemd_sources = files('''
|
||||
sd-bus/bus-bloom.c
|
||||
sd-bus/bus-bloom.h
|
||||
sd-bus/bus-common-errors.c
|
||||
@ -93,14 +93,15 @@ libsystemd_internal_sources = files('''
|
||||
sd-utf8/sd-utf8.c
|
||||
'''.split()) + sd_login_c
|
||||
|
||||
libsystemd_internal = static_library(
|
||||
libsystemd_static = static_library(
|
||||
'systemd',
|
||||
libsystemd_internal_sources,
|
||||
libsystemd_sources,
|
||||
install : false,
|
||||
include_directories : includes,
|
||||
link_with : libbasic,
|
||||
dependencies : [threads,
|
||||
librt])
|
||||
librt],
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
||||
libsystemd_sym = 'src/libsystemd/libsystemd.sym'
|
||||
|
||||
|
@ -31,21 +31,8 @@ libudev_sources = files('''
|
||||
|
||||
############################################################
|
||||
|
||||
libudev_sym = 'libudev.sym'
|
||||
libudev_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libudev_sym)
|
||||
libudev = shared_library(
|
||||
'udev',
|
||||
libudev_sources,
|
||||
version : libudev_version,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libudev_sym_path],
|
||||
link_with : [libbasic,
|
||||
libsystemd_internal],
|
||||
dependencies : [threads],
|
||||
link_depends : libudev_sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
libudev_sym = files('libudev.sym')
|
||||
libudev_sym_path = meson.current_source_dir() + '/libudev.sym'
|
||||
|
||||
install_headers('libudev.h')
|
||||
libudev_h_path = '@0@/libudev.h'.format(meson.current_source_dir())
|
||||
|
@ -151,7 +151,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
|
||||
[['src/network/test-network.c'],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libudev_static,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[threads]],
|
||||
@ -166,7 +166,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
'src/network/test-network-tables.c',
|
||||
test_tables_h],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libudev_static,
|
||||
libudev_core,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
|
@ -31,7 +31,7 @@ basic_dns_sources = files('''
|
||||
|
||||
dns_type_h = files('dns-type.h')[0]
|
||||
|
||||
systemd_resolved_only_sources = files('''
|
||||
systemd_resolved_sources = files('''
|
||||
resolved.c
|
||||
resolved-manager.c
|
||||
resolved-manager.h
|
||||
@ -80,7 +80,7 @@ systemd_resolved_only_sources = files('''
|
||||
resolved-etc-hosts.c
|
||||
'''.split())
|
||||
|
||||
systemd_resolve_only_sources = files('resolve-tool.c')
|
||||
systemd_resolve_sources = files('resolve-tool.c')
|
||||
|
||||
############################################################
|
||||
|
||||
@ -141,14 +141,13 @@ resolved_dnssd_gperf_c = custom_target(
|
||||
output : 'resolved-dnssd-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_resolved_sources = (basic_dns_sources +
|
||||
[resolved_gperf_c, resolved_dnssd_gperf_c] +
|
||||
systemd_resolved_only_sources +
|
||||
dns_type_headers)
|
||||
libsystemd_resolve_core = static_library(
|
||||
'systemd-resolve-core',
|
||||
basic_dns_sources,
|
||||
dns_type_headers,
|
||||
include_directories : includes)
|
||||
|
||||
systemd_resolve_sources = (basic_dns_sources +
|
||||
systemd_resolve_only_sources +
|
||||
dns_type_headers)
|
||||
systemd_resolved_sources += [resolved_gperf_c, resolved_dnssd_gperf_c]
|
||||
|
||||
if conf.get('ENABLE_RESOLVE') == 1
|
||||
install_data('org.freedesktop.resolve1.conf',
|
||||
@ -178,37 +177,37 @@ endif
|
||||
|
||||
tests += [
|
||||
[['src/resolve/test-resolve-tables.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers,
|
||||
'src/shared/test-tables.h'],
|
||||
[],
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVE'],
|
||||
|
||||
[['src/resolve/test-dns-packet.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[],
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVE'],
|
||||
|
||||
[['src/resolve/test-resolved-packet.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[],
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVE'],
|
||||
|
||||
[['src/resolve/test-dnssec.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[],
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
|
@ -56,8 +56,6 @@ shared_sources = '''
|
||||
firewall-util.h
|
||||
fstab-util.c
|
||||
fstab-util.h
|
||||
gcrypt-util.c
|
||||
gcrypt-util.h
|
||||
generator.c
|
||||
generator.h
|
||||
gpt.h
|
||||
@ -159,24 +157,25 @@ libshared_deps = [threads,
|
||||
|
||||
libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
|
||||
|
||||
libshared = shared_library(
|
||||
libshared_static = static_library(
|
||||
libshared_name,
|
||||
shared_sources,
|
||||
basic_sources,
|
||||
journal_internal_sources,
|
||||
libsystemd_internal_sources,
|
||||
include_directories : includes,
|
||||
dependencies : libshared_deps,
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
||||
libshared = shared_library(
|
||||
libshared_name,
|
||||
libudev_sources,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libshared_sym_path],
|
||||
'-Wl,--version-script=' + libshared_sym_path],
|
||||
link_whole : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static,
|
||||
libjournal_client],
|
||||
c_args : ['-fvisibility=default'],
|
||||
dependencies : libshared_deps,
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
libshared_static = static_library(
|
||||
libshared_name,
|
||||
shared_sources,
|
||||
basic_sources,
|
||||
include_directories : includes,
|
||||
dependencies : libshared_deps)
|
||||
|
@ -67,7 +67,7 @@ tests += [
|
||||
'src/test/test-helper.c'],
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd_internal],
|
||||
libshared],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
@ -119,6 +119,7 @@ tests += [
|
||||
|
||||
[['src/test/test-dns-domain.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
@ -167,7 +168,7 @@ tests += [
|
||||
[]],
|
||||
|
||||
[['src/test/test-copy.c'],
|
||||
[libshared_static],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sigbus.c'],
|
||||
@ -410,7 +411,7 @@ tests += [
|
||||
[libcore,
|
||||
libjournal_core,
|
||||
libudev_core,
|
||||
libudev_internal,
|
||||
libudev_static,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[threads,
|
||||
@ -610,7 +611,7 @@ tests += [
|
||||
|
||||
[['src/test/test-udev.c'],
|
||||
[libudev_core,
|
||||
libudev_internal,
|
||||
libudev_static,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[threads,
|
||||
@ -772,7 +773,7 @@ tests += [
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
||||
[libshared_static,
|
||||
libsystemd_internal],
|
||||
libsystemd_static],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
||||
|
@ -113,15 +113,36 @@ if get_option('link-udev-shared')
|
||||
udev_rpath = rootlibexecdir
|
||||
else
|
||||
udev_link_with = [libshared_static,
|
||||
libsystemd_internal]
|
||||
libsystemd_static]
|
||||
udev_rpath = ''
|
||||
endif
|
||||
|
||||
libudev_internal = static_library(
|
||||
'udev',
|
||||
libudev_basic = static_library(
|
||||
'udev-basic',
|
||||
libudev_sources,
|
||||
include_directories : includes,
|
||||
link_with : udev_link_with)
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
||||
libudev_static = static_library(
|
||||
'udev',
|
||||
'udev.h',
|
||||
include_directories : includes,
|
||||
link_with : udev_link_with,
|
||||
link_whole : libudev_basic)
|
||||
|
||||
libudev = shared_library(
|
||||
'udev',
|
||||
'udev.h', # pick a header file at random to work around old meson bug
|
||||
version : libudev_version,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libudev_sym_path],
|
||||
link_with : [libsystemd_static, libshared_static],
|
||||
link_whole : libudev_basic,
|
||||
dependencies : [threads],
|
||||
link_depends : libudev_sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
|
||||
libudev_core_includes = [includes, include_directories('net')]
|
||||
libudev_core = static_library(
|
||||
@ -150,7 +171,7 @@ foreach prog : [['ata_id/ata_id.c'],
|
||||
prog,
|
||||
include_directories : includes,
|
||||
c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
|
||||
link_with : [libudev_internal],
|
||||
link_with : [libudev_static],
|
||||
install_rpath : udev_rpath,
|
||||
install : true,
|
||||
install_dir : udevlibexecdir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user