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

3 4 5
# These files are not related to driver APIs. Simply generic
# helper APIs for various purposes
UTIL_SOURCES = \
6 7
	util/glibcompat.c \
	util/glibcompat.h \
8 9 10 11
	util/viralloc.c \
	util/viralloc.h \
	util/virarch.c \
	util/virarch.h \
12 13
	util/virarptable.c \
	util/virarptable.h \
14 15 16 17 18 19 20 21 22 23
	util/viratomic.c \
	util/viratomic.h \
	util/viraudit.c \
	util/viraudit.h \
	util/virauth.c \
	util/virauth.h \
	util/virauthconfig.c \
	util/virauthconfig.h \
	util/virbitmap.c \
	util/virbitmap.h \
P
Pavel Hrdina 已提交
24 25
	util/virbpf.c \
	util/virbpf.h \
26 27 28 29 30 31
	util/virbuffer.c \
	util/virbuffer.h \
	util/virperf.c \
	util/virperf.h \
	util/vircgroup.c \
	util/vircgroup.h util/vircgrouppriv.h \
32 33
	util/vircgroupbackend.c \
	util/vircgroupbackend.h \
34 35
	util/vircgroupv1.c \
	util/vircgroupv1.h \
P
Pavel Hrdina 已提交
36 37
	util/vircgroupv2.c \
	util/vircgroupv2.h \
38 39
	util/vircgroupv2devices.c \
	util/vircgroupv2devices.h \
40 41 42 43 44 45 46 47 48 49 50 51
	util/virclosecallbacks.c \
	util/virclosecallbacks.h \
	util/vircommand.c \
	util/vircommand.h \
	util/vircommandpriv.h \
	util/virconf.c \
	util/virconf.h \
	util/vircrypto.c \
	util/vircrypto.h \
	util/virdbus.c \
	util/virdbus.h \
	util/virdbuspriv.h \
52 53
	util/virdevmapper.c \
	util/virdevmapper.h \
54 55 56 57 58
	util/virdnsmasq.c \
	util/virdnsmasq.h \
	util/virebtables.c \
	util/virebtables.h \
	util/virendian.h \
59 60
	util/virenum.h \
	util/virenum.c \
61 62
	util/virerror.c \
	util/virerror.h \
63
	util/virerrorpriv.h \
64 65 66 67 68 69 70 71 72 73 74 75 76
	util/virevent.c \
	util/virevent.h \
	util/vireventpoll.c \
	util/vireventpoll.h \
	util/virfcp.c \
	util/virfcp.h \
	util/virfdstream.c \
	util/virfdstream.h \
	util/virfile.c \
	util/virfile.h \
	util/virfirewall.c \
	util/virfirewall.h \
	util/virfirewallpriv.h \
77 78 79
	util/virfirewalld.c \
	util/virfirewalld.h \
	util/virfirewalldpriv.h \
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
	util/virfirmware.c \
	util/virfirmware.h \
	util/virgettext.c \
	util/virgettext.h \
	util/virgic.c \
	util/virgic.h \
	util/virhash.c \
	util/virhash.h \
	util/virhashcode.c \
	util/virhashcode.h \
	util/virhook.c \
	util/virhook.h \
	util/virhostcpu.c \
	util/virhostcpu.h \
	util/virhostcpupriv.h \
	util/virhostdev.c \
	util/virhostdev.h \
	util/virhostmem.c \
	util/virhostmem.h \
M
Michal Privoznik 已提交
99 100
	util/virhostuptime.c \
	util/virhostuptime.h \
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
	util/viridentity.c \
	util/viridentity.h \
	util/virinitctl.c \
	util/virinitctl.h \
	util/viriptables.c \
	util/viriptables.h \
	util/viriscsi.c \
	util/viriscsi.h \
	util/virjson.c \
	util/virjson.h \
	util/virkeycode.c \
	util/virkeycode.h \
	util/virkeyfile.c \
	util/virkeyfile.h \
	util/virlease.c \
	util/virlease.h \
	util/virlockspace.c \
	util/virlockspace.h \
	util/virlog.c \
	util/virlog.h \
	util/virmacaddr.c \
	util/virmacaddr.h \
	util/virmacmap.c \
	util/virmacmap.h \
125 126
	util/virmodule.c \
	util/virmodule.h \
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
	util/virnetdev.c \
	util/virnetdev.h \
	util/virnetdevbandwidth.c \
	util/virnetdevbandwidth.h \
	util/virnetdevbridge.c \
	util/virnetdevbridge.h \
	util/virnetdevip.c \
	util/virnetdevip.h \
	util/virnetdevmacvlan.c \
	util/virnetdevmacvlan.h \
	util/virnetdevmidonet.c \
	util/virnetdevmidonet.h \
	util/virnetdevopenvswitch.c \
	util/virnetdevopenvswitch.h \
	util/virnetdevtap.c \
	util/virnetdevtap.h \
	util/virnetdevveth.c \
	util/virnetdevveth.h \
	util/virnetdevvlan.c \
	util/virnetdevvlan.h \
	util/virnetdevvportprofile.c \
	util/virnetdevvportprofile.h \
	util/virnetlink.c \
	util/virnetlink.h \
	util/virnodesuspend.c \
	util/virnodesuspend.h \
	util/virkmod.c \
	util/virkmod.h \
	util/virnuma.c \
	util/virnuma.h \
	util/virobject.c \
	util/virobject.h \
	util/virpci.c \
	util/virpci.h \
	util/virpidfile.c \
	util/virpidfile.h \
	util/virpolkit.c \
	util/virpolkit.h \
	util/virportallocator.c \
	util/virportallocator.h \
	util/virprobe.h \
	util/virprocess.c \
	util/virprocess.h \
	util/virqemu.c \
	util/virqemu.h \
	util/virrandom.c \
	util/virrandom.h \
	util/virresctrl.c \
	util/virresctrl.h \
	util/virresctrlpriv.h \
	util/virrotatingfile.c \
	util/virrotatingfile.h \
	util/virscsi.c \
	util/virscsi.h \
	util/virscsihost.c \
	util/virscsihost.h \
	util/virscsivhost.c \
	util/virscsivhost.h \
	util/virseclabel.c \
	util/virseclabel.h \
	util/virsecret.c \
	util/virsecret.h \
	util/virsocketaddr.c \
	util/virsocketaddr.h \
	util/virstorageencryption.c \
	util/virstorageencryption.h \
	util/virstoragefile.c \
	util/virstoragefile.h \
	util/virstoragefilebackend.c \
	util/virstoragefilebackend.h \
	util/virstring.c \
	util/virstring.h \
	util/virsysinfo.c \
	util/virsysinfo.h \
	util/virsysinfopriv.h \
	util/virsystemd.c \
	util/virsystemd.h \
	util/virsystemdpriv.h \
	util/virthread.c \
	util/virthread.h \
	util/virthreadjob.c \
	util/virthreadjob.h \
	util/virthreadpool.c \
	util/virthreadpool.h \
	util/virtime.c \
	util/virtime.h \
	util/virtpm.c \
	util/virtpm.h \
215
	util/virtypedparam-public.c \
216 217 218 219 220 221 222 223 224 225 226 227
	util/virtypedparam.c \
	util/virtypedparam.h \
	util/virusb.c \
	util/virusb.h \
	util/viruri.c \
	util/viruri.h \
	util/virutil.c \
	util/virutil.h \
	util/viruuid.c \
	util/viruuid.h \
	util/virvhba.c \
	util/virvhba.h \
J
Ján Tomko 已提交
228 229
	util/virvsock.c \
	util/virvsock.h \
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
	util/virxdrdefs.h \
	util/virxml.c \
	util/virxml.h \
	util/virmdev.c \
	util/virmdev.h \
	util/virfilecache.c \
	util/virfilecache.h \
	$(NULL)


EXTRA_DIST += \
	$(srcdir)/keycodemapdb/data/keymaps.csv \
	$(srcdir)/keycodemapdb/tools/keymap-gen \
	$(NULL)


246
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 qnum
247 248 249 250 251 252 253 254 255 256 257 258 259 260
KEYNAMES = linux osx win32

KEYTABLES = \
	$(KEYCODES:%=util/virkeycodetable_%.h) \
	$(KEYNAMES:%=util/virkeynametable_%.h) \
	$(NULL)

KEYPODS = $(KEYCODES:%=util/virkeycode-%.pod) \
	  $(KEYNAMES:%=util/virkeyname-%.pod)
KEYMANS = $(KEYPODS:%.pod=%.7)

man7_MANS += $(KEYMANS)

BUILT_SOURCES += $(KEYTABLES)
261
CLEANFILES += $(KEYTABLES)
262 263 264 265 266 267 268 269 270 271
CLEANFILES += $(KEYMANS) $(KEYPODS)

UTIL_IO_HELPER_SOURCES = util/iohelper.c

noinst_LTLIBRARIES += libvirt_util.la
libvirt_la_LIBADD = $(libvirt_la_BUILT_LIBADD)
libvirt_la_BUILT_LIBADD += libvirt_util.la
libvirt_util_la_SOURCES = \
	$(UTIL_SOURCES) \
	$(NULL)
272 273 274
nodist_libvirt_util_la_SOURCES = \
	$(KEYTABLES) \
	$(NULL)
275 276
libvirt_util_la_CFLAGS = \
	$(CAPNG_CFLAGS) \
277
	$(YAJL_CFLAGS) \
278 279 280 281 282 283 284 285 286 287 288
	$(LIBNL_CFLAGS) \
	$(AM_CFLAGS) \
	$(AUDIT_CFLAGS) \
	$(DEVMAPPER_CFLAGS) \
	$(DBUS_CFLAGS) \
	$(LDEXP_LIBM) \
	$(NUMACTL_CFLAGS) \
	$(GNUTLS_CFLAGS) \
	$(ACL_CFLAGS) \
	$(NULL)
libvirt_util_la_LIBADD = \
289
	-lm \
290
	$(CAPNG_LIBS) \
291
	$(YAJL_LIBS) \
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
	$(LIBNL_LIBS) \
	$(THREAD_LIBS) \
	$(AUDIT_LIBS) \
	$(DEVMAPPER_LIBS) \
	$(LIB_CLOCK_GETTIME) \
	$(DBUS_LIBS) \
	$(WIN32_EXTRA_LIBS) \
	$(LIBXML_LIBS) \
	$(SECDRIVER_LIBS) \
	$(NUMACTL_LIBS) \
	$(ACL_LIBS) \
	$(GNUTLS_LIBS) \
	$(NULL)


util/virkeycodetable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycodetable_,,' \
					      -e 's,\.h,,'` && \
		$(MKDIR_P) util/ && \
312
		$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
313 314 315 316 317 318 319 320 321
			--lang stdc --varname virKeyCodeTable_$$NAME code-table \
			$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
		mv $@-tmp $@ || rm -f $@-tmp

util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeynametable_,,' \
					      -e 's,\.h,,'` && \
		$(MKDIR_P) util/ && \
322
		$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
323 324 325 326 327 328 329 330 331
			--lang stdc --varname virKeyNameTable_$$NAME name-table \
			$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
		mv $@-tmp $@ || rm -f $@-tmp

util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycode-,,' \
					      -e 's,\.pod,,'` && \
		$(MKDIR_P) util/ && \
332
		$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
333 334 335
		--lang pod \
		--varname "virkeycode-$$NAME - Key code values for $$NAME" \
		code-docs \
336 337 338 339 340 341 342 343
		$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
			$@-tmp && mv $@-tmp $@ || rm $@-tmp

util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeyname-,,' \
					      -e 's,\.pod,,'` && \
		$(MKDIR_P) util/ && \
344
		$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
345 346 347
		--lang pod \
		--varname "virkeyname-$$NAME - Key name values for $$NAME" \
		name-docs \
348 349 350 351 352 353 354 355 356 357 358 359
		$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
			$@-tmp && mv $@-tmp $@ || rm $@-tmp

util/virkey%.7: util/virkey%.pod
	$(AM_V_GEN)$(POD2MAN) --section=7 $< $@-t1 && \
	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
	sed \
		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
		< $@-t1 > $@-t2 && \
	rm -f $@-t1 && \
	mv $@-t2 $@