From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH v2 20/25] build: move per-target hw/ objects to nested Makefile.objs
Date: Wed, 6 Jun 2012 08:36:27 +0200 [thread overview]
Message-ID: <1338964592-22223-21-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1338964592-22223-1-git-send-email-pbonzini@redhat.com>
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 <pbonzini@redhat.com>
---
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
--
1.7.10.1
next prev parent reply other threads:[~2012-06-06 6:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 6:36 [Qemu-devel] [PATCH v2 00/25] per-directory Makefile.objs snippets, limit vpath (ab)use Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 01/25] build: remove trace-nested-y Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 02/25] build: do not sprinkle around GENERATED_HEADERS dependencies Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 03/25] build: add rules for nesting Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 04/25] build: move *-user/ objects to nested Makefile.objs Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 05/25] build: move obj-TARGET-y variables " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 06/25] build: move libobj-y variable " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 07/25] build: move other target-*/ objects " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 08/25] build: move rules for nesting to Makefile.objs Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 09/25] build: put qom/ rules in a Makefile.objs file Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 10/25] build: move block/ objects to nested Makefile.objs Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 11/25] build: move net/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 12/25] build: move fsdev/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 13/25] build: move ui/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 14/25] build: move audio/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 15/25] build: move slirp/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 16/25] build: move qapi/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 17/25] build: move qga/ " Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 18/25] build: move target-independent hw/ objects to nested Makefiles Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 19/25] build: convert libhw to nested Makefile.objs Paolo Bonzini
2012-06-06 6:36 ` Paolo Bonzini [this message]
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 21/25] build: move device tree to per-target Makefile Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 22/25] build: libcacard Makefile cleanups Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 23/25] build: limit usage of vpath Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 24/25] build: compile oslib-obj-y once Paolo Bonzini
2012-06-06 6:36 ` [Qemu-devel] [PATCH v2 25/25] build: do not create directories at configure time Paolo Bonzini
2012-06-06 8:58 ` Anthony Liguori
2012-06-06 11:54 ` Paolo Bonzini
2012-06-06 12:03 ` Peter Maydell
2012-06-06 12:16 ` Paolo Bonzini
2012-06-07 3:15 ` Anthony Liguori
2012-06-07 3:21 ` Eric Blake
2012-06-07 3:16 ` Anthony Liguori
2012-06-07 5:26 ` Paolo Bonzini
2012-06-07 5:28 ` Anthony Liguori
2012-06-06 9:23 ` [Qemu-devel] [PATCH v2 00/25] per-directory Makefile.objs snippets, limit vpath (ab)use Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338964592-22223-21-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).