Browse Source

meson: convert hw/mem

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Marc-André Lureau 6 năm trước cách đây
mục cha
commit
97813b940d

+ 0 - 1
hw/Makefile.objs

@@ -34,7 +34,6 @@ devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 endif
 endif
 
 
 common-obj-y += $(devices-dirs-y)
 common-obj-y += $(devices-dirs-y)

+ 1 - 0
hw/mem/Kconfig

@@ -9,3 +9,4 @@ config NVDIMM
     bool
     bool
     default y
     default y
     depends on (PC || PSERIES || ARM_VIRT)
     depends on (PC || PSERIES || ARM_VIRT)
+    select MEM_DEVICE

+ 0 - 3
hw/mem/Makefile.objs

@@ -1,3 +0,0 @@
-common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-y += memory-device.o
-common-obj-$(CONFIG_NVDIMM) += nvdimm.o

+ 6 - 0
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)

+ 1 - 0
hw/meson.build

@@ -1,4 +1,5 @@
 subdir('core')
 subdir('core')
+subdir('mem')
 subdir('nubus')
 subdir('nubus')
 subdir('semihosting')
 subdir('semihosting')
 subdir('smbios')
 subdir('smbios')