[PATCH 01/17] make: split interface driver build rules into interface/Makefile.inc.am

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/Makefile.am               | 41 +----------------------------------------
 src/interface/Makefile.inc.am | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 40 deletions(-)
 create mode 100644 src/interface/Makefile.inc.am

diff --git a/src/Makefile.am b/src/Makefile.am
index 8d72f2f1e5..e50f6eecb3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,6 +98,7 @@ include xen/Makefile.inc.am
 include xenapi/Makefile.inc.am
 include vz/Makefile.inc.am
 include lxc/Makefile.inc.am
+include interface/Makefile.inc.am
 
 
 THREAD_LIBS = $(LIB_PTHREAD) $(LTLIBMULTITHREAD)
@@ -781,7 +782,6 @@ check-drivername:
 EXTRA_DIST += check-drivername.pl
 
 DRIVER_SOURCE_FILES += \
-	$(INTERFACE_DRIVER_SOURCES) \
 	$(NETWORK_DRIVER_SOURCES) \
 	$(NODE_DEVICE_DRIVER_SOURCES) \
 	$(NODE_DEVICE_DRIVER_HAL_SOURCES) \
@@ -793,7 +793,6 @@ DRIVER_SOURCE_FILES += \
 	$(NULL)
 
 STATEFUL_DRIVER_SOURCE_FILES += \
-	$(INTERFACE_DRIVER_SOURCES) \
 	$(NETWORK_DRIVER_SOURCES) \
 	$(NODE_DEVICE_DRIVER_SOURCES) \
 	$(NWFILTER_DRIVER_SOURCES) \
@@ -838,23 +837,6 @@ NETWORK_DRIVER_SOURCES = \
 		$(NULL)
 EXTRA_DIST += network/bridge_driver_linux.c network/bridge_driver_nop.c
 
-INTERFACE_DRIVER_SOURCES =
-
-if WITH_INTERFACE
-INTERFACE_DRIVER_SOURCES += \
-		interface/interface_driver.h \
-		interface/interface_driver.c
-
-if WITH_NETCF
-INTERFACE_DRIVER_SOURCES += \
-		interface/interface_backend_netcf.c
-endif WITH_NETCF
-if WITH_UDEV
-INTERFACE_DRIVER_SOURCES += \
-		interface/interface_backend_udev.c
-endif WITH_UDEV
-endif WITH_INTERFACE
-
 SECRET_UTIL_SOURCES = \
 		secret/secret_util.h secret/secret_util.c
 
@@ -1208,26 +1190,6 @@ endif WITH_NETWORK
 EXTRA_DIST += network/default.xml
 
 
-if WITH_INTERFACE
-mod_LTLIBRARIES += libvirt_driver_interface.la
-libvirt_driver_interface_la_CFLAGS = \
-		-I$(srcdir)/access \
-		-I$(srcdir)/conf \
-		$(AM_CFLAGS) $(LIBNL_CFLAGS)
-libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
-libvirt_driver_interface_la_LIBADD =
-if WITH_NETCF
-libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
-libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
-endif WITH_NETCF
-if WITH_UDEV
-libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
-libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
-endif WITH_UDEV
-libvirt_driver_interface_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
-libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
-endif WITH_INTERFACE
-
 if WITH_SECRETS
 mod_LTLIBRARIES += libvirt_driver_secret.la
 libvirt_driver_secret_la_CFLAGS = \
@@ -1569,7 +1531,6 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \
 EXTRA_DIST += \
 		$(REMOTE_DRIVER_SOURCES) \
 		$(NETWORK_DRIVER_SOURCES) \
-		$(INTERFACE_DRIVER_SOURCES) \
 		$(STORAGE_DRIVER_SOURCES) \
 		$(STORAGE_DRIVER_FS_SOURCES) \
 		$(STORAGE_DRIVER_LVM_SOURCES) \
diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am
new file mode 100644
index 0000000000..27fbfe1e1a
--- /dev/null
+++ b/src/interface/Makefile.inc.am
@@ -0,0 +1,42 @@
+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 \
+	-I$(srcdir)/conf \
+	$(AM_CFLAGS) \
+	$(LIBNL_CFLAGS) \
+	$(NULL)
+libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
+libvirt_driver_interface_la_LIBADD = \
+	libvirt.la \
+	../gnulib/lib/libgnu.la \
+	$(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
+endif WITH_INTERFACE
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux