diff --git a/src/Makefile.am b/src/Makefile.am index ea487597bd..9764a648f9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) diff --git a/src/meson.build b/src/meson.build index 5f7b69590f..02ce9176ce 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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, + ], +)