From patchwork Wed Jun 6 06:36:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 163280 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 00F7EB6F9A for ; Wed, 6 Jun 2012 17:35:23 +1000 (EST) Received: from localhost ([::1]:37815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScAm1-0001Wt-Nt for incoming@patchwork.ozlabs.org; Wed, 06 Jun 2012 03:35:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc9sB-0003zF-KC for qemu-devel@nongnu.org; Wed, 06 Jun 2012 02:37:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc9s3-0002IQ-Ur for qemu-devel@nongnu.org; Wed, 06 Jun 2012 02:37:38 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:50333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc9s3-000290-Lh for qemu-devel@nongnu.org; Wed, 06 Jun 2012 02:37:31 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so9244268pbb.4 for ; Tue, 05 Jun 2012 23:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=PfzB0Sru0Z4o74wsXe889NHqPkSGbo9aCiItvlMZ8TU=; b=JPexqGwL+vI11oL23TVY64bZEi74yB8eG0St/hn6oFgUgh98IbvAtXjsGijXdY/De8 LNhlwZphuLOYtrURTiAUHrSPBdYgHZR8fvxQT8H3nKtujrPcICC4J3x/tflIvG8xjSFB hjT6gmQXlDlz8xVQCz3qXBiMoOAV71uVhQYOPI2xkMGw72FXxfEVFX3x9WbGxMd1gxxP HraMzfm/uzFs5sgJdMIsFBtOAWxMqC9Y13FkaSMkFMyg0yG+OdX/zVX3/rPaK+Mml6yh 2t4YaZdylTSKg7+FIeLXNdi/RtPdttLkf3Dq4B9tkrD3UXPKjAqFi7hYFpgrHV4uIlIK jz6w== Received: by 10.68.226.73 with SMTP id rq9mr54874691pbc.145.1338964650628; Tue, 05 Jun 2012 23:37:30 -0700 (PDT) Received: from yakj.usersys.redhat.com.usersys.redhat.com (p40081-ipngn402hodogaya.kanagawa.ocn.ne.jp. [180.23.161.81]) by mx.google.com with ESMTPS id py5sm1479093pbb.1.2012.06.05.23.37.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 23:37:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 6 Jun 2012 08:36:27 +0200 Message-Id: <1338964592-22223-21-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.10.1 In-Reply-To: <1338964592-22223-1-git-send-email-pbonzini@redhat.com> References: <1338964592-22223-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH v2 20/25] build: move per-target hw/ objects to nested Makefile.objs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This completes the move to nested Makefile.objs for virtio and a few other files that were not part of obj-TARGET-y, but still were compiled separately for each target. Signed-off-by: Paolo Bonzini --- Makefile.hw | 5 +++-- Makefile.target | 31 +++++-------------------------- configure | 1 + hw/9pfs/Makefile.objs | 2 ++ hw/Makefile.objs | 18 ++++++++++++++++++ 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Makefile.hw b/Makefile.hw index 155a0c3..2bcbaff 100644 --- a/Makefile.hw +++ b/Makefile.hw @@ -19,7 +19,8 @@ all: $(hw-obj-y) @true clean: - rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ */*/*.d + rm -f $(addsuffix /*.o, $(dir $(sort $(hw-obj-y)))) + rm -f $(addsuffix /*.d, $(dir $(sort $(hw-obj-y)))) # Include automatically generated dependency files --include $(wildcard *.d */*.d */*/*.d) +-include $(patsubst %.o, %.d, $(hw-obj-y)) diff --git a/Makefile.target b/Makefile.target index 006f1cd..be09865 100644 --- a/Makefile.target +++ b/Makefile.target @@ -1,9 +1,5 @@ # -*- Mode: makefile -*- -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) - include ../config-host.mak include config-devices.mak include config-target.mak @@ -120,19 +116,14 @@ endif #CONFIG_BSD_USER ######################################################### # System emulator target ifdef CONFIG_SOFTMMU +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) obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o -# virtio has to be here due to weird dependency between PCI and virtio-net. -# need to fix this properly -obj-$(CONFIG_NO_PCI) += pci-stub.o -obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o -obj-$(CONFIG_VIRTIO) += virtio-scsi.o -obj-y += vhost_net.o -obj-$(CONFIG_VHOST_NET) += vhost.o -obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o +obj-y += hw/ obj-$(CONFIG_KVM) += kvm-all.o obj-$(CONFIG_NO_KVM) += kvm-stub.o -obj-$(CONFIG_VGA) += vga.o obj-y += memory.o savevm.o cputlb.o LIBS+=-lz @@ -142,21 +133,9 @@ QEMU_CFLAGS += $(VNC_JPEG_CFLAGS) QEMU_CFLAGS += $(VNC_PNG_CFLAGS) # xen support -obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o +obj-$(CONFIG_XEN) += xen-all.o xen-mapcache.o obj-$(CONFIG_NO_XEN) += xen-stub.o -# Inter-VM PCI shared memory -CONFIG_IVSHMEM = -ifeq ($(CONFIG_KVM), y) - ifeq ($(CONFIG_PCI), y) - CONFIG_IVSHMEM = y - endif -endif -obj-$(CONFIG_IVSHMEM) += ivshmem.o - -# Generic hotplugging -obj-y += device-hotplug.o - # Hardware support ifeq ($(TARGET_ARCH), sparc64) obj-y += hw/sparc64/ diff --git a/configure b/configure index b9637dc..d90255a 100755 --- a/configure +++ b/configure @@ -3675,6 +3675,7 @@ mkdir -p $target_dir/9pfs mkdir -p $target_dir/hw mkdir -p $target_dir/hw/ide mkdir -p $target_dir/hw/usb +mkdir -p $target_dir/hw/9pfs mkdir -p $target_dir/hw/kvm mkdir -p $target_dir/hw/$TARGET_ARCH mkdir -p $target_dir/hw/$TARGET_BASE_ARCH diff --git a/hw/9pfs/Makefile.objs b/hw/9pfs/Makefile.objs index 2700772..972df24 100644 --- a/hw/9pfs/Makefile.objs +++ b/hw/9pfs/Makefile.objs @@ -5,3 +5,5 @@ hw-obj-y += virtio-9p-coth.o cofs.o codir.o cofile.o hw-obj-y += coxattr.o virtio-9p-synth.o hw-obj-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o hw-obj-y += virtio-9p-proxy.o + +obj-y += virtio-9p-device.o diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 08dde63..7e17504 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -145,3 +145,21 @@ common-obj-$(CONFIG_BRLAPI) += baum.o # xen backend driver support common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o + +# Per-target files +# virtio has to be here due to weird dependency between PCI and virtio-net. +# 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_NO_PCI) += pci-stub.o +obj-$(CONFIG_VGA) += vga.o +obj-$(CONFIG_SOFTMMU) += device-hotplug.o +obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o + +# Inter-VM PCI shared memory +ifeq ($(CONFIG_PCI), y) +obj-$(CONFIG_KVM) += ivshmem.o +endif