blob: d2d70634e5e3080d66dbd8eb7fd21917f046d884 [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'))
Vladimir Sementsov-Ogievskiy6c1e3902023-05-15 16:06:38 +030023endif
24
25if get_option('colo_proxy').allowed()
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020026 system_ss.add(files('filter-rewriter.c'))
Vladimir Sementsov-Ogievskiy6c1e3902023-05-15 16:06:38 +030027endif
28
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020029system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
Claudio Fontana9b1c9112020-10-13 21:21:23 +020030
Thomas Hutheea94532021-10-28 20:59:08 +020031if have_l2tpv3
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020032 system_ss.add(files('l2tpv3.c'))
Thomas Hutheea94532021-10-28 20:59:08 +020033endif
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020034system_ss.add(when: slirp, if_true: files('slirp.c'))
35system_ss.add(when: vde, if_true: files('vde.c'))
Paolo Bonzini837b84b2021-10-07 15:08:22 +020036if have_netmap
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020037 system_ss.add(files('netmap.c'))
Paolo Bonzini837b84b2021-10-07 15:08:22 +020038endif
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020039if have_vhost_net_user
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020040 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'))
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020042endif
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040043
Paolo Bonzini73258b32021-09-28 16:45:39 +020044if 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'))
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040054endif
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020055if have_vhost_net_vdpa
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020056 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'))
Paolo Bonzini43b6d7e2022-04-20 17:34:06 +020058endif
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040059
Vladislav Yaroshchuk81ad2962022-03-17 20:28:34 +030060vmnet_files = files(
61 'vmnet-common.m',
62 'vmnet-bridged.m',
63 'vmnet-host.c',
64 'vmnet-shared.c'
65)
Philippe Mathieu-Daudéde6cd752023-06-13 15:33:47 +020066system_ss.add(when: vmnet, if_true: vmnet_files)
Marc-André Lureaucdaf0722019-07-22 23:47:50 +040067subdir('can')