meson: src: build libvirt_driver.a static library

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:03:24 +02:00
parent cd379d3e1a
commit 8e7d93da76
2 changed files with 36 additions and 41 deletions

View File

@ -57,7 +57,6 @@ OPENRC_CONF_FILES =
SYSCONF_FILES =
sbin_PROGRAMS =
bin_PROGRAMS =
DRIVER_SOURCES =
COMMON_UNIT_VARS = \
-e 's|[@]runstatedir[@]|$(runstatedir)|g' \
@ -106,36 +105,6 @@ augeasdir = $(datadir)/augeas/lenses
augeastestdir = $(datadir)/augeas/lenses/tests
DRIVER_SOURCES += \
driver.c driver.h \
driver-hypervisor.h \
driver-interface.h \
driver-network.h \
driver-nodedev.h \
driver-nwfilter.h \
driver-secret.h \
driver-state.h \
driver-storage.h \
driver-stream.h \
internal.h \
$(DATATYPES_SOURCES) \
libvirt.c libvirt_internal.h \
libvirt-domain.c \
libvirt-domain-checkpoint.c \
libvirt-domain-snapshot.c \
libvirt-host.c \
libvirt-interface.c \
libvirt-network.c \
libvirt-nodedev.c \
libvirt-nwfilter.c \
libvirt-secret.c \
libvirt-storage.c \
libvirt-stream.c \
$(NULL)
# .libs/libvirt.so is built by libtool as a side-effect of the Makefile
# rule for libvirt.la. However, checking symbols relies on Linux ELF layout
if WITH_LINUX
@ -249,16 +218,6 @@ check-local: check-protocol check-symfile check-symsorting \
# First deal with sources usable in non-daemon context
noinst_LTLIBRARIES += libvirt_driver.la
libvirt_la_BUILT_LIBADD += libvirt_driver.la
libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
libvirt_driver_la_CFLAGS = \
$(GNUTLS_CFLAGS) $(CURL_CFLAGS) $(XDR_CFLAGS) \
-I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_la_LIBADD = \
$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
# All .syms files should be placed in exactly one of these three lists,
# depending on whether they are stored in git and/or used in the build.
SYM_FILES += $(USED_SYM_FILES)

View File

@ -114,3 +114,39 @@ subdir('hyperv')
subdir('openvz')
subdir('test')
subdir('vmware')
driver_sources = [
'driver.c',
'libvirt.c',
'libvirt-domain.c',
'libvirt-domain-checkpoint.c',
'libvirt-domain-snapshot.c',
'libvirt-host.c',
'libvirt-interface.c',
'libvirt-network.c',
'libvirt-nodedev.c',
'libvirt-nwfilter.c',
'libvirt-secret.c',
'libvirt-storage.c',
'libvirt-stream.c',
]
driver_lib = static_library(
'virt_driver',
[
driver_sources,
datatypes_sources,
],
dependencies: [
curl_dep,
dlopen_dep,
gnutls_dep,
rpc_dep,
src_dep,
xdr_dep,
],
include_directories: [
conf_inc_dir,
],
)