mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 13:53:45 +08:00
meson: convert net directory to Meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5516623020
commit
cdaf07228c
@ -39,8 +39,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
|
||||
# single QEMU executable should support all CPUs and machines.
|
||||
|
||||
ifeq ($(CONFIG_SOFTMMU),y)
|
||||
common-obj-y = net/
|
||||
common-obj-$(CONFIG_LINUX) += fsdev/
|
||||
common-obj-$(CONFIG_LINUX) = fsdev/
|
||||
|
||||
common-obj-y += accel/
|
||||
|
||||
|
@ -168,6 +168,7 @@ LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS)
|
||||
endif
|
||||
LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
|
||||
LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
|
||||
LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
|
||||
|
||||
# Hardware support
|
||||
ifeq ($(TARGET_NAME), sparc64)
|
||||
|
10
meson.build
10
meson.build
@ -149,6 +149,15 @@ if 'CONFIG_XKBCOMMON' in config_host
|
||||
xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
|
||||
link_args: config_host['XKBCOMMON_LIBS'].split())
|
||||
endif
|
||||
slirp = not_found
|
||||
if config_host.has_key('CONFIG_SLIRP')
|
||||
slirp = declare_dependency(compile_args: config_host['SLIRP_CFLAGS'].split(),
|
||||
link_args: config_host['SLIRP_LIBS'].split())
|
||||
endif
|
||||
vde = not_found
|
||||
if config_host.has_key('CONFIG_VDE')
|
||||
vde = declare_dependency(link_args: config_host['VDE_LIBS'].split())
|
||||
endif
|
||||
pulse = not_found
|
||||
if 'CONFIG_LIBPULSE' in config_host
|
||||
pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
|
||||
@ -661,6 +670,7 @@ common_ss.add(files('cpus-common.c'))
|
||||
subdir('softmmu')
|
||||
subdir('migration')
|
||||
subdir('monitor')
|
||||
subdir('net')
|
||||
subdir('replay')
|
||||
|
||||
# needed for fuzzing binaries
|
||||
|
@ -1,32 +0,0 @@
|
||||
common-obj-y = net.o queue.o checksum.o util.o hub.o
|
||||
common-obj-y += socket.o
|
||||
common-obj-y += dump.o
|
||||
common-obj-y += eth.o
|
||||
common-obj-y += announce.o
|
||||
common-obj-$(CONFIG_L2TPV3) += l2tpv3.o
|
||||
common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET_USER)) += vhost-user.o
|
||||
common-obj-$(call land,$(call lnot,$(CONFIG_VIRTIO_NET)),$(CONFIG_VHOST_NET_USER)) += vhost-user-stub.o
|
||||
common-obj-$(CONFIG_ALL) += vhost-user-stub.o
|
||||
common-obj-$(CONFIG_SLIRP) += slirp.o
|
||||
slirp.o-cflags := $(SLIRP_CFLAGS)
|
||||
slirp.o-libs := $(SLIRP_LIBS)
|
||||
common-obj-$(CONFIG_VDE) += vde.o
|
||||
common-obj-$(CONFIG_NETMAP) += netmap.o
|
||||
common-obj-y += filter.o
|
||||
common-obj-y += filter-buffer.o
|
||||
common-obj-y += filter-mirror.o
|
||||
common-obj-y += colo-compare.o
|
||||
common-obj-y += colo.o
|
||||
common-obj-y += filter-rewriter.o
|
||||
common-obj-y += filter-replay.o
|
||||
|
||||
tap-obj-$(CONFIG_LINUX) = tap-linux.o
|
||||
tap-obj-$(CONFIG_BSD) = tap-bsd.o
|
||||
tap-obj-$(CONFIG_SOLARIS) = tap-solaris.o
|
||||
tap-obj-y ?= tap-stub.o
|
||||
common-obj-$(CONFIG_POSIX) += tap.o $(tap-obj-y)
|
||||
common-obj-$(CONFIG_WIN32) += tap-win32.o
|
||||
common-obj-$(CONFIG_VHOST_NET_VDPA) += vhost-vdpa.o
|
||||
vde.o-libs = $(VDE_LIBS)
|
||||
|
||||
common-obj-$(CONFIG_CAN_BUS) += can/
|
@ -1,2 +0,0 @@
|
||||
common-obj-y += can_core.o can_host.o
|
||||
common-obj-$(CONFIG_LINUX) += can_socketcan.o
|
5
net/can/meson.build
Normal file
5
net/can/meson.build
Normal file
@ -0,0 +1,5 @@
|
||||
can_ss = ss.source_set()
|
||||
can_ss.add(files('can_core.c', 'can_host.c'))
|
||||
can_ss.add(when: 'CONFIG_LINUX', if_true: files('can_socketcan.c'))
|
||||
|
||||
softmmu_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss)
|
40
net/meson.build
Normal file
40
net/meson.build
Normal file
@ -0,0 +1,40 @@
|
||||
softmmu_ss.add(files(
|
||||
'announce.c',
|
||||
'checksum.c',
|
||||
'colo-compare.c',
|
||||
'colo.c',
|
||||
'dump.c',
|
||||
'eth.c',
|
||||
'filter-buffer.c',
|
||||
'filter-mirror.c',
|
||||
'filter-replay.c',
|
||||
'filter-rewriter.c',
|
||||
'filter.c',
|
||||
'hub.c',
|
||||
'net.c',
|
||||
'queue.c',
|
||||
'socket.c',
|
||||
'util.c',
|
||||
))
|
||||
|
||||
softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c'))
|
||||
softmmu_ss.add(when: ['CONFIG_SLIRP', slirp], if_true: files('slirp.c'))
|
||||
softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c'))
|
||||
softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c'))
|
||||
vhost_user_ss = ss.source_set()
|
||||
vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
|
||||
softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss)
|
||||
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
|
||||
|
||||
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'
|
||||
endif
|
||||
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
|
||||
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
|
||||
softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c'))
|
||||
|
||||
subdir('can')
|
Loading…
Reference in New Issue
Block a user