xref: /qemu/hw/virtio/meson.build (revision 7a0903f7ea8ac7e5b3191c9a2cfd1751b153f48c)
1be786d2fSMarc-André Lureausoftmmu_virtio_ss = ss.source_set()
2be786d2fSMarc-André Lureausoftmmu_virtio_ss.add(files('virtio-bus.c'))
3be786d2fSMarc-André Lureausoftmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
4be786d2fSMarc-André Lureausoftmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
5*7a0903f7SPhilippe Mathieu-Daudésoftmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
6*7a0903f7SPhilippe Mathieu-Daudésoftmmu_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c'))
7*7a0903f7SPhilippe Mathieu-Daudésoftmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
8*7a0903f7SPhilippe Mathieu-Daudésoftmmu_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c'))
9be786d2fSMarc-André Lureau
1074a45163SPhilippe Mathieu-Daudéspecific_virtio_ss = ss.source_set()
1174a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio.c'))
1228b629abSPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c'))
1343b6d7eeSPaolo Bonzini
1443b6d7eeSPaolo Bonziniif have_vhost
15*7a0903f7SPhilippe Mathieu-Daudé  softmmu_virtio_ss.add(files('vhost.c'))
16*7a0903f7SPhilippe Mathieu-Daudé  specific_virtio_ss.add(files('vhost-backend.c', 'vhost-iova-tree.c'))
1743b6d7eeSPaolo Bonzini  if have_vhost_user
1874a45163SPhilippe Mathieu-Daudé    specific_virtio_ss.add(files('vhost-user.c'))
1943b6d7eeSPaolo Bonzini  endif
2043b6d7eeSPaolo Bonzini  if have_vhost_vdpa
2174a45163SPhilippe Mathieu-Daudé    specific_virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c'))
2243b6d7eeSPaolo Bonzini  endif
2343b6d7eeSPaolo Bonzinielse
2443b6d7eeSPaolo Bonzini  softmmu_virtio_ss.add(files('vhost-stub.c'))
2543b6d7eeSPaolo Bonziniendif
2643b6d7eeSPaolo Bonzini
2774a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c'))
2874a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c'))
2974a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c'))
306df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c'))
316df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c'))
3274a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c'))
3374a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c'))
3474a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c'))
3574a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c'))
3674a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c'))
3774a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'], if_true: files('vhost-user-gpio-pci.c'))
38be786d2fSMarc-André Lureau
39be786d2fSMarc-André Lureauvirtio_pci_ss = ss.source_set()
40be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c'))
41be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c'))
42be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c'))
4310925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c-pci.c'))
44be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input-pci.c'))
4510925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng-pci.c'))
46be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c'))
47be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c'))
4810925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-pci.c'))
4910925d06SPaolo Bonzini
5010925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto-pci.c'))
51be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c'))
52be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c'))
53be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c'))
54be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon-pci.c'))
55be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-pci.c'))
56be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-scsi-pci.c'))
57be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk-pci.c'))
58be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net-pci.c'))
59be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-serial-pci.c'))
60be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem-pci.c'))
61be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu-pci.c'))
62be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem-pci.c'))
63fedda617SLongpengvirtio_pci_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev-pci.c'))
64be786d2fSMarc-André Lureau
6574a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
66be786d2fSMarc-André Lureau
67de6cd759SPhilippe Mathieu-Daudésystem_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
68de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
69de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
70de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
71de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_ALL', if_true: files('virtio-stub.c'))
72de6cd759SPhilippe Mathieu-Daudésystem_ss.add(files('virtio-hmp-cmds.c'))
7374a45163SPhilippe Mathieu-Daudé
7474a45163SPhilippe Mathieu-Daudéspecific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: specific_virtio_ss)
75