blob: e0cd71470e0e3f524ca9b4fc29822965d2b61367 [file] [log] [blame]
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +02001system_ss.add(files(
Marc-André Lureaucdaf0722019-07-22 23:47:50 +04002 'announce.c',
3 'checksum.c',
Marc-André Lureaucdaf0722019-07-22 23:47:50 +04004 'dump.c',
5 'eth.c',
6 'filter-buffer.c',
7 'filter-mirror.c',
Marc-André Lureaucdaf0722019-07-22 23:47:50 +04008 'filter.c',
9 'hub.c',
Markus Armbruster2030ca32023-01-24 13:19:29 +010010 'net-hmp-cmds.c',
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040011 'net.c',
12 'queue.c',
13 'socket.c',
Laurent Vivier5166fe02022-10-21 11:09:11 +020014 'stream.c',
15 'dgram.c',
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040016 'util.c',
17))
18
Vladimir Sementsov-Ogievskiy6c1e3902023-05-15 16:06:38 +030019if get_option('replication').allowed() or \
20 get_option('colo_proxy').allowed()
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020021 system_ss.add(files('colo-compare.c'))
22 system_ss.add(files('colo.c'))
Paolo Bonzini857f5042024-04-08 17:53:27 +020023else
24 system_ss.add(files('colo-stubs.c'))
Vladimir Sementsov-Ogievskiy6c1e3902023-05-15 16:06:38 +030025endif
26
27if get_option('colo_proxy').allowed()
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020028 system_ss.add(files('filter-rewriter.c'))
Vladimir Sementsov-Ogievskiy6c1e3902023-05-15 16:06:38 +030029endif
30
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020031system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
Claudio Fontana9b1c9112020-10-13 21:21:23 +020032
Thomas Hutheea94532021-10-28 20:59:08 +020033if have_l2tpv3
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020034 system_ss.add(files('l2tpv3.c'))
Thomas Hutheea94532021-10-28 20:59:08 +020035endif
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020036system_ss.add(when: slirp, if_true: files('slirp.c'))
37system_ss.add(when: vde, if_true: files('vde.c'))
Paolo Bonzini837b84b2021-10-07 15:08:22 +020038if have_netmap
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020039 system_ss.add(files('netmap.c'))
Paolo Bonzini837b84b2021-10-07 15:08:22 +020040endif
Ilya Maximetscb039ef2023-09-13 20:34:37 +020041
42system_ss.add(when: libxdp, if_true: files('af-xdp.c'))
43
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020044if have_vhost_net_user
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020045 system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020046endif
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040047
Paolo Bonzinid0cda6f2023-11-03 09:17:48 +010048if host_os == 'windows'
Paolo Bonzini73258b32021-09-28 16:45:39 +020049 system_ss.add(files('tap-win32.c'))
Paolo Bonzinid0cda6f2023-11-03 09:17:48 +010050elif host_os == 'linux'
Paolo Bonzini73258b32021-09-28 16:45:39 +020051 system_ss.add(files('tap.c', 'tap-linux.c'))
Paolo Bonzinid0cda6f2023-11-03 09:17:48 +010052elif host_os in bsd_oses
Paolo Bonzini73258b32021-09-28 16:45:39 +020053 system_ss.add(files('tap.c', 'tap-bsd.c'))
Paolo Bonzinid0cda6f2023-11-03 09:17:48 +010054elif host_os == 'sunos'
Paolo Bonzini73258b32021-09-28 16:45:39 +020055 system_ss.add(files('tap.c', 'tap-solaris.c'))
56else
57 system_ss.add(files('tap.c', 'tap-stub.c'))
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040058endif
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020059if have_vhost_net_vdpa
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020060 system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020061endif
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040062
Vladislav Yaroshchuk81ad2962022-03-17 20:28:34 +030063vmnet_files = files(
64 'vmnet-common.m',
65 'vmnet-bridged.m',
66 'vmnet-host.c',
67 'vmnet-shared.c'
68)
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020069system_ss.add(when: vmnet, if_true: vmnet_files)
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040070subdir('can')