libvirt/src/lxc/Makefile.inc.am

268 lines
6.3 KiB
Makefile
Raw Normal View History

# 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_DRIVER_SOURCES = \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_MONITOR_GENERATED) \
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_hostdev.c \
lxc/lxc_hostdev.h \
lxc/lxc_monitor.c \
lxc/lxc_monitor.h \
lxc/lxc_process.c \
lxc/lxc_process.h \
lxc/lxc_fuse.c \
lxc/lxc_fuse.h \
lxc/lxc_native.c \
lxc/lxc_native.h \
lxc/lxc_driver.c \
lxc/lxc_driver.h \
$(NULL)
LXC_CONTROLLER_SOURCES = \
$(LXC_MONITOR_PROTOCOL_GENERATED) \
$(LXC_CONTROLLER_GENERATED) \
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_DRIVER_SOURCES)
STATEFUL_DRIVER_SOURCE_FILES += $(LXC_DRIVER_SOURCES)
EXTRA_DIST += \
$(LXC_DRIVER_SOURCES) \
$(LXC_MONITOR_PROTOCOL) \
$(LXC_GENERATED) \
$(LXC_CONTROLLER_SOURCES) \
$(NULL)
BUILT_SOURCES += $(LXC_GENERATED)
CLEANFILES += $(LXC_GENERATED)
if WITH_LXC
noinst_LTLIBRARIES += libvirt_driver_lxc_impl.la
libvirt_driver_lxc_la_SOURCES =
libvirt_driver_lxc_la_LIBADD = \
libvirt_driver_lxc_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) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_lxc.la
libvirt_driver_lxc_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
libvirt_driver_lxc_impl_la_CFLAGS = \
$(LIBNL_CFLAGS) \
$(FUSE_CFLAGS) \
$(XDR_CFLAGS) \
-I$(srcdir)/access \
-I$(srcdir)/conf \
$(AM_CFLAGS) \
$(NULL)
libvirt_driver_lxc_impl_la_LIBADD = \
$(CAPNG_LIBS) \
$(LIBNL_LIBS) \
$(LIBXML_LIBS) \
$(FUSE_LIBS) \
$(NULL)
if WITH_BLKID
libvirt_driver_lxc_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_lxc_impl_la_LIBADD += $(BLKID_LIBS)
endif WITH_BLKID
libvirt_driver_lxc_impl_la_LIBADD += $(SECDRIVER_LIBS)
libvirt_driver_lxc_impl_la_SOURCES = $(LXC_DRIVER_SOURCES)
sbin_PROGRAMS += virtlxcd
nodist_conf_DATA += lxc/virtlxcd.conf
augeas_DATA += lxc/virtlxcd.aug
augeastest_DATA += lxc/test_virtlxcd.aug
CLEANFILES += lxc/virtlxcd.aug
virtlxcd_SOURCES = $(REMOTE_DAEMON_SOURCES)
virtlxcd_CFLAGS = \
$(REMOTE_DAEMON_CFLAGS) \
-DDAEMON_NAME="\"virtlxcd\"" \
-DMODULE_NAME="\"lxc\"" \
$(NULL)
virtlxcd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS)
virtlxcd_LDADD = $(REMOTE_DAEMON_LD_ADD)
SYSTEMD_UNIT_FILES += \
virtlxcd.service \
virtlxcd.socket \
virtlxcd-ro.socket \
virtlxcd-admin.socket \
$(NULL)
SYSTEMD_UNIT_FILES_IN += \
lxc/virtlxcd.service.in \
$(NULL)
VIRTLXCD_UNIT_VARS = \
$(VIRTD_UNIT_VARS) \
-e 's|[@]name[@]|Libvirt lxc|g' \
-e 's|[@]service[@]|virtlxcd|g' \
-e 's|[@]sockprefix[@]|virtlxcd|g' \
$(NULL)
virtlxcd.service: lxc/virtlxcd.service.in $(top_builddir)/config.status
$(AM_V_GEN)$(SED) $(VIRTLXCD_UNIT_VARS) $< > $@-t && mv $@-t $@
virtlxc%.socket: remote/libvirt%.socket.in $(top_builddir)/config.status
$(AM_V_GEN)$(SED) $(VIRTLXCD_UNIT_VARS) $< > $@-t && mv $@-t $@
lxc/virtlxcd.conf: remote/libvirtd.conf.in
$(AM_V_GEN)$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
-e 's/[@]DAEMON_NAME[@]/virtlxcd/' \
$< > $@
lxc/virtlxcd.aug: remote/libvirtd.aug.in
$(AM_V_GEN)$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
-e 's/[@]DAEMON_NAME[@]/virtlxcd/' \
-e 's/[@]DAEMON_NAME_UC[@]/Virtlxcd/' \
$< > $@
lxc/test_virtlxcd.aug: remote/test_libvirtd.aug.in \
lxc/virtlxcd.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) lxc/virtlxcd.conf \
$(srcdir)/remote/test_libvirtd.aug.in | \
$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
-e 's/[@]DAEMON_NAME[@]/virtlxcd/' \
-e 's/[@]DAEMON_NAME_UC[@]/Virtlxcd/' \
> $@ || rm -f $@
libexec_PROGRAMS += libvirt_lxc
libvirt_lxc_SOURCES = \
$(LXC_CONTROLLER_SOURCES) \
$(DATATYPES_SOURCES) \
$(NULL)
libvirt_lxc_LDFLAGS = \
$(AM_LDFLAGS) \
$(PIE_LDFLAGS) \
$(CAPNG_LIBS) \
$(LIBXML_LIBS) \
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) \
$(NULL)
libvirt_lxc_LDADD = \
libvirt.la \
$(FUSE_LIBS) \
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) \
../gnulib/lib/libgnu.la \
$(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 \
$(AM_CFLAGS) \
$(PIE_CFLAGS) \
$(CAPNG_CFLAGS) \
$(LIBXML_CFLAGS) \
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_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
conf_DATA += lxc/lxc.conf
augeas_DATA += lxc/libvirtd_lxc.aug
augeastest_DATA += lxc/test_libvirtd_lxc.aug
lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
$(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< > $@
INSTALL_DATA_DIRS += lxc
install-data-lxc:
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
$(MKDIR_P) "$(DESTDIR)$(runstatedir)/libvirt/lxc"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/lxc"
uninstall-data-lxc:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||:
rmdir "$(DESTDIR)$(runstatedir)/libvirt/lxc" ||:
rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" ||:
endif WITH_LXC
lxc/lxc_monitor_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
$(LXC_MONITOR_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
$(srcdir)/lxc/lxc_monitor_dispatch.h
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) > \
$(srcdir)/lxc/lxc_controller_dispatch.h
.PHONY: \
install-data-lxc \
uninstall-data-lxc \
$(NULL)
EXTRA_DIST += \
lxc/lxc.conf \
lxc/libvirtd_lxc.aug \
lxc/test_libvirtd_lxc.aug.in \
$(NULL)