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