]>
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', | |
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 | 49 | softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c')) |
7f9241d8 | 50 | softmmu_ss.add(files('block-ram-registrar.c')) |
9b1c9116 | 51 | |
ed793c2c PB |
52 | if get_option('qcow1').allowed() |
53 | block_ss.add(files('qcow.c')) | |
54 | endif | |
55 | if get_option('vdi').allowed() | |
56 | block_ss.add(files('vdi.c')) | |
57 | endif | |
58 | if get_option('cloop').allowed() | |
59 | block_ss.add(files('cloop.c')) | |
60 | endif | |
61 | if get_option('bochs').allowed() | |
62 | block_ss.add(files('bochs.c')) | |
63 | endif | |
64 | if get_option('vvfat').allowed() | |
65 | block_ss.add(files('vvfat.c')) | |
66 | endif | |
67 | if get_option('dmg').allowed() | |
68 | block_ss.add(files('dmg.c')) | |
69 | endif | |
70 | if 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 | )) | |
78 | endif | |
79 | if get_option('parallels').allowed() | |
80 | block_ss.add(files('parallels.c', 'parallels-ext.c')) | |
81 | endif | |
82 | ||
5e5733e5 MAL |
83 | block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c')) |
84 | block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit]) | |
9db405a3 | 85 | block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) |
5e5733e5 | 86 | block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) |
406523f6 PB |
87 | if not get_option('replication').disabled() |
88 | block_ss.add(files('replication.c')) | |
89 | endif | |
ff66f3e5 | 90 | block_ss.add(when: libaio, if_true: files('linux-aio.c')) |
63a7f853 | 91 | block_ss.add(when: linux_io_uring, if_true: files('io_uring.c')) |
5e5733e5 MAL |
92 | |
93 | block_modules = {} | |
94 | ||
95 | modsrc = [] | |
96 | foreach 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 | |
113 | endforeach | |
114 | ||
115 | # those are not exactly regular block modules, so treat them apart | |
ed793c2c | 116 | if 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 | |
127 | endif | |
128 | ||
129 | module_block_py = find_program('../scripts/modules/module_block.py') | |
130 | module_block_h = custom_target('module_block.h', | |
131 | output: 'module_block.h', | |
132 | input: modsrc, | |
133 | command: [module_block_py, '@OUTPUT0@', modsrc]) | |
134 | block_ss.add(module_block_h) | |
135 | ||
aaaa20b6 VSO |
136 | wrapper_py = find_program('../scripts/block-coroutine-wrapper.py') |
137 | block_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', |
3b491a90 | 142 | '../include/block/block-global-state.h', |
facbaad9 | 143 | '../include/sysemu/block-backend-io.h', |
3b491a90 EGE |
144 | 'coroutines.h' |
145 | ), | |
aaaa20b6 VSO |
146 | command: [wrapper_py, '@OUTPUT@', '@INPUT@']) |
147 | block_ss.add(block_gen_c) | |
148 | ||
5e5733e5 MAL |
149 | block_ss.add(files('stream.c')) |
150 | ||
151 | softmmu_ss.add(files('qapi-sysemu.c')) | |
56ee8626 KW |
152 | |
153 | subdir('export') | |
5e5733e5 MAL |
154 | subdir('monitor') |
155 | ||
156 | modules += {'block': block_modules} |