Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/meson.build | 1 + src/nwfilter/Makefile.inc.am | 37 +++--------------------------------- src/nwfilter/meson.build | 26 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 34 deletions(-) create mode 100644 src/nwfilter/meson.build diff --git a/src/meson.build b/src/meson.build index 12dea398679..66af0e3051c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -145,6 +145,7 @@ subdir('locking') subdir('logging') subdir('network') subdir('node_device') +subdir('nwfilter') subdir('security') subdir('bhyve') diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index 758370e1a74..ba07992027c 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -2,20 +2,6 @@ NWFILTER_XML_FILES = $(wildcard $(srcdir)/nwfilter/xml/*.xml) -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 += $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES)) @@ -25,29 +11,12 @@ if WITH_NWFILTER nwfilterxmldir = $(sysconfdir)/libvirt/nwfilter nwfilterxml_DATA = $(NWFILTER_XML_FILES) -noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la libvirt_driver_nwfilter_la_SOURCES = -libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la +libvirt_driver_nwfilter_la_LIBADD = \ + libvirt_driver_nwfilter_impl.la \ + libvirt.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$(builddir)/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) \ - $(GLIB_LIBS) \ - $(NULL) -libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES) sbin_PROGRAMS += virtnwfilterd diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build new file mode 100644 index 00000000000..fe792058b94 --- /dev/null +++ b/src/nwfilter/meson.build @@ -0,0 +1,26 @@ +nwfilter_driver_sources = [ + 'nwfilter_driver.c', + 'nwfilter_gentech_driver.c', + 'nwfilter_dhcpsnoop.c', + 'nwfilter_ebiptables_driver.c', + 'nwfilter_learnipaddr.c', +] + +if conf.has('WITH_NWFILTER') + nwfilter_driver_impl = static_library( + 'virt_driver_nwfilter_impl', + [ + nwfilter_driver_sources, + ], + dependencies: [ + access_dep, + dbus_dep, + libnl_dep, + libpcap_dep, + src_dep, + ], + include_directories: [ + conf_inc_dir, + ], + ) +endif -- 2.26.2