qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 20/24] move per-target hw/ objects to nested Makefil


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 20/24] move per-target hw/ objects to nested Makefiles
Date: Sun, 3 Jun 2012 14:25:54 +0200

This completes the move to nested Makefiles 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 <address@hidden>
---
 Makefile.hw      |    5 +++--
 Makefile.target  |   22 +---------------------
 configure        |    1 +
 hw/9pfs/Makefile |    2 ++
 hw/Makefile      |   17 +++++++++++++++++
 5 files changed, 24 insertions(+), 23 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 e4bc550..1770901 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -123,17 +123,9 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 
 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
 
@@ -146,18 +138,6 @@ QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
 obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.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 6d0a935..22063f2 100755
--- a/configure
+++ b/configure
@@ -3656,6 +3656,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 b/hw/9pfs/Makefile
index 2700772..972df24 100644
--- a/hw/9pfs/Makefile
+++ b/hw/9pfs/Makefile
@@ -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 b/hw/Makefile
index 43dc824..5ad8554 100644
--- a/hw/Makefile
+++ b/hw/Makefile
@@ -143,3 +143,20 @@ 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-y += 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-y += device-hotplug.o
+
+# Inter-VM PCI shared memory
+ifeq ($(CONFIG_PCI), y)
+obj-$(CONFIG_KVM) += ivshmem.o
+endif
-- 
1.7.10.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]