]> git.proxmox.com Git - mirror_qemu.git/blob - block/meson.build
Merge remote-tracking branch 'remotes/kraxel/tags/seabios-20220307-pull-request'...
[mirror_qemu.git] / block / meson.build
1 block_ss.add(genh)
2 block_ss.add(files(
3 'accounting.c',
4 'aio_task.c',
5 'amend.c',
6 'backup.c',
7 'copy-before-write.c',
8 'blkdebug.c',
9 'blklogwrites.c',
10 'blkverify.c',
11 'block-backend.c',
12 'block-copy.c',
13 'commit.c',
14 'copy-on-read.c',
15 'preallocate.c',
16 'progress_meter.c',
17 'create.c',
18 'crypto.c',
19 'dirty-bitmap.c',
20 'filter-compress.c',
21 'io.c',
22 'mirror.c',
23 'nbd.c',
24 'null.c',
25 'qapi.c',
26 'qcow2-bitmap.c',
27 'qcow2-cache.c',
28 'qcow2-cluster.c',
29 'qcow2-refcount.c',
30 'qcow2-snapshot.c',
31 'qcow2-threads.c',
32 'qcow2.c',
33 'quorum.c',
34 'raw-format.c',
35 'reqlist.c',
36 'snapshot.c',
37 'snapshot-access.c',
38 'throttle-groups.c',
39 'throttle.c',
40 'vhdx-endian.c',
41 'vhdx-log.c',
42 'vhdx.c',
43 'vmdk.c',
44 'vpc.c',
45 'write-threshold.c',
46 ), zstd, zlib, gnutls)
47
48 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
49
50 if get_option('qcow1').allowed()
51 block_ss.add(files('qcow.c'))
52 endif
53 if get_option('vdi').allowed()
54 block_ss.add(files('vdi.c'))
55 endif
56 if get_option('cloop').allowed()
57 block_ss.add(files('cloop.c'))
58 endif
59 if get_option('bochs').allowed()
60 block_ss.add(files('bochs.c'))
61 endif
62 if get_option('vvfat').allowed()
63 block_ss.add(files('vvfat.c'))
64 endif
65 if get_option('dmg').allowed()
66 block_ss.add(files('dmg.c'))
67 endif
68 if get_option('qed').allowed()
69 block_ss.add(files(
70 'qed-check.c',
71 'qed-cluster.c',
72 'qed-l2-cache.c',
73 'qed-table.c',
74 'qed.c',
75 ))
76 endif
77 if get_option('parallels').allowed()
78 block_ss.add(files('parallels.c', 'parallels-ext.c'))
79 endif
80
81 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
82 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
83 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
84 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
85 if not get_option('replication').disabled()
86 block_ss.add(files('replication.c'))
87 endif
88 block_ss.add(when: libaio, if_true: files('linux-aio.c'))
89 block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
90
91 block_modules = {}
92
93 modsrc = []
94 foreach m : [
95 [curl, 'curl', files('curl.c')],
96 [glusterfs, 'gluster', files('gluster.c')],
97 [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
98 [libnfs, 'nfs', files('nfs.c')],
99 [libssh, 'ssh', files('ssh.c')],
100 [rbd, 'rbd', files('rbd.c')],
101 ]
102 if m[0].found()
103 module_ss = ss.source_set()
104 module_ss.add(when: m[0], if_true: m[2])
105 if enable_modules
106 modsrc += module_ss.all_sources()
107 endif
108 block_modules += {m[1] : module_ss}
109 endif
110 endforeach
111
112 # those are not exactly regular block modules, so treat them apart
113 if get_option('dmg').allowed()
114 foreach m : [
115 [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
116 [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
117 ]
118 if m[0].found()
119 module_ss = ss.source_set()
120 module_ss.add(when: m[2], if_true: files(m[3]))
121 block_modules += {m[1] : module_ss}
122 endif
123 endforeach
124 endif
125
126 module_block_py = find_program('../scripts/modules/module_block.py')
127 module_block_h = custom_target('module_block.h',
128 output: 'module_block.h',
129 input: modsrc,
130 command: [module_block_py, '@OUTPUT0@', modsrc])
131 block_ss.add(module_block_h)
132
133 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
134 block_gen_c = custom_target('block-gen.c',
135 output: 'block-gen.c',
136 input: files(
137 '../include/block/block-io.h',
138 '../include/block/block-global-state.h',
139 'coroutines.h'
140 ),
141 command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
142 block_ss.add(block_gen_c)
143
144 block_ss.add(files('stream.c'))
145
146 softmmu_ss.add(files('qapi-sysemu.c'))
147
148 subdir('export')
149 subdir('monitor')
150
151 modules += {'block': block_modules}