diff --git a/src/Makefile.am b/src/Makefile.am index 7f3144b957343c094e85662f173e4e36aca6183b..030eb762770a243de05e9224a4a5a74c637072cd 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) @@ -788,7 +789,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) \ @@ -800,7 +800,6 @@ DRIVER_SOURCE_FILES += \ $(NULL) STATEFUL_DRIVER_SOURCE_FILES += \ - $(INTERFACE_DRIVER_SOURCES) \ $(NETWORK_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NWFILTER_DRIVER_SOURCES) \ @@ -845,23 +844,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 @@ -1215,26 +1197,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 = libvirt.la -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 += ../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 = \ @@ -1577,7 +1539,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 0000000000000000000000000000000000000000..08b35d040d8c04f84975829e318590493deb28b7 --- /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 \ + $(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 +libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la +endif WITH_INTERFACE