2019-04-12 12:41:10 +00:00
|
|
|
# vim: filetype=automake
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
VZ_DRIVER_SOURCES = \
|
|
|
|
vz/vz_driver.h \
|
|
|
|
vz/vz_driver.c \
|
|
|
|
vz/vz_utils.c \
|
|
|
|
vz/vz_utils.h \
|
|
|
|
vz/vz_sdk.h \
|
|
|
|
vz/vz_sdk.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
2019-11-11 12:41:34 +00:00
|
|
|
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(VZ_DRIVER_SOURCES))
|
2019-11-11 05:37:33 +00:00
|
|
|
STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(VZ_DRIVER_SOURCES))
|
2018-02-21 18:05:56 +00:00
|
|
|
EXTRA_DIST += $(VZ_DRIVER_SOURCES)
|
|
|
|
|
|
|
|
|
|
|
|
if WITH_VZ
|
|
|
|
noinst_LTLIBRARIES += libvirt_driver_vz_impl.la
|
|
|
|
libvirt_driver_vz_la_SOURCES =
|
|
|
|
libvirt_driver_vz_la_LIBADD = \
|
|
|
|
libvirt_driver_vz_impl.la \
|
|
|
|
libvirt.la \
|
build: link to glib library
Add the main glib.h to internal.h so that all common code can use it.
Historically glib allowed applications to register an alternative
memory allocator, so mixing g_malloc/g_free with malloc/free was not
safe.
This was feature was dropped in 2.46.0 with:
commit 3be6ed60aa58095691bd697344765e715a327fc1
Author: Alexander Larsson <alexl@redhat.com>
Date: Sat Jun 27 18:38:42 2015 +0200
Deprecate and drop support for memory vtables
Applications are still encourged to match g_malloc/g_free, but it is no
longer a mandatory requirement for correctness, just stylistic. This is
explicitly clarified in
commit 1f24b36607bf708f037396014b2cdbc08d67b275
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Thu Sep 5 14:37:54 2019 +0100
gmem: clarify that g_malloc always uses the system allocator
Applications can still use custom allocators in general, but they must
do this by linking to a library that replaces the core malloc/free
implemenentation entirely, instead of via a glib specific call.
This means that libvirt does not need to be concerned about use of
g_malloc/g_free causing an ABI change in the public libary, and can
avoid memory copying when talking to external libraries.
This patch probes for glib, which provides the foundation layer with
a collection of data structures, helper APIs, and platform portability
logic.
Later patches will introduce linkage to gobject which provides the
object type system, built on glib, and gio which providing objects
for various interesting tasks, most notably including DBus client
and server support and portable sockets APIs, but much more too.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-08-29 15:12:24 +00:00
|
|
|
$(GLIB_LIBS) \
|
2018-02-21 18:05:56 +00:00
|
|
|
../gnulib/lib/libgnu.la \
|
|
|
|
$(NULL)
|
|
|
|
mod_LTLIBRARIES += libvirt_driver_vz.la
|
|
|
|
libvirt_driver_vz_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
|
|
|
|
libvirt_driver_vz_impl_la_CFLAGS = \
|
|
|
|
-I$(srcdir)/conf \
|
|
|
|
-I$(srcdir)/access \
|
2019-11-08 20:11:24 +00:00
|
|
|
-I$(builddir)/access \
|
2018-02-21 18:05:56 +00:00
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(PARALLELS_SDK_CFLAGS) \
|
|
|
|
$(LIBNL_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
libvirt_driver_vz_impl_la_SOURCES = $(VZ_DRIVER_SOURCES)
|
|
|
|
libvirt_driver_vz_impl_la_LIBADD = \
|
|
|
|
$(PARALLELS_SDK_LIBS) \
|
|
|
|
$(LIBNL_LIBS) \
|
|
|
|
$(NULL)
|
2018-03-16 17:05:24 +00:00
|
|
|
|
|
|
|
sbin_PROGRAMS += virtvzd
|
|
|
|
|
|
|
|
nodist_conf_DATA += vz/virtvzd.conf
|
|
|
|
augeas_DATA += vz/virtvzd.aug
|
|
|
|
augeastest_DATA += vz/test_virtvzd.aug
|
|
|
|
CLEANFILES += vz/virtvzd.aug
|
|
|
|
|
|
|
|
virtvzd_SOURCES = $(REMOTE_DAEMON_SOURCES)
|
2019-10-23 12:24:37 +00:00
|
|
|
nodist_virtvzd_SOURCES = $(REMOTE_DAEMON_GENERATED)
|
2018-03-16 17:05:24 +00:00
|
|
|
virtvzd_CFLAGS = \
|
|
|
|
$(REMOTE_DAEMON_CFLAGS) \
|
|
|
|
-DDAEMON_NAME="\"virtvzd\"" \
|
|
|
|
-DMODULE_NAME="\"vz\"" \
|
|
|
|
$(NULL)
|
|
|
|
virtvzd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS)
|
|
|
|
virtvzd_LDADD = $(REMOTE_DAEMON_LD_ADD)
|
|
|
|
|
|
|
|
SYSTEMD_UNIT_FILES += \
|
|
|
|
virtvzd.service \
|
|
|
|
virtvzd.socket \
|
|
|
|
virtvzd-ro.socket \
|
|
|
|
virtvzd-admin.socket \
|
|
|
|
$(NULL)
|
|
|
|
SYSTEMD_UNIT_FILES_IN += \
|
|
|
|
vz/virtvzd.service.in \
|
|
|
|
$(NULL)
|
|
|
|
|
2019-10-31 17:59:19 +00:00
|
|
|
OPENRC_INIT_FILES += \
|
|
|
|
virtvzd.init \
|
|
|
|
$(NULL)
|
|
|
|
OPENRC_INIT_FILES_IN += \
|
|
|
|
vz/virtvzd.init.in \
|
|
|
|
$(NULL)
|
|
|
|
|
2018-03-16 17:05:24 +00:00
|
|
|
VIRTVZD_UNIT_VARS = \
|
|
|
|
$(VIRTD_UNIT_VARS) \
|
|
|
|
-e 's|[@]name[@]|Libvirt vz|g' \
|
|
|
|
-e 's|[@]service[@]|virtvzd|g' \
|
|
|
|
-e 's|[@]sockprefix[@]|virtvzd|g' \
|
|
|
|
$(NULL)
|
|
|
|
|
2019-10-31 17:59:19 +00:00
|
|
|
virtvzd.init: vz/virtvzd.init.in $(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
|
|
|
|
|
2018-03-16 17:05:24 +00:00
|
|
|
virtvzd.service: vz/virtvzd.service.in $(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN)$(SED) $(VIRTVZD_UNIT_VARS) $< > $@-t && mv $@-t $@
|
|
|
|
|
|
|
|
virtvz%.socket: remote/libvirt%.socket.in $(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN)$(SED) $(VIRTVZD_UNIT_VARS) $< > $@-t && mv $@-t $@
|
|
|
|
|
|
|
|
vz/virtvzd.conf: remote/libvirtd.conf.in
|
|
|
|
$(AM_V_GEN)$(SED) \
|
|
|
|
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
|
|
|
|
-e 's/[@]DAEMON_NAME[@]/virtvzd/' \
|
|
|
|
$< > $@
|
|
|
|
|
|
|
|
vz/virtvzd.aug: remote/libvirtd.aug.in
|
|
|
|
$(AM_V_GEN)$(SED) \
|
|
|
|
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
|
|
|
|
-e 's/[@]DAEMON_NAME[@]/virtvzd/' \
|
|
|
|
-e 's/[@]DAEMON_NAME_UC[@]/Virtvzd/' \
|
|
|
|
$< > $@
|
|
|
|
|
|
|
|
vz/test_virtvzd.aug: remote/test_libvirtd.aug.in \
|
2019-09-27 13:17:54 +00:00
|
|
|
vz/virtvzd.conf $(AUG_GENTEST_SCRIPT)
|
2018-03-16 17:05:24 +00:00
|
|
|
$(AM_V_GEN)$(AUG_GENTEST) vz/virtvzd.conf \
|
|
|
|
$(srcdir)/remote/test_libvirtd.aug.in | \
|
|
|
|
$(SED) \
|
|
|
|
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
|
|
|
|
-e 's/[@]DAEMON_NAME[@]/virtvzd/' \
|
|
|
|
-e 's/[@]DAEMON_NAME_UC[@]/Virtvzd/' \
|
|
|
|
> $@ || rm -f $@
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
endif WITH_VZ
|