meson: src: build libvirt_driver_nodedev_impl.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-24 12:36:02 +02:00
parent 412afa5cc1
commit edc8662daf
3 changed files with 32 additions and 47 deletions

View File

@ -153,6 +153,7 @@ subdir('admin')
subdir('locking')
subdir('logging')
subdir('network')
subdir('node_device')
subdir('security')
subdir('bhyve')

View File

@ -1,20 +1,5 @@
# vim: filetype=automake
NODE_DEVICE_DRIVER_SOURCES = \
node_device/node_device_driver.c \
node_device/node_device_driver.h \
$(NULL)
NODE_DEVICE_DRIVER_HAL_SOURCES = \
node_device/node_device_hal.c \
node_device/node_device_hal.h \
$(NULL)
NODE_DEVICE_DRIVER_UDEV_SOURCES = \
node_device/node_device_udev.c \
node_device/node_device_udev.h \
$(NULL)
DRIVER_SOURCE_FILES += \
$(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_SOURCES)) \
$(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_HAL_SOURCES)) \
@ -27,42 +12,10 @@ STATEFUL_DRIVER_SOURCE_FILES += \
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
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
mod_LTLIBRARIES += libvirt_driver_nodedev.la
libvirt_driver_nodedev_impl_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)
libvirt_driver_nodedev_impl_la_CFLAGS = \
-I$(srcdir)/access \
-I$(builddir)/access \
-I$(srcdir)/conf \
$(AM_CFLAGS) \
$(LIBNL_CFLAGS) \
$(NULL)
libvirt_driver_nodedev_impl_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
$(NULL)
if WITH_HAL
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_impl_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
libvirt_driver_nodedev_impl_la_CFLAGS += \
$(UDEV_CFLAGS) \
$(PCIACCESS_CFLAGS) \
$(NULL)
libvirt_driver_nodedev_impl_la_LIBADD += \
$(UDEV_LIBS) \
$(PCIACCESS_LIBS) \
$(NULL)
endif WITH_UDEV
sbin_PROGRAMS += virtnodedevd

View File

@ -0,0 +1,31 @@
node_device_driver_sources = [
'node_device_driver.c',
]
if conf.has('WITH_HAL')
node_device_driver_sources += 'node_device_hal.c'
endif
if conf.has('WITH_UDEV')
node_device_driver_sources += 'node_device_udev.c'
endif
if conf.has('WITH_NODE_DEVICES')
node_device_driver_impl = static_library(
'virt_driver_nodedev_impl',
[
node_device_driver_sources,
],
dependencies: [
access_dep,
hal_dep,
libnl_dep,
pciaccess_dep,
src_dep,
udev_dep,
],
include_directories: [
conf_inc_dir,
],
)
endif