From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlgwP-0006Yr-UC for qemu-devel@nongnu.org; Thu, 20 Dec 2012 09:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlgwJ-0003DL-HV for qemu-devel@nongnu.org; Thu, 20 Dec 2012 09:17:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlgwJ-0003DD-9d for qemu-devel@nongnu.org; Thu, 20 Dec 2012 09:17:35 -0500 Date: Thu, 20 Dec 2012 16:20:37 +0200 From: "Michael S. Tsirkin" Message-ID: <20121220142037.GA23513@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] MAkefile: dont rebuild vhost for each target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , "Michael S. Tsirkin" , Jason Baron , Blue Swirl , Paolo Bonzini , Guan Xuetao , Andreas =?iso-8859-1?Q?F=E4rber?= We rebuild vhost_net for each target, but there's no real reason to, we only have 2 variants: with and without vhost-net. Signed-off-by: Michael S. Tsirkin --- Makefile.target | 1 + hw/Makefile.objs | 5 +++-- hw/vhost_net_stub.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 hw/vhost_net_stub.c diff --git a/Makefile.target b/Makefile.target index 8bbad38..f6fddbd 100644 --- a/Makefile.target +++ b/Makefile.target @@ -103,6 +103,7 @@ endif #CONFIG_BSD_USER ######################################################### # System emulator target ifdef CONFIG_SOFTMMU +CONFIG_NO_VHOST_NET = $(if $(subst n,,$(CONFIG_VHOST_NET)),n,y) CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y) CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y) CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 2778035..360a43c 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -3,6 +3,9 @@ common-obj-y += loader.o common-obj-$(CONFIG_VIRTIO) += virtio-console.o common-obj-$(CONFIG_VIRTIO) += virtio-rng.o common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o +common-obj-$(CONFIG_VHOST_NET) += vhost_net.o +common-obj-$(CONFIG_VHOST_NET) += vhost.o +common-obj-$(CONFIG_NO_VHOST_NET) += vhost_net_stub.o common-obj-y += fw_cfg.o common-obj-$(CONFIG_PCI) += pci_bridge_dev.o common-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o @@ -192,8 +195,6 @@ common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o # need to fix this properly obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o virtio-scsi.o -obj-$(CONFIG_SOFTMMU) += vhost_net.o -obj-$(CONFIG_VHOST_NET) += vhost.o obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/ obj-$(CONFIG_VGA) += vga.o obj-$(CONFIG_SOFTMMU) += device-hotplug.o diff --git a/hw/vhost_net_stub.c b/hw/vhost_net_stub.c new file mode 100644 index 0000000..387b578 --- /dev/null +++ b/hw/vhost_net_stub.c @@ -0,0 +1 @@ +#include "vhost_net.c" -- MST