# vim: filetype=automake
-STORAGE_DRIVER_SHEEPDOG_SOURCES = \
- storage/storage_backend_sheepdog.h \
- storage/storage_backend_sheepdog.c \
- storage/storage_backend_sheepdog_priv.h \
- $(NULL)
-
STORAGE_DRIVER_GLUSTER_SOURCES = \
storage/storage_backend_gluster.h \
storage/storage_backend_gluster.c \
endif WITH_STORAGE
-if WITH_STORAGE_SHEEPDOG
-libvirt_storage_backend_sheepdog_la_SOURCES = \
- $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_la_CFLAGS = \
- -I$(srcdir)/conf \
- $(AM_CFLAGS) \
- $(NULL)
-
-libvirt_storage_backend_sheepdog_priv_la_SOURCES = \
- $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
- -I$(srcdir)/conf \
- $(AM_CFLAGS) \
- $(NULL)
-noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
-libvirt_storage_backend_sheepdog_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_sheepdog_la_LIBADD = \
- libvirt.la \
- $(GLIB_LIBS) \
- $(NULL)
-endif WITH_STORAGE_SHEEPDOG
-
if WITH_STORAGE_GLUSTER
libvirt_storage_backend_gluster_la_SOURCES = \
$(STORAGE_DRIVER_GLUSTER_SOURCES)
'storage_backend_scsi.c',
]
+storage_backend_sheepdog_sources = [
+ 'storage_backend_sheepdog.c',
+]
+
storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
'install_dir': storage_backend_install_dir,
}
endif
+
+if conf.has('WITH_STORAGE_SHEEPDOG')
+ storage_backend_sheepdog_priv_lib = static_library(
+ 'virt_storage_backend_sheepdog_priv',
+ storage_backend_sheepdog_sources,
+ dependencies: [
+ src_dep,
+ ],
+ include_directories: [
+ conf_inc_dir,
+ ],
+ )
+
+ virt_modules += {
+ 'name': 'virt_storage_backend_sheepdog',
+ 'link_whole': [
+ storage_backend_sheepdog_priv_lib,
+ ],
+ 'install_dir': storage_backend_install_dir,
+ }
+endif