Makefile.inc.am 3.5 KB
Newer Older
1 2
# vim: filetype=automake

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
INTERFACE_DRIVER_SOURCES = \
	interface/interface_driver.h \
	interface/interface_driver.c \
	$(NULL)

INTERFACE_DRIVER_NETCF_SOURCES = interface/interface_backend_netcf.c
INTERFACE_DRIVER_UDEV_SOURCES = interface/interface_backend_udev.c

DRIVER_SOURCE_FILES += $(INTERFACE_DRIVER_SOURCES)
STATEFUL_DRIVER_SOURCE_FILES += $(INTERFACE_DRIVER_SOURCES)

EXTRA_DIST += \
	$(INTERFACE_DRIVER_SOURCES) \
	$(INTERFACE_DRIVER_NETCF_SOURCES) \
	$(INTERFACE_DRIVER_UDEV_SOURCES) \
	$(NULL)

if WITH_INTERFACE
mod_LTLIBRARIES += libvirt_driver_interface.la
libvirt_driver_interface_la_CFLAGS = \
	-I$(srcdir)/access \
24
	-I$(builddir)/access \
25 26 27 28 29 30 31
	-I$(srcdir)/conf \
	$(AM_CFLAGS) \
	$(LIBNL_CFLAGS) \
	$(NULL)
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
libvirt_driver_interface_la_LIBADD = \
	libvirt.la \
D
Daniel P. Berrangé 已提交
32
	$(GLIB_LIBS) \
33 34 35 36 37 38 39 40 41 42 43 44 45
	$(NULL)
libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_NETCF_SOURCES)
endif WITH_NETCF
if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_UDEV_SOURCES)
endif WITH_UDEV
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
46 47 48 49 50 51 52 53 54

sbin_PROGRAMS += virtinterfaced

nodist_conf_DATA += interface/virtinterfaced.conf
augeas_DATA += interface/virtinterfaced.aug
augeastest_DATA += interface/test_virtinterfaced.aug
CLEANFILES += interface/virtinterfaced.aug

virtinterfaced_SOURCES = $(REMOTE_DAEMON_SOURCES)
55
nodist_virtinterfaced_SOURCES = $(REMOTE_DAEMON_GENERATED)
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
virtinterfaced_CFLAGS = \
       $(REMOTE_DAEMON_CFLAGS) \
       -DDAEMON_NAME="\"virtinterfaced\"" \
       -DMODULE_NAME="\"interface\"" \
       $(NULL)
virtinterfaced_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS)
virtinterfaced_LDADD = $(REMOTE_DAEMON_LD_ADD)

SYSTEMD_UNIT_FILES += \
	virtinterfaced.service \
	virtinterfaced.socket \
	virtinterfaced-ro.socket \
	virtinterfaced-admin.socket \
	$(NULL)
SYSTEMD_UNIT_FILES_IN += \
	interface/virtinterfaced.service.in \
	$(NULL)

VIRTINTERFACED_UNIT_VARS = \
	$(VIRTD_UNIT_VARS) \
	-e 's|[@]name[@]|Libvirt interface|g' \
	-e 's|[@]service[@]|virtinterfaced|g' \
	-e 's|[@]sockprefix[@]|virtinterfaced|g' \
	$(NULL)

81 82
virtinterfaced.service: interface/virtinterfaced.service.in \
		$(top_builddir)/config.status
83 84
	$(AM_V_GEN)$(SED) $(VIRTINTERFACED_UNIT_VARS) $< > $@-t && mv $@-t $@

85 86
virtinterface%.socket: remote/libvirt%.socket.in \
		$(top_builddir)/config.status
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
	$(AM_V_GEN)$(SED) $(VIRTINTERFACED_UNIT_VARS) $< > $@-t && mv $@-t $@

interface/virtinterfaced.conf: remote/libvirtd.conf.in
	$(AM_V_GEN)$(SED) \
		-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
		-e 's/[@]DAEMON_NAME[@]/virtinterfaced/' \
		$< > $@

interface/virtinterfaced.aug: remote/libvirtd.aug.in
	$(AM_V_GEN)$(SED) \
		-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
		-e 's/[@]DAEMON_NAME[@]/virtinterfaced/' \
		-e 's/[@]DAEMON_NAME_UC[@]/Virtinterfaced/' \
		$< > $@

interface/test_virtinterfaced.aug: remote/test_libvirtd.aug.in \
103
		interface/virtinterfaced.conf $(AUG_GENTEST_SCRIPT)
104 105 106 107 108 109 110 111
	$(AM_V_GEN)$(AUG_GENTEST) interface/virtinterfaced.conf \
		$(srcdir)/remote/test_libvirtd.aug.in | \
		$(SED) \
		-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
		-e 's/[@]DAEMON_NAME[@]/virtinterfaced/' \
		-e 's/[@]DAEMON_NAME_UC[@]/Virtinterfaced/' \
		> $@ || rm -f $@

112
endif WITH_INTERFACE