]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_driver.a static library
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:03:24 +0000 (01:03 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:04 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/Makefile.am
src/meson.build

index ea487597bda91d7371db0d37e95db7ec1c473869..9764a648f9896f3607556ffb94a16b8709cd8987 100644 (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)
index 5f7b69590fd33d20bbbcffb2af27319ebf848185..02ce9176ce0ab320a50d2aab73cf267895bd9ca6 100644 (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,
+  ],
+)