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