From: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
---
hw/Makefile.objs | 1 -
hw/meson.build | 1 +
hw/nvram/Makefile.objs | 8 --------
hw/nvram/meson.build | 11 +++++++++++
4 files changed, 12 insertions(+), 9 deletions(-)
delete mode 100644 hw/nvram/Makefile.objs
create mode 100644 hw/nvram/meson.build
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 512d10d..6ce70d5 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -21,7 +21,6 @@ devices-dirs-y += isa/
devices-dirs-y += misc/
devices-dirs-y += net/
devices-dirs-y += rdma/
-devices-dirs-y += nvram/
endif
common-obj-y += $(devices-dirs-y)
diff --git a/hw/meson.build b/hw/meson.build
index 1fd9eb5..0c528e5 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -1,5 +1,6 @@
subdir('core')
subdir('mem')
+subdir('nvram')
subdir('pci')
subdir('pci-bridge')
subdir('pci-host')
diff --git a/hw/nvram/Makefile.objs b/hw/nvram/Makefile.objs
deleted file mode 100644
index 26f7b4c..0000000
--- a/hw/nvram/Makefile.objs
+++ /dev/null
@@ -1,8 +0,0 @@
-common-obj-$(CONFIG_DS1225Y) += ds1225y.o
-common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
-common-obj-y += fw_cfg.o
-common-obj-y += chrp_nvram.o
-common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
-obj-$(CONFIG_PSERIES) += spapr_nvram.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o
diff --git a/hw/nvram/meson.build b/hw/nvram/meson.build
new file mode 100644
index 0000000..75fca7b
--- /dev/null
+++ b/hw/nvram/meson.build
@@ -0,0 +1,11 @@
+softmmu_ss.add(files(
+ 'chrp_nvram.c',
+ 'eeprom93xx.c',
+ 'fw_cfg.c',
+))
+softmmu_ss.add(when: 'CONFIG_AT24C', if_true: files('eeprom_at24c.c'))
+softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
+softmmu_ss.add(when: 'CONFIG_MAC_NVRAM', if_true: files('mac_nvram.c'))
+
+specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_nvram.c'))
+specific_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_nvm.c'))
--
1.8.3.1