mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
meson: introduce libtimesyncd_core library
This commit is contained in:
parent
b09f01463a
commit
f5a5284ea1
12
meson.build
12
meson.build
@ -2610,19 +2610,11 @@ if conf.get('ENABLE_TIMEDATECTL') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_TIMESYNCD') == 1
|
if conf.get('ENABLE_TIMESYNCD') == 1
|
||||||
if get_option('link-timesyncd-shared')
|
|
||||||
timesyncd_link_with = [libshared]
|
|
||||||
else
|
|
||||||
timesyncd_link_with = [libsystemd_static,
|
|
||||||
libshared_static,
|
|
||||||
libbasic_gcrypt]
|
|
||||||
endif
|
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-timesyncd',
|
'systemd-timesyncd',
|
||||||
systemd_timesyncd_sources,
|
systemd_timesyncd_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [timesyncd_link_with],
|
link_with : [libtimesyncd_core],
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
libm],
|
libm],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -2633,7 +2625,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
|
|||||||
'systemd-time-wait-sync',
|
'systemd-time-wait-sync',
|
||||||
'src/timesync/wait-sync.c',
|
'src/timesync/wait-sync.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [timesyncd_link_with],
|
link_with : [libtimesyncd_core],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
@ -1,25 +1,38 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
systemd_timesyncd_sources = files('''
|
sources = files(
|
||||||
timesyncd.c
|
'timesyncd-conf.c',
|
||||||
timesyncd-bus.c
|
'timesyncd-conf.h',
|
||||||
timesyncd-bus.h
|
'timesyncd-manager.c',
|
||||||
timesyncd-conf.c
|
'timesyncd-manager.h',
|
||||||
timesyncd-conf.h
|
'timesyncd-ntp-message.h',
|
||||||
timesyncd-manager.c
|
'timesyncd-server.c',
|
||||||
timesyncd-manager.h
|
'timesyncd-server.h')
|
||||||
timesyncd-ntp-message.h
|
|
||||||
timesyncd-server.c
|
|
||||||
timesyncd-server.h
|
|
||||||
'''.split())
|
|
||||||
|
|
||||||
timesyncd_gperf_c = custom_target(
|
systemd_timesyncd_sources = files(
|
||||||
|
'timesyncd.c',
|
||||||
|
'timesyncd-bus.c',
|
||||||
|
'timesyncd-bus.h')
|
||||||
|
|
||||||
|
sources += custom_target(
|
||||||
'timesyncd-gperf.c',
|
'timesyncd-gperf.c',
|
||||||
input : 'timesyncd-gperf.gperf',
|
input : 'timesyncd-gperf.gperf',
|
||||||
output : 'timesyncd-gperf.c',
|
output : 'timesyncd-gperf.c',
|
||||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||||
|
|
||||||
systemd_timesyncd_sources += [timesyncd_gperf_c]
|
if get_option('link-timesyncd-shared')
|
||||||
|
timesyncd_link_with = [libshared]
|
||||||
|
else
|
||||||
|
timesyncd_link_with = [libsystemd_static,
|
||||||
|
libshared_static,
|
||||||
|
libbasic_gcrypt]
|
||||||
|
endif
|
||||||
|
|
||||||
|
libtimesyncd_core = static_library(
|
||||||
|
'timesyncd-core',
|
||||||
|
sources,
|
||||||
|
include_directories : includes,
|
||||||
|
link_with : [timesyncd_link_with])
|
||||||
|
|
||||||
if conf.get('ENABLE_TIMESYNCD') == 1
|
if conf.get('ENABLE_TIMESYNCD') == 1
|
||||||
timesyncd_conf = configure_file(
|
timesyncd_conf = configure_file(
|
||||||
@ -41,14 +54,8 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/timesync/test-timesync.c',
|
[['src/timesync/test-timesync.c'],
|
||||||
'src/timesync/timesyncd-manager.c',
|
[libtimesyncd_core,
|
||||||
'src/timesync/timesyncd-manager.h',
|
libshared],
|
||||||
'src/timesync/timesyncd-conf.c',
|
|
||||||
'src/timesync/timesyncd-conf.h',
|
|
||||||
'src/timesync/timesyncd-server.c',
|
|
||||||
'src/timesync/timesyncd-server.h',
|
|
||||||
timesyncd_gperf_c],
|
|
||||||
[],
|
|
||||||
[libm]],
|
[libm]],
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user