[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 078/147] meson: convert backends directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 078/147] meson: convert backends directory to Meson |
Date: |
Mon, 10 Aug 2020 19:07:56 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile.objs | 2 --
backends/Makefile.objs | 23 -----------------------
backends/meson.build | 19 +++++++++++++++++++
backends/tpm/Makefile.objs | 4 ----
backends/tpm/meson.build | 8 ++++++++
configure | 2 ++
meson.build | 5 +++++
7 files changed, 34 insertions(+), 29 deletions(-)
delete mode 100644 backends/Makefile.objs
create mode 100644 backends/meson.build
delete mode 100644 backends/tpm/Makefile.objs
create mode 100644 backends/tpm/meson.build
diff --git a/Makefile.objs b/Makefile.objs
index f270044..c00851a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -66,8 +66,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) +=
block-dmg-bz2$(DSOSUF
common-obj-y += hw/
common-obj-m += hw/
-common-obj-y += backends/
-
common-obj-y += qapi/
common-obj-y += libqmp.fa
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
deleted file mode 100644
index 22d204c..0000000
--- a/backends/Makefile.objs
+++ /dev/null
@@ -1,23 +0,0 @@
-common-obj-y += rng.o rng-egd.o rng-builtin.o
-common-obj-$(CONFIG_POSIX) += rng-random.o
-
-common-obj-$(CONFIG_TPM) += tpm/
-
-common-obj-y += hostmem.o hostmem-ram.o
-common-obj-$(CONFIG_POSIX) += hostmem-file.o
-
-common-obj-y += cryptodev.o
-common-obj-y += cryptodev-builtin.o
-
-ifeq ($(CONFIG_VIRTIO_CRYPTO),y)
-common-obj-y += cryptodev-vhost.o
-common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o
-endif
-
-common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
-
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
-
-common-obj-$(CONFIG_GIO) += dbus-vmstate.o
-dbus-vmstate.o-cflags = $(GIO_CFLAGS)
-dbus-vmstate.o-libs = $(GIO_LIBS)
diff --git a/backends/meson.build b/backends/meson.build
new file mode 100644
index 0000000..484456e
--- /dev/null
+++ b/backends/meson.build
@@ -0,0 +1,19 @@
+softmmu_ss.add([files(
+ 'cryptodev-builtin.c',
+ 'cryptodev.c',
+ 'hostmem-ram.c',
+ 'hostmem.c',
+ 'rng-builtin.c',
+ 'rng-egd.c',
+ 'rng.c',
+), numa])
+
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
+softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true:
files('vhost-user.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true:
files('cryptodev-vhost.c'))
+softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true:
files('cryptodev-vhost-user.c'))
+softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio])
+
+subdir('tpm')
diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs
deleted file mode 100644
index db2731f..0000000
--- a/backends/tpm/Makefile.objs
+++ /dev/null
@@ -1,4 +0,0 @@
-common-obj-y += tpm_backend.o
-common-obj-y += tpm_util.o
-common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
-common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
diff --git a/backends/tpm/meson.build b/backends/tpm/meson.build
new file mode 100644
index 0000000..8579290
--- /dev/null
+++ b/backends/tpm/meson.build
@@ -0,0 +1,8 @@
+tpm_ss = ss.source_set()
+
+tpm_ss.add(files('tpm_backend.c'))
+tpm_ss.add(files('tpm_util.c'))
+tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
+tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_TPM', if_true: tpm_ss)
diff --git a/configure b/configure
index 6f02538..f3baba1 100755
--- a/configure
+++ b/configure
@@ -4678,6 +4678,7 @@ EOF
if compile_prog "" "-lnuma" ; then
numa=yes
libs_softmmu="-lnuma $libs_softmmu"
+ numa_libs="-lnuma"
else
if test "$numa" = "yes" ; then
feature_not_found "numa" "install numactl devel"
@@ -8314,6 +8315,7 @@ fi
if test "$numa" = "yes"; then
echo "CONFIG_NUMA=y" >> $config_host_mak
+ echo "NUMA_LIBS=$numa_libs" >> $config_host_mak
fi
if test "$ccache_cpp2" = "yes"; then
diff --git a/meson.build b/meson.build
index 151f4ca..67e7342 100644
--- a/meson.build
+++ b/meson.build
@@ -309,6 +309,10 @@ rdma = not_found
if 'CONFIG_RDMA' in config_host
rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
endif
+numa = not_found
+if 'CONFIG_NUMA' in config_host
+ numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
+endif
create_config = find_program('scripts/create_config')
minikconf = find_program('scripts/minikconf.py')
@@ -656,6 +660,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true:
[files('device_tree.c')])
common_ss.add(files('cpus-common.c'))
subdir('softmmu')
+subdir('backends')
subdir('migration')
subdir('monitor')
subdir('net')
--
1.8.3.1
- [PATCH 071/147] meson: convert trace/, (continued)
- [PATCH 071/147] meson: convert trace/, Paolo Bonzini, 2020/08/10
- [PATCH 067/147] meson: convert audio directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 057/147] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/10
- [PATCH 072/147] meson: convert dump/, Paolo Bonzini, 2020/08/10
- [PATCH 068/147] meson: convert ui directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 073/147] meson: convert common QMP bits for qemu and qemu-storage-daemon, Paolo Bonzini, 2020/08/10
- [PATCH 074/147] meson: convert qemu-storage-daemon, Paolo Bonzini, 2020/08/10
- [PATCH 075/147] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 076/147] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 077/147] meson: convert net directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 078/147] meson: convert backends directory to Meson,
Paolo Bonzini <=
- [PATCH 079/147] meson: convert fsdev/, Paolo Bonzini, 2020/08/10
- [PATCH 081/147] meson: convert qapi-specific to meson, Paolo Bonzini, 2020/08/10
- [PATCH 080/147] meson: convert disas directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 084/147] meson: convert hw/semihosting, Paolo Bonzini, 2020/08/10
- [PATCH 082/147] meson: convert hw/xen, Paolo Bonzini, 2020/08/10
- [PATCH 085/147] meson: convert hw/nubus, Paolo Bonzini, 2020/08/10
- [PATCH 083/147] meson: convert hw/core, Paolo Bonzini, 2020/08/10
- [PATCH 086/147] meson: convert hw/smbios, Paolo Bonzini, 2020/08/10
- [PATCH 087/147] meson: convert hw/mem, Paolo Bonzini, 2020/08/10
- [PATCH 088/147] meson: convert hw/watchdog, Paolo Bonzini, 2020/08/10