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