ppc/spapr: H_ENTER_NESTED should restore host XER ca field
[qemu/ar7.git] / block / meson.build
blob529fc172c61e678e976065bfba42d4e8ca22dc6e
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   'graph-lock.c',
14   'commit.c',
15   'copy-on-read.c',
16   'preallocate.c',
17   'progress_meter.c',
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   'plug.c',
27   'qapi.c',
28   'qcow2-bitmap.c',
29   'qcow2-cache.c',
30   'qcow2-cluster.c',
31   'qcow2-refcount.c',
32   'qcow2-snapshot.c',
33   'qcow2-threads.c',
34   'qcow2.c',
35   'quorum.c',
36   'raw-format.c',
37   'reqlist.c',
38   'snapshot.c',
39   'snapshot-access.c',
40   'throttle-groups.c',
41   'throttle.c',
42   'write-threshold.c',
43 ), zstd, zlib, gnutls)
45 system_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
46 system_ss.add(files('block-ram-registrar.c'))
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
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
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
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])
94 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
95 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
96 if get_option('replication').allowed()
97   block_ss.add(files('replication.c'))
98 endif
99 block_ss.add(when: libaio, if_true: files('linux-aio.c'))
100 block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
102 block_modules = {}
104 modsrc = []
105 foreach m : [
106   [blkio, 'blkio', files('blkio.c')],
107   [curl, 'curl', files('curl.c')],
108   [glusterfs, 'gluster', files('gluster.c')],
109   [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
110   [libnfs, 'nfs', files('nfs.c')],
111   [libssh, 'ssh', files('ssh.c')],
112   [rbd, 'rbd', files('rbd.c')],
114   if m[0].found()
115     module_ss = ss.source_set()
116     module_ss.add(when: m[0], if_true: m[2])
117     if enable_modules
118       modsrc += module_ss.all_sources()
119     endif
120     block_modules += {m[1] : module_ss}
121   endif
122 endforeach
124 # those are not exactly regular block modules, so treat them apart
125 if get_option('dmg').allowed()
126   foreach m : [
127     [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
128     [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
129   ]
130     if m[0].found()
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
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)
145 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
146 block_gen_c = custom_target('block-gen.c',
147                             output: 'block-gen.c',
148                             input: files(
149                                       '../include/block/block-io.h',
150                                       '../include/block/dirty-bitmap.h',
151                                       '../include/block/block_int-io.h',
152                                       '../include/block/block-global-state.h',
153                                       '../include/sysemu/block-backend-global-state.h',
154                                       '../include/sysemu/block-backend-io.h',
155                                       'coroutines.h'
156                                       ),
157                             command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
158 block_ss.add(block_gen_c)
160 block_ss.add(files('stream.c'))
162 system_ss.add(files('qapi-sysemu.c'))
164 subdir('export')
165 subdir('monitor')
167 modules += {'block': block_modules}