]> git.proxmox.com Git - mirror_qemu.git/blobdiff - net/meson.build
vdpa net: fix error message setting virtio status
[mirror_qemu.git] / net / meson.build
index 6f4ecde57feb7377366e7db16335a1f2c1112ebf..ce99bd4447f484e8842d7a5c47403217343dd0b5 100644 (file)
@@ -1,4 +1,4 @@
-softmmu_ss.add(files(
+system_ss.add(files(
   'announce.c',
   'checksum.c',
   'dump.c',
@@ -18,41 +18,46 @@ softmmu_ss.add(files(
 
 if get_option('replication').allowed() or \
     get_option('colo_proxy').allowed()
-  softmmu_ss.add(files('colo-compare.c'))
-  softmmu_ss.add(files('colo.c'))
+  system_ss.add(files('colo-compare.c'))
+  system_ss.add(files('colo.c'))
 endif
 
 if get_option('colo_proxy').allowed()
-  softmmu_ss.add(files('filter-rewriter.c'))
+  system_ss.add(files('filter-rewriter.c'))
 endif
 
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
+system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
 
 if have_l2tpv3
-  softmmu_ss.add(files('l2tpv3.c'))
+  system_ss.add(files('l2tpv3.c'))
 endif
-softmmu_ss.add(when: slirp, if_true: files('slirp.c'))
-softmmu_ss.add(when: vde, if_true: files('vde.c'))
+system_ss.add(when: slirp, if_true: files('slirp.c'))
+system_ss.add(when: vde, if_true: files('vde.c'))
 if have_netmap
-  softmmu_ss.add(files('netmap.c'))
+  system_ss.add(files('netmap.c'))
 endif
+
+system_ss.add(when: libxdp, if_true: files('af-xdp.c'))
+
 if have_vhost_net_user
-  softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
-  softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
+  system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
+  system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
 endif
 
-softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
-softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
-softmmu_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
-tap_posix = ['tap.c']
-if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS')
-  tap_posix += 'tap-stub.c'
+if targetos == 'windows'
+  system_ss.add(files('tap-win32.c'))
+elif targetos == 'linux'
+  system_ss.add(files('tap.c', 'tap-linux.c'))
+elif targetos in bsd_oses
+  system_ss.add(files('tap.c', 'tap-bsd.c'))
+elif targetos == 'sunos'
+  system_ss.add(files('tap.c', 'tap-solaris.c'))
+else
+  system_ss.add(files('tap.c', 'tap-stub.c'))
 endif
-softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
-softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
 if have_vhost_net_vdpa
-  softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
-  softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
+  system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
+  system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
 endif
 
 vmnet_files = files(
@@ -61,5 +66,5 @@ vmnet_files = files(
   'vmnet-host.c',
   'vmnet-shared.c'
 )
-softmmu_ss.add(when: vmnet, if_true: vmnet_files)
+system_ss.add(when: vmnet, if_true: vmnet_files)
 subdir('can')