File: Makefile.inc.am

package info (click to toggle)
libvirt 5.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240,844 kB
  • sloc: ansic: 584,521; xml: 176,725; sh: 9,912; python: 4,731; perl: 4,343; makefile: 3,321; ml: 465
file content (115 lines) | stat: -rw-r--r-- 3,415 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# vim: filetype=automake

NETWORK_DRIVER_SOURCES = \
	network/bridge_driver.h \
	network/bridge_driver.c \
	network/bridge_driver_platform.h \
	network/bridge_driver_platform.c \
	$(NULL)

NETWORK_DRIVER_PLATFORM_INC = \
	network/bridge_driver_linux.c \
	network/bridge_driver_nop.c \
	$(NULL)

NETWORK_LEASES_HELPER_SOURCES = \
	network/leaseshelper.c \
	$(NULL)

DRIVER_SOURCE_FILES += $(NETWORK_DRIVER_SOURCES)
STATEFUL_DRIVER_SOURCE_FILES += $(NETWORK_DRIVER_SOURCES)
EXTRA_DIST += \
	$(NETWORK_DRIVER_SOURCES) \
	$(NETWORK_DRIVER_PLATFORM_INC) \
	$(NETWORK_LEASES_HELPER_SOURCES) \
	$(NULL)


if WITH_NETWORK

noinst_LTLIBRARIES += libvirt_driver_network_impl.la
libvirt_driver_network_la_SOURCES =
libvirt_driver_network_la_LIBADD = \
	libvirt_driver_network_impl.la \
	libvirt.la \
	../gnulib/lib/libgnu.la \
	$(LIBNL_LIBS) \
	$(DBUS_LIBS) \
	$(NULL)
mod_LTLIBRARIES += libvirt_driver_network.la
libvirt_driver_network_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

libvirt_driver_network_impl_la_CFLAGS = \
	$(LIBNL_CFLAGS) \
	$(DBUS_CFLAGS) \
	-I$(srcdir)/access \
	-I$(srcdir)/conf \
	$(AM_CFLAGS) \
	$(NULL)
libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
libvirt_driver_network_impl_la_LIBADD  = $(DBUS_LIBS) $(LIBXML_LIBS)

libexec_PROGRAMS += libvirt_leaseshelper
libvirt_leaseshelper_SOURCES = $(NETWORK_LEASES_HELPER_SOURCES)
libvirt_leaseshelper_LDFLAGS = \
	$(AM_LDFLAGS) \
	$(PIE_LDFLAGS) \
	$(NULL)
libvirt_leaseshelper_LDADD = \
	libvirt.la \
	../gnulib/lib/libgnu.la
if WITH_DTRACE_PROBES
libvirt_leaseshelper_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

libvirt_leaseshelper_CFLAGS = \
	$(AM_CFLAGS) \
	$(PIE_CFLAGS) \
	$(NULL)

INSTALL_DATA_DIRS += network

UUID=$(shell uuidgen 2>/dev/null)

install-data-network:
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network"
	$(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart"
	$(INSTALL_DATA) $(srcdir)/network/default.xml \
	  $(DESTDIR)$(confdir)/qemu/networks/default.xml
	test -z "$(UUID)" || \
	  { sed -e "s,</name>,</name>;  <uuid>$(UUID)</uuid>," \
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml | \
	      tr ";" "\n" > \
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \
	    cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
	    rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
	( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \
	  rm -f default.xml )
if WITH_FIREWALLD_ZONE
	$(MKDIR_P) "$(DESTDIR)$(prefix)/lib/firewalld/zones"
	$(INSTALL_DATA) $(srcdir)/network/libvirt.zone \
	  $(DESTDIR)$(prefix)/lib/firewalld/zones/libvirt.xml
endif WITH_FIREWALLD_ZONE

uninstall-data-network:
	rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
	rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml
	rmdir "$(DESTDIR)$(confdir)/qemu/networks/autostart" || :
	rmdir "$(DESTDIR)$(confdir)/qemu/networks" || :
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||:
if WITH_FIREWALLD_ZONE
	rm -f  $(DESTDIR)$(prefix)/lib/firewalld/zones/libvirt.xml
endif WITH_FIREWALLD_ZONE

endif WITH_NETWORK

EXTRA_DIST += network/default.xml network/libvirt.zone

.PHONY: \
	install-data-network \
	uninstall-data-network \
	$(NULL)