xref: /openbmc/qemu/net/meson.build (revision 5f88dd43)
1system_ss.add(files(
2  'announce.c',
3  'checksum.c',
4  'dump.c',
5  'eth.c',
6  'filter-buffer.c',
7  'filter-mirror.c',
8  'filter.c',
9  'hub.c',
10  'net-hmp-cmds.c',
11  'net.c',
12  'queue.c',
13  'socket.c',
14  'stream.c',
15  'dgram.c',
16  'util.c',
17))
18
19if get_option('replication').allowed() or \
20    get_option('colo_proxy').allowed()
21  system_ss.add(files('colo-compare.c'))
22  system_ss.add(files('colo.c'))
23endif
24
25if get_option('colo_proxy').allowed()
26  system_ss.add(files('filter-rewriter.c'))
27endif
28
29system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
30
31if have_l2tpv3
32  system_ss.add(files('l2tpv3.c'))
33endif
34system_ss.add(when: slirp, if_true: files('slirp.c'))
35system_ss.add(when: vde, if_true: files('vde.c'))
36if have_netmap
37  system_ss.add(files('netmap.c'))
38endif
39if have_vhost_net_user
40  system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
41  system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
42endif
43
44if targetos == 'windows'
45  system_ss.add(files('tap-win32.c'))
46elif targetos == 'linux'
47  system_ss.add(files('tap.c', 'tap-linux.c'))
48elif targetos in bsd_oses
49  system_ss.add(files('tap.c', 'tap-bsd.c'))
50elif targetos == 'solaris'
51  system_ss.add(files('tap.c', 'tap-solaris.c'))
52else
53  system_ss.add(files('tap.c', 'tap-stub.c'))
54endif
55if have_vhost_net_vdpa
56  system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
57  system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
58endif
59
60vmnet_files = files(
61  'vmnet-common.m',
62  'vmnet-bridged.m',
63  'vmnet-host.c',
64  'vmnet-shared.c'
65)
66system_ss.add(when: vmnet, if_true: vmnet_files)
67subdir('can')
68