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

3 4 5 6 7 8 9 10 11
LOG_PROTOCOL_GENERATED = \
	logging/log_protocol.h \
	logging/log_protocol.c \
	$(NULL)

LOG_DAEMON_GENERATED = \
	logging/log_daemon_dispatch_stubs.h
	$(NULL)

12
LOG_DRIVER_SOURCES = \
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
	logging/log_manager.c \
	logging/log_manager.h \
	$(NULL)

LOG_DAEMON_SOURCES = \
	logging/log_daemon.h \
	logging/log_daemon.c \
	logging/log_daemon_config.h \
	logging/log_daemon_config.c \
	logging/log_daemon_dispatch.c \
	logging/log_daemon_dispatch.h \
	logging/log_handler.c \
	logging/log_handler.h \
	$(NULL)

LOG_PROTOCOL = $(srcdir)/logging/log_protocol.x

EXTRA_DIST += \
	$(LOG_PROTOCOL) \
	$(LOG_DAEMON_SOURCES) \
33
	$(LOG_DRIVER) \
34 35 36 37 38 39 40 41
        logging/virtlogd.aug \
        logging/virtlogd.conf \
        logging/test_virtlogd.aug.in \
	$(NULL)
BUILT_SOURCES += \
	$(LOG_PROTOCOL_GENERATED) \
	$(LOG_DAEMON_GENERATED) \
	$(NULL)
42
CLEANFILES += \
43 44 45 46 47 48
	$(LOG_PROTOCOL_GENERATED) \
	$(LOG_DAEMON_GENERATED) \
	$(NULL)

SYSCONF_FILES += logging/virtlogd.sysconf

49
VIRTLOGD_UNIT_FILES_IN = \
50 51 52 53 54
	logging/virtlogd.service.in \
	logging/virtlogd.socket.in \
	logging/virtlogd-admin.socket.in \
	$(NULL)

55 56 57
SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOGD_UNIT_FILES_IN:%.in=%))
SYSTEMD_UNIT_FILES_IN += $(VIRTLOGD_UNIT_FILES_IN)

58 59 60 61 62 63
noinst_LTLIBRARIES += libvirt_driver_log.la

libvirt_la_BUILT_LIBADD += libvirt_driver_log.la
libvirt_driver_log_la_SOURCES = \
	$(LOG_DRIVER_SOURCES) \
	$(NULL)
64 65 66
nodist_libvirt_driver_log_la_SOURCES = \
	$(LOG_PROTOCOL_GENERATED) \
	$(NULL)
67
libvirt_driver_log_la_CFLAGS = \
68 69
	-I$(builddir)/logging \
	-I$(builddir)/rpc \
70 71 72 73
	$(AM_CFLAGS) \
	$(XDR_CFLAGS) \
	$(NULL)

74 75 76 77 78 79
if WITH_LIBVIRTD
sbin_PROGRAMS += virtlogd


virtlogd_SOURCES = \
		$(LOG_DAEMON_SOURCES) \
80 81
		$(NULL)
nodist_virtlogd_SOURCES = \
82 83 84 85
		$(LOG_PROTOCOL_GENERATED) \
		$(LOG_DAEMON_GENERATED) \
		$(NULL)
virtlogd_CFLAGS = \
86 87
		-I$(builddir)/logging \
		-I$(builddir)/rpc \
88 89 90 91 92 93 94 95 96 97 98
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(XDR_CFLAGS) \
		$(NULL)
virtlogd_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NO_UNDEFINED_LDFLAGS) \
		$(NULL)
virtlogd_LDADD = \
		libvirt_driver_admin.la \
99
		libvirt.la \
D
Daniel P. Berrangé 已提交
100
		$(GLIB_LIBS) \
101 102 103 104 105 106 107
		../gnulib/lib/libgnu.la \
		$(CYGWIN_EXTRA_LIBADD) \
		$(NULL)
if WITH_DTRACE_PROBES
virtlogd_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

108 109 110 111 112 113
if WITH_SASL
virtlogd_CFLAGS += \
	$(SASL_CFLAGS) \
	$(NULL)
endif WITH_SASL

114 115 116
conf_DATA += logging/virtlogd.conf

augeas_DATA += logging/virtlogd.aug
117
augeastest_DATA += logging/test_virtlogd.aug
118

119
logging/test_virtlogd.aug: logging/test_virtlogd.aug.in \
120
		logging/virtlogd.conf $(AUG_GENTEST_SCRIPT)
121
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/logging/virtlogd.conf $< > $@
122 123 124 125 126 127 128

endif WITH_LIBVIRTD

logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \
		$(srcdir)/rpc/gendispatch.pl Makefile.am
	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
	    virLogManagerProtocol VIR_LOG_MANAGER_PROTOCOL \
129
	    $(LOG_PROTOCOL) > logging/log_daemon_dispatch_stubs.h
130 131

virtlogd.service: logging/virtlogd.service.in $(top_builddir)/config.status
132
	$(AM_V_GEN)sed $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
133 134

virtlogd.socket: logging/virtlogd.socket.in $(top_builddir)/config.status
135
	$(AM_V_GEN)sed $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
136 137 138

virtlogd-admin.socket: logging/virtlogd-admin.socket.in \
                       $(top_builddir)/config.status
139
	$(AM_V_GEN)sed $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@