]> git.proxmox.com Git - mirror_qemu.git/blame - hw/usb/meson.build
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into...
[mirror_qemu.git] / hw / usb / meson.build
CommitLineData
06677ce1
PB
1hw_usb_modules = {}
2
3# usb subsystem core
9c3c834b 4softmmu_ss.add(when: 'CONFIG_USB', if_true: files(
06677ce1
PB
5 'bus.c',
6 'combined-packet.c',
7 'core.c',
06677ce1
PB
8 'desc.c',
9 'desc-msos.c',
9c3c834b
PMD
10 'libhw.c',
11 'pcap.c',
06677ce1
PB
12))
13
14# usb host adapters
15softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c'))
16softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c'))
17softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c'))
18softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c'))
19softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c'))
20softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c'))
21softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c'))
755fba11 22softmmu_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c'))
f00ff136 23softmmu_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c'))
06677ce1
PB
24softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c'))
25softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c'))
26softmmu_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c'))
8bbe61f3 27softmmu_ss.add(when: 'CONFIG_USB_DWC3', if_true: files('hcd-dwc3.c'))
06677ce1
PB
28
29softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
30softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
31softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
6f2bcd5f 32softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686-uhci-pci.c'))
a48f6929
TH
33softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
34softmmu_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
06677ce1
PB
35
36# emulated usb devices
37softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c'))
38softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c'))
39softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))
f98c9bd4 40softmmu_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c'))
31b7bed8 41softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c'))
f98c9bd4 42softmmu_ss.add(when: 'CONFIG_USB_STORAGE_CLASSIC', if_true: files('dev-storage-classic.c'))
06677ce1
PB
43softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c'))
44softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c'))
45softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c'))
46softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c'))
47softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c'))
48
49# smartcard
50softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c'))
51
5f364c57 52if cacard.found()
06677ce1
PB
53 usbsmartcard_ss = ss.source_set()
54 usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
55 if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')])
56 hw_usb_modules += {'smartcard': usbsmartcard_ss}
57endif
58
0a40bcb7
CB
59# U2F
60softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
d7c1523f 61softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')])
0a40bcb7
CB
62if u2f.found()
63 softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')])
64endif
65
8caef850
HZZ
66# CanoKey
67if canokey.found()
68 softmmu_ss.add(when: 'CONFIG_USB_CANOKEY', if_true: [canokey, files('canokey.c')])
69endif
70
06677ce1 71# usb redirect
18f31e60 72if usbredir.found()
06677ce1
PB
73 usbredir_ss = ss.source_set()
74 usbredir_ss.add(when: 'CONFIG_USB',
75 if_true: [usbredir, files('redirect.c', 'quirks.c')])
76 hw_usb_modules += {'redirect': usbredir_ss}
77endif
78
79# usb pass-through
670b3591 80if libusb.found()
627302af
GH
81 usbhost_ss = ss.source_set()
82 usbhost_ss.add(when: ['CONFIG_USB', libusb],
83 if_true: files('host-libusb.c'))
84 hw_usb_modules += {'host': usbhost_ss}
85endif
06677ce1 86
4ca8cf09 87softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN_BUS', libusb], if_true: files('xen-usb.c'))
06677ce1
PB
88
89modules += { 'hw-usb': hw_usb_modules }