Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/Makefile.am | 41 -----------------------------------------
src/meson.build | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 41 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b948ac47a6d..50807ee7491 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -56,7 +56,6 @@ OPENRC_CONF_FILES =
SYSCONF_FILES =
sbin_PROGRAMS =
bin_PROGRAMS =
-DRIVER_SOURCES =
COMMON_UNIT_VARS = \
-e 's|[@]runstatedir[@]|$(runstatedir)|g' \
@@ -103,36 +102,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
@@ -246,16 +215,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)
diff --git a/src/meson.build b/src/meson.build
index 2c56caf5442..753d93253ea 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -105,3 +105,38 @@ 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,
+ src_dep,
+ xdr_dep,
+ ],
+ include_directories: [
+ conf_inc_dir,
+ ],
+)
--
2.26.2