[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 099/150] meson: convert hw/scsi
From: |
Paolo Bonzini |
Subject: |
[PATCH 099/150] meson: convert hw/scsi |
Date: |
Mon, 17 Aug 2020 16:40:02 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/Makefile.objs | 1 -
hw/meson.build | 1 +
hw/scsi/Makefile.objs | 15 ---------------
hw/scsi/meson.build | 26 ++++++++++++++++++++++++++
4 files changed, 27 insertions(+), 16 deletions(-)
delete mode 100644 hw/scsi/Makefile.objs
create mode 100644 hw/scsi/meson.build
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 6f9c0b7983..b6461c2f5e 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -24,7 +24,6 @@ devices-dirs-y += nvram/
devices-dirs-y += pci/
devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
devices-dirs-y += pcmcia/
-devices-dirs-$(CONFIG_SCSI) += scsi/
endif
common-obj-y += $(devices-dirs-y)
diff --git a/hw/meson.build b/hw/meson.build
index a73f4aebde..d4abb67715 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -2,6 +2,7 @@ subdir('core')
subdir('mem')
subdir('nubus')
subdir('rtc')
+subdir('scsi')
subdir('sd')
subdir('semihosting')
subdir('smbios')
diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
deleted file mode 100644
index 54b36ed8b1..0000000000
--- a/hw/scsi/Makefile.objs
+++ /dev/null
@@ -1,15 +0,0 @@
-common-obj-y += scsi-disk.o emulation.o
-common-obj-y += scsi-generic.o scsi-bus.o
-common-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
-common-obj-$(CONFIG_MPTSAS_SCSI_PCI) += mptsas.o mptconfig.o mptendian.o
-common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
-common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o
-common-obj-$(CONFIG_ESP) += esp.o
-common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
-obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o
-
-ifeq ($(CONFIG_VIRTIO_SCSI),y)
-obj-y += virtio-scsi.o virtio-scsi-dataplane.o
-obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-common.o vhost-scsi.o
-obj-$(CONFIG_VHOST_USER_SCSI) += vhost-scsi-common.o vhost-user-scsi.o
-endif
diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build
new file mode 100644
index 0000000000..923a34f344
--- /dev/null
+++ b/hw/scsi/meson.build
@@ -0,0 +1,26 @@
+scsi_ss = ss.source_set()
+scsi_ss.add(files(
+ 'emulation.c',
+ 'scsi-bus.c',
+ 'scsi-disk.c',
+ 'scsi-generic.c',
+))
+scsi_ss.add(when: 'CONFIG_ESP', if_true: files('esp.c'))
+scsi_ss.add(when: 'CONFIG_ESP_PCI', if_true: files('esp-pci.c'))
+scsi_ss.add(when: 'CONFIG_LSI_SCSI_PCI', if_true: files('lsi53c895a.c'))
+scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c'))
+scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c',
'mptconfig.c', 'mptendian.c'))
+scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c'))
+softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss)
+
+specific_scsi_ss = ss.source_set()
+
+virtio_scsi_ss = ss.source_set()
+virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true:
files('vhost-scsi-common.c', 'vhost-scsi.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true:
files('vhost-scsi-common.c', 'vhost-user-scsi.c'))
+specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss)
+
+specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true:
files('spapr_vscsi.c'))
+
+specific_ss.add_all(when: 'CONFIG_SCSI', if_true: specific_scsi_ss)
--
2.26.2
- [PATCH 092/150] meson: convert hw/vfio, (continued)
- [PATCH 092/150] meson: convert hw/vfio, Paolo Bonzini, 2020/08/17
- [PATCH 094/150] meson: convert hw/tpm, Paolo Bonzini, 2020/08/17
- [PATCH 093/150] meson: convert hw/usb, Paolo Bonzini, 2020/08/17
- [PATCH 095/150] meson: convert hw/timer, Paolo Bonzini, 2020/08/17
- [PATCH 096/150] meson: convert hw/rtc, Paolo Bonzini, 2020/08/17
- [PATCH 097/150] meson: convert hw/ssi, Paolo Bonzini, 2020/08/17
- [PATCH 098/150] meson: convert hw/sd, Paolo Bonzini, 2020/08/17
- [PATCH 099/150] meson: convert hw/scsi,
Paolo Bonzini <=
- [PATCH 100/150] meson: convert hw/pcmcia, Paolo Bonzini, 2020/08/17
- [PATCH 103/150] meson: convert hw/pci, Paolo Bonzini, 2020/08/17
- [PATCH 101/150] meson: convert hw/pci-host, Paolo Bonzini, 2020/08/17
- [PATCH 102/150] meson: convert hw/pci-bridge, Paolo Bonzini, 2020/08/17
- [PATCH 104/150] meson: convert hw/nvram, Paolo Bonzini, 2020/08/17
- [PATCH 105/150] meson: convert hw/rdma, Paolo Bonzini, 2020/08/17