meson: src: build liblockd_impl.a static library

This introduces intermediate static library that is required for
following remote protocol check.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-06-18 01:09:25 +02:00
parent ca8fb9e88f
commit 4e35e142bb
2 changed files with 47 additions and 33 deletions

View File

@ -6,22 +6,10 @@ LOCK_DRIVER_SANLOCK_SOURCES = \
LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
locking/sanlock_helper.c
LOCK_PROTOCOL_GENERATED = \
locking/lock_protocol.h \
locking/lock_protocol.c \
$(NULL)
LOCK_DAEMON_GENERATED = \
locking/lock_daemon_dispatch_stubs.h
$(NULL)
LOCK_PROTOCOL = $(srcdir)/locking/lock_protocol.x
LOCK_DRIVER_LOCKD_SOURCES = \
locking/lock_driver_lockd.c \
locking/lock_driver_lockd.h \
$(NULL)
LOCK_DAEMON_SOURCES = \
locking/lock_daemon.h \
locking/lock_daemon.c \
@ -32,7 +20,6 @@ LOCK_DAEMON_SOURCES = \
$(NULL)
BUILT_SOURCES += \
$(LOCK_PROTOCOL_GENERATED) \
$(LOCK_DAEMON_GENERATED) \
$(NULL)
@ -60,23 +47,11 @@ lockdriver_LTLIBRARIES =
if WITH_LIBVIRTD
lockdriver_LTLIBRARIES += lockd.la
lockd_la_SOURCES = \
$(LOCK_DRIVER_LOCKD_SOURCES) \
$(NULL)
nodist_lockd_la_SOURCES = \
$(LOCK_PROTOCOL_GENERATED) \
$(NULL)
lockd_la_CFLAGS = \
-I$(srcdir)/conf \
-I$(srcdir)/locking \
-I$(builddir)/locking \
-I$(builddir)/rpc \
$(XDR_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
lockd_la_SOURCES =
lockd_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
lockd_la_LIBADD = \
libvirt.la \
libvirt_lockd_impl.la \
$(GLIB_LIBS) \
$(XDR_LIBS) \
$(NULL)
@ -85,12 +60,6 @@ if WITH_DTRACE_PROBES
lockd_la_LIBADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES
if WITH_SASL
lockd_la_CFLAGS += \
$(SASL_CFLAGS) \
$(NULL)
endif WITH_SASL
if WITH_QEMU
augeastest_DATA += locking/test_libvirt_lockd.aug
nodist_conf_DATA += locking/qemu-lockd.conf

View File

@ -1,9 +1,35 @@
lock_protocol = 'lock_protocol.x'
lock_driver_sources = [
'lock_manager.c',
'lock_driver_nop.c',
'domain_lock.c',
]
lock_driver_lockd_sources = [
'lock_driver_lockd.c',
]
lock_protocol_generated = []
lock_protocol_generated += custom_target(
'lock_protocol.h',
input: lock_protocol,
output: 'lock_protocol.h',
command: [
genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@',
],
)
lock_protocol_generated += custom_target(
'lock_protocol.c',
input: lock_protocol,
output: 'lock_protocol.c',
command: [
genprotocol_prog, rpcgen_prog, '-c', '@INPUT@', '@OUTPUT@',
],
)
lock_driver_lib = static_library(
'virt_lock_driver',
[
@ -18,3 +44,22 @@ lock_driver_lib = static_library(
)
libvirt_libs += lock_driver_lib
if conf.has('WITH_LIBVIRTD')
lockd_lib_impl = static_library(
'lockd_impl',
[
files(lock_driver_lockd_sources),
lock_protocol_generated,
],
include_directories: [
conf_inc_dir,
],
dependencies: [
rpc_dep,
sasl_dep,
src_dep,
xdr_dep,
],
)
endif