1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

meson: src: build libvirt_lxc binary

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 13:30:15 +02:00
parent b13e0a4c12
commit be32e98dee
2 changed files with 46 additions and 89 deletions

View File

@ -1,40 +1,5 @@
# vim: filetype=automake
LXC_MONITOR_PROTOCOL_GENERATED = \
lxc/lxc_monitor_protocol.h \
lxc/lxc_monitor_protocol.c \
$(NULL)
LXC_MONITOR_GENERATED = \
lxc/lxc_monitor_dispatch.h \
$(NULL)
LXC_CONTROLLER_GENERATED = \
lxc/lxc_controller_dispatch.h \
$(NULL)
LXC_GENERATED = \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_MONITOR_GENERATED) \
$(LXC_CONTROLLER_GENERATED) \
$(NULL)
LXC_MONITOR_PROTOCOL = $(srcdir)/lxc/lxc_monitor_protocol.x
LXC_CONTROLLER_SOURCES = \
lxc/lxc_conf.c \
lxc/lxc_conf.h \
lxc/lxc_container.c \
lxc/lxc_container.h \
lxc/lxc_cgroup.c \
lxc/lxc_cgroup.h \
lxc/lxc_domain.c \
lxc/lxc_domain.h \
lxc/lxc_fuse.c \
lxc/lxc_fuse.h \
lxc/lxc_controller.c \
$(NULL)
DRIVER_SOURCE_FILES += \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_MONITOR_GENERATED) \
@ -43,8 +8,6 @@ STATEFUL_DRIVER_SOURCE_FILES += \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_MONITOR_GENERATED) \
$(addprefix $(srcdir)/,$(LXC_DRIVER_SOURCES))
BUILT_SOURCES += $(LXC_GENERATED)
if WITH_LXC
@ -110,52 +73,6 @@ lxc/test_virtlxcd.aug: remote/test_libvirtd.aug.in \
-e 's/[@]DAEMON_NAME_UC[@]/Virtlxcd/' \
> $@ || rm -f $@
libexec_PROGRAMS += libvirt_lxc
libvirt_lxc_SOURCES = \
$(LXC_CONTROLLER_SOURCES) \
$(DATATYPES_SOURCES) \
$(NULL)
nodist_libvirt_lxc_SOURCES = \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_CONTROLLER_GENERATED) \
$(NULL)
libvirt_lxc_LDFLAGS = \
$(AM_LDFLAGS) \
$(CAPNG_LIBS) \
$(LIBXML_LIBS) \
$(GLIB_LIBS) \
$(NULL)
libvirt_lxc_LDADD = \
libvirt.la \
$(FUSE_LIBS) \
$(GLIB_LIBS) \
$(NULL)
if WITH_DTRACE_PROBES
libvirt_lxc_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES
libvirt_lxc_LDADD += $(SECDRIVER_LIBS)
libvirt_lxc_CFLAGS = \
-I$(srcdir)/conf \
-I$(builddir)/lxc \
-I$(builddir)/rpc \
-I$(srcdir)/hypervisor \
$(AM_CFLAGS) \
$(CAPNG_CFLAGS) \
$(LIBXML_CFLAGS) \
$(GLIB_CFLAGS) \
$(LIBNL_CFLAGS) \
$(FUSE_CFLAGS) \
$(DBUS_CFLAGS) \
$(XDR_CFLAGS) \
$(NULL)
if WITH_BLKID
libvirt_lxc_CFLAGS += $(BLKID_CFLAGS)
libvirt_lxc_LDADD += $(BLKID_LIBS)
endif WITH_BLKID
libvirt_lxc_CFLAGS += $(SECDRIVER_CFLAGS)
if WITH_DTRACE_PROBES
RPC_PROBE_FILES += $(srcdir)/lxc/lxc_monitor_protocol.x
endif
@ -183,12 +100,6 @@ uninstall-data-lxc:
endif WITH_LXC
lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
$(REMOTE_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \
virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
lxc/lxc_controller_dispatch.h
.PHONY: \
install-data-lxc \
uninstall-data-lxc \

View File

@ -40,6 +40,26 @@ lxc_monitor_generated = custom_target(
capture: true,
)
lxc_controller_sources = files(
'lxc_conf.c',
'lxc_container.c',
'lxc_cgroup.c',
'lxc_domain.c',
'lxc_fuse.c',
'lxc_controller.c',
)
lxc_controller_generated = custom_target(
'lxc_controller_dispatch_h',
input: lxc_monitor_protocol,
output: 'lxc_controller_dispatch.h',
command: [
gendispatch_prog, '--mode=server',
'virLXCMonitor', 'VIR_LXC_MONITOR', '@INPUT@'
],
capture: true,
)
if conf.has('WITH_LXC')
lxc_driver_impl_lib = static_library(
'virt_driver_lxc_impl',
@ -82,4 +102,30 @@ if conf.has('WITH_LXC')
'-DMODULE_NAME="lxc"',
],
}
virt_helpers += {
'name': 'libvirt_lxc',
'sources': [
lxc_controller_sources,
lxc_monitor_protocol_generated,
lxc_controller_generated,
datatypes_sources,
dtrace_gen_objects,
],
'include': [
conf_inc_dir,
hypervisor_inc_dir,
include_directories('.'),
],
'deps': [
blkid_dep,
capng_dep,
dbus_dep,
fuse_dep,
libnl_dep,
rpc_dep,
secdriver_dep,
xdr_dep,
],
}
endif