From 7633d844367fd341be1ee0a5af785ccdd4ad55d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 16 Aug 2019 17:16:48 +0400 Subject: [PATCH] meson: convert hw/scsi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- 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)