]> Git Repo - qemu.git/blame - block/meson.build
Do not include hw/boards.h if it's not really necessary
[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',
7 'backup-top.c',
8 'blkdebug.c',
9 'blklogwrites.c',
5e5733e5
MAL
10 'blkverify.c',
11 'block-backend.c',
12 'block-copy.c',
13 'commit.c',
14 'copy-on-read.c',
33fa2222 15 'preallocate.c',
5e5733e5
MAL
16 'create.c',
17 'crypto.c',
18 'dirty-bitmap.c',
19 'filter-compress.c',
20 'io.c',
21 'mirror.c',
22 'nbd.c',
23 'null.c',
24 'qapi.c',
25 'qcow2-bitmap.c',
26 'qcow2-cache.c',
27 'qcow2-cluster.c',
28 'qcow2-refcount.c',
29 'qcow2-snapshot.c',
30 'qcow2-threads.c',
31 'qcow2.c',
32 'quorum.c',
33 'raw-format.c',
34 'snapshot.c',
35 'throttle-groups.c',
36 'throttle.c',
37 'vhdx-endian.c',
38 'vhdx-log.c',
39 'vhdx.c',
40 'vmdk.c',
41 'vpc.c',
42 'write-threshold.c',
3eacf70b 43), zstd, zlib, gnutls)
5e5733e5 44
9b1c9116
CF
45softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
46
a10c8516 47block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
5e5733e5
MAL
48block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
49block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
50block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
51block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
52block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
53block_ss.add(when: 'CONFIG_QED', if_true: files(
54 'qed-check.c',
55 'qed-cluster.c',
56 'qed-l2-cache.c',
57 'qed-table.c',
58 'qed.c',
59))
baefd977
VSO
60block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
61 if_true: files('parallels.c', 'parallels-ext.c'))
5e5733e5
MAL
62block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
63block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
9db405a3 64block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
5e5733e5
MAL
65block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
66block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
67block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c'))
68block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
69block_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true: files('io_uring.c'))
70
71block_modules = {}
72
73modsrc = []
74foreach m : [
2f2a376a
PB
75 [curl, 'curl', [curl, glib], 'curl.c'],
76 [glusterfs, 'gluster', glusterfs, 'gluster.c'],
77 [libiscsi, 'iscsi', libiscsi, 'iscsi.c'],
78 [libnfs, 'nfs', libnfs, 'nfs.c'],
79 [libssh, 'ssh', libssh, 'ssh.c'],
80 [rbd, 'rbd', rbd, 'rbd.c'],
5e5733e5 81]
2f2a376a 82 if m[0].found()
5e5733e5
MAL
83 if enable_modules
84 modsrc += files(m[3])
85 endif
86 module_ss = ss.source_set()
87 module_ss.add(when: m[2], if_true: files(m[3]))
88 block_modules += {m[1] : module_ss}
89 endif
90endforeach
91
92# those are not exactly regular block modules, so treat them apart
93if 'CONFIG_DMG' in config_host
94 foreach m : [
2f2a376a
PB
95 [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
96 [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
5e5733e5 97 ]
2f2a376a 98 if m[0].found()
5e5733e5
MAL
99 module_ss = ss.source_set()
100 module_ss.add(when: m[2], if_true: files(m[3]))
101 block_modules += {m[1] : module_ss}
102 endif
103 endforeach
104endif
105
106module_block_py = find_program('../scripts/modules/module_block.py')
107module_block_h = custom_target('module_block.h',
108 output: 'module_block.h',
109 input: modsrc,
110 command: [module_block_py, '@OUTPUT0@', modsrc])
111block_ss.add(module_block_h)
112
aaaa20b6
VSO
113wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
114block_gen_c = custom_target('block-gen.c',
115 output: 'block-gen.c',
116 input: files('../include/block/block.h',
117 'coroutines.h'),
118 command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
119block_ss.add(block_gen_c)
120
5e5733e5
MAL
121block_ss.add(files('stream.c'))
122
123softmmu_ss.add(files('qapi-sysemu.c'))
56ee8626
KW
124
125subdir('export')
5e5733e5
MAL
126subdir('monitor')
127
128modules += {'block': block_modules}
This page took 0.103141 seconds and 4 git commands to generate.