[libvirt PATCH v2 06/10] nodedev: Build a non-loadable driver lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In order to test the nodedev driver, we need to link against a
non-loadable module. Similar to other loadable modules already in the
repository, create an _impl library that can be linked against the unit
tests and then create a loadable module from that.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/node_device/Makefile.inc.am | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am
index 788563665f..5993165b56 100644
--- a/src/node_device/Makefile.inc.am
+++ b/src/node_device/Makefile.inc.am
@@ -34,34 +34,37 @@ EXTRA_DIST += \
 
 if WITH_NODE_DEVICES
 # Needed to keep automake quiet about conditionals
+noinst_LTLIBRARIES += libvirt_driver_nodedev_impl.la
+libvirt_driver_nodedev_la_SOURCES =
+libvirt_driver_nodedev_la_LIBADD = libvirt_driver_nodedev_impl.la
 mod_LTLIBRARIES += libvirt_driver_nodedev.la
-libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)
+libvirt_driver_nodedev_impl_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)
 
-libvirt_driver_nodedev_la_CFLAGS = \
+libvirt_driver_nodedev_impl_la_CFLAGS = \
 	-I$(srcdir)/access \
 	-I$(builddir)/access \
 	-I$(srcdir)/conf \
 	$(AM_CFLAGS) \
 	$(LIBNL_CFLAGS) \
 	$(NULL)
-libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
-libvirt_driver_nodedev_la_LIBADD = \
+libvirt_driver_nodedev_impl_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
+libvirt_driver_nodedev_impl_la_LIBADD = \
 	libvirt.la \
 	$(GLIB_LIBS) \
 	$(NULL)
 
 if WITH_HAL
-libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES)
-libvirt_driver_nodedev_la_CFLAGS += $(HAL_CFLAGS)
-libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS)
+libvirt_driver_nodedev_impl_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES)
+libvirt_driver_nodedev_impl_la_CFLAGS += $(HAL_CFLAGS)
+libvirt_driver_nodedev_impl_la_LIBADD += $(HAL_LIBS)
 endif WITH_HAL
 if WITH_UDEV
-libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
-libvirt_driver_nodedev_la_CFLAGS += \
+libvirt_driver_nodedev_impl_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
+libvirt_driver_nodedev_impl_la_CFLAGS += \
 	$(UDEV_CFLAGS) \
 	$(PCIACCESS_CFLAGS) \
 	$(NULL)
-libvirt_driver_nodedev_la_LIBADD += \
+libvirt_driver_nodedev_impl_la_LIBADD += \
 	$(UDEV_LIBS) \
 	$(PCIACCESS_LIBS) \
 	$(NULL)
-- 
2.21.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux