diff mbox series

[067/132] meson: convert hw/mem

Message ID 1576155176-2464-68-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series Proof of concept for Meson integration | expand

Commit Message

Paolo Bonzini Dec. 12, 2019, 12:51 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/Makefile.objs     | 1 -
 hw/mem/Kconfig       | 1 +
 hw/mem/Makefile.objs | 3 ---
 hw/mem/meson.build   | 3 +++
 hw/meson.build       | 1 +
 5 files changed, 5 insertions(+), 4 deletions(-)
 delete mode 100644 hw/mem/Makefile.objs
 create mode 100644 hw/mem/meson.build
diff mbox series

Patch

diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index f5c2ab4..b91472b 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 620fd4c..9e6c6b8 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -9,3 +9,4 @@  config NVDIMM
     bool
     default y
     depends on PC
+    select MEM_DEVICE
diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
deleted file mode 100644
index 3e2f7c5..0000000
--- a/hw/mem/Makefile.objs
+++ /dev/null
@@ -1,3 +0,0 @@ 
-common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-$(CONFIG_MEM_DEVICE) += 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 0000000..f9adc45
--- /dev/null
+++ b/hw/mem/meson.build
@@ -0,0 +1,3 @@ 
+common_ss.add(when: 'CONFIG_MEM_DEVICE', if_true: files('memory-device.c'))
+common_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
+common_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
diff --git a/hw/meson.build b/hw/meson.build
index 80da62d..d788be4 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -1,4 +1,5 @@ 
 subdir('core')
+subdir('mem')
 subdir('semihosting')
 subdir('smbios')
 subdir('xen')