From 684388d902e4ad64768cb1f7cb7c56e9369d1408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 21 Feb 2018 18:05:56 +0000 Subject: [PATCH] make: split nwfilter driver build rules into nwfilter/Makefile.inc.am MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 40 +--------------------------------- src/nwfilter/Makefile.inc.am | 42 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 39 deletions(-) create mode 100644 src/nwfilter/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index ec4713d283..59f7ea8484 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -100,6 +100,7 @@ include vz/Makefile.inc.am include lxc/Makefile.inc.am include interface/Makefile.inc.am include network/Makefile.inc.am +include nwfilter/Makefile.inc.am THREAD_LIBS = $(LIB_PTHREAD) $(LTLIBMULTITHREAD) @@ -790,7 +791,6 @@ DRIVER_SOURCE_FILES += \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_HAL_SOURCES) \ $(NODE_DEVICE_DRIVER_UDEV_SOURCES) \ - $(NWFILTER_DRIVER_SOURCES) \ $(REMOTE_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ @@ -798,7 +798,6 @@ DRIVER_SOURCE_FILES += \ STATEFUL_DRIVER_SOURCE_FILES += \ $(NODE_DEVICE_DRIVER_SOURCES) \ - $(NWFILTER_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ $(NULL) @@ -891,19 +890,6 @@ STORAGE_HELPER_DISK_SOURCES = \ UTIL_IO_HELPER_SOURCES = \ util/iohelper.c -# Network filters -NWFILTER_DRIVER_SOURCES = \ - nwfilter/nwfilter_driver.h nwfilter/nwfilter_driver.c \ - nwfilter/nwfilter_tech_driver.h \ - nwfilter/nwfilter_gentech_driver.c \ - nwfilter/nwfilter_gentech_driver.h \ - nwfilter/nwfilter_dhcpsnoop.c \ - nwfilter/nwfilter_dhcpsnoop.h \ - nwfilter/nwfilter_ebiptables_driver.c \ - nwfilter/nwfilter_ebiptables_driver.h \ - nwfilter/nwfilter_learnipaddr.c \ - nwfilter/nwfilter_learnipaddr.h - # Security framework and drivers for various models SECURITY_DRIVER_SOURCES = \ @@ -1369,29 +1355,6 @@ libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la endif WITH_NODE_DEVICES -if WITH_NWFILTER -noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la -libvirt_driver_nwfilter_la_SOURCES = -libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la -mod_LTLIBRARIES += libvirt_driver_nwfilter.la -libvirt_driver_nwfilter_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF) -libvirt_driver_nwfilter_impl_la_CFLAGS = \ - $(LIBPCAP_CFLAGS) \ - $(LIBNL_CFLAGS) \ - $(DBUS_CFLAGS) \ - -I$(srcdir)/access \ - -I$(srcdir)/conf \ - $(AM_CFLAGS) -libvirt_driver_nwfilter_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_nwfilter_impl_la_LIBADD = \ - libvirt.la \ - $(LIBPCAP_LIBS) \ - $(LIBNL_LIBS) \ - $(DBUS_LIBS) -libvirt_driver_nwfilter_impl_la_LIBADD += ../gnulib/lib/libgnu.la -libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES) -endif WITH_NWFILTER - libvirt_security_manager_la_SOURCES = $(SECURITY_DRIVER_SOURCES) noinst_LTLIBRARIES += libvirt_security_manager.la @@ -1519,7 +1482,6 @@ EXTRA_DIST += \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_HAL_SOURCES) \ $(NODE_DEVICE_DRIVER_UDEV_SOURCES) \ - $(NWFILTER_DRIVER_SOURCES) \ $(SECURITY_DRIVER_SELINUX_SOURCES) \ $(SECURITY_DRIVER_APPARMOR_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am new file mode 100644 index 0000000000..27aa801095 --- /dev/null +++ b/src/nwfilter/Makefile.inc.am @@ -0,0 +1,42 @@ +NWFILTER_DRIVER_SOURCES = \ + nwfilter/nwfilter_driver.h \ + nwfilter/nwfilter_driver.c \ + nwfilter/nwfilter_tech_driver.h \ + nwfilter/nwfilter_gentech_driver.c \ + nwfilter/nwfilter_gentech_driver.h \ + nwfilter/nwfilter_dhcpsnoop.c \ + nwfilter/nwfilter_dhcpsnoop.h \ + nwfilter/nwfilter_ebiptables_driver.c \ + nwfilter/nwfilter_ebiptables_driver.h \ + nwfilter/nwfilter_learnipaddr.c \ + nwfilter/nwfilter_learnipaddr.h \ + $(NULL) + +DRIVER_SOURCE_FILES += $(NWFILTER_DRIVER_SOURCES) +STATEFUL_DRIVER_SOURCE_FILES += $(NWFILTER_DRIVER_SOURCES) +EXTRA_DIST += $(NWFILTER_DRIVER_SOURCES) + +if WITH_NWFILTER +noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la +libvirt_driver_nwfilter_la_SOURCES = +libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la +mod_LTLIBRARIES += libvirt_driver_nwfilter.la +libvirt_driver_nwfilter_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF) +libvirt_driver_nwfilter_impl_la_CFLAGS = \ + $(LIBPCAP_CFLAGS) \ + $(LIBNL_CFLAGS) \ + $(DBUS_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + $(AM_CFLAGS) \ + $(NULL) +libvirt_driver_nwfilter_impl_la_LDFLAGS = $(AM_LDFLAGS) +libvirt_driver_nwfilter_impl_la_LIBADD = \ + libvirt.la \ + $(LIBPCAP_LIBS) \ + $(LIBNL_LIBS) \ + $(DBUS_LIBS) \ + ../gnulib/lib/libgnu.la \ + $(NULL) +libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES) +endif WITH_NWFILTER -- GitLab