summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau2019-08-15 13:45:58 +0200
committerPaolo Bonzini2020-08-21 12:30:26 +0200
commit97813b940d56712d456d8a1260ecd5320b10761c (patch)
treebcfaa5eb2a4171d92a1672a65b06be86a9ec03ce
parentmeson: convert hw/smbios (diff)
downloadqemu-97813b940d56712d456d8a1260ecd5320b10761c.tar.gz
qemu-97813b940d56712d456d8a1260ecd5320b10761c.tar.xz
qemu-97813b940d56712d456d8a1260ecd5320b10761c.zip
meson: convert hw/mem
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/Makefile.objs1
-rw-r--r--hw/mem/Kconfig1
-rw-r--r--hw/mem/Makefile.objs3
-rw-r--r--hw/mem/meson.build6
-rw-r--r--hw/meson.build1
5 files changed, 8 insertions, 4 deletions
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 73c49ddd3b..df72b25a64 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -34,7 +34,6 @@ devices-dirs-y += usb/
devices-dirs-$(CONFIG_VFIO) += vfio/
devices-dirs-y += virtio/
devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
endif
common-obj-y += $(devices-dirs-y)
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index c27844900d..a0ef2cf648 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -9,3 +9,4 @@ config NVDIMM
bool
default y
depends on (PC || PSERIES || ARM_VIRT)
+ select MEM_DEVICE
diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
deleted file mode 100644
index 56345befd0..0000000000
--- a/hw/mem/Makefile.objs
+++ /dev/null
@@ -1,3 +0,0 @@
-common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-y += memory-device.o
-common-obj-$(CONFIG_NVDIMM) += nvdimm.o
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
new file mode 100644
index 0000000000..ba424622bb
--- /dev/null
+++ b/hw/mem/meson.build
@@ -0,0 +1,6 @@
+mem_ss = ss.source_set()
+mem_ss.add(files('memory-device.c'))
+mem_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
+mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
diff --git a/hw/meson.build b/hw/meson.build
index dccc2d19a6..542d675618 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -1,4 +1,5 @@
subdir('core')
+subdir('mem')
subdir('nubus')
subdir('semihosting')
subdir('smbios')