xref: /openbmc/linux/tools/testing/nvdimm/Kbuild (revision 791d3ef2)
1# SPDX-License-Identifier: GPL-2.0
2ldflags-y += --wrap=ioremap_wc
3ldflags-y += --wrap=memremap
4ldflags-y += --wrap=devm_ioremap_nocache
5ldflags-y += --wrap=devm_memremap
6ldflags-y += --wrap=devm_memunmap
7ldflags-y += --wrap=ioremap_nocache
8ldflags-y += --wrap=iounmap
9ldflags-y += --wrap=memunmap
10ldflags-y += --wrap=__devm_request_region
11ldflags-y += --wrap=__devm_release_region
12ldflags-y += --wrap=__request_region
13ldflags-y += --wrap=__release_region
14ldflags-y += --wrap=devm_memremap_pages
15ldflags-y += --wrap=insert_resource
16ldflags-y += --wrap=remove_resource
17ldflags-y += --wrap=acpi_evaluate_object
18ldflags-y += --wrap=acpi_evaluate_dsm
19
20DRIVERS := ../../../drivers
21NVDIMM_SRC := $(DRIVERS)/nvdimm
22ACPI_SRC := $(DRIVERS)/acpi/nfit
23DAX_SRC := $(DRIVERS)/dax
24ccflags-y := -I$(src)/$(NVDIMM_SRC)/
25
26obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
27obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
28obj-$(CONFIG_ND_BTT) += nd_btt.o
29obj-$(CONFIG_ND_BLK) += nd_blk.o
30obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o
31obj-$(CONFIG_ACPI_NFIT) += nfit.o
32ifeq ($(CONFIG_DAX),m)
33obj-$(CONFIG_DAX) += dax.o
34endif
35obj-$(CONFIG_DEV_DAX) += device_dax.o
36obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem.o
37
38nfit-y := $(ACPI_SRC)/core.o
39nfit-$(CONFIG_X86_MCE) += $(ACPI_SRC)/mce.o
40nfit-y += acpi_nfit_test.o
41nfit-y += config_check.o
42
43nd_pmem-y := $(NVDIMM_SRC)/pmem.o
44nd_pmem-y += pmem-dax.o
45nd_pmem-y += pmem_test.o
46nd_pmem-y += config_check.o
47
48nd_btt-y := $(NVDIMM_SRC)/btt.o
49nd_btt-y += config_check.o
50
51nd_blk-y := $(NVDIMM_SRC)/blk.o
52nd_blk-y += config_check.o
53
54nd_e820-y := $(NVDIMM_SRC)/e820.o
55nd_e820-y += config_check.o
56
57dax-y := $(DAX_SRC)/super.o
58dax-y += config_check.o
59
60device_dax-y := $(DAX_SRC)/device.o
61device_dax-y += dax-dev.o
62device_dax-y += device_dax_test.o
63device_dax-y += config_check.o
64
65dax_pmem-y := $(DAX_SRC)/pmem.o
66dax_pmem-y += config_check.o
67
68libnvdimm-y := $(NVDIMM_SRC)/core.o
69libnvdimm-y += $(NVDIMM_SRC)/bus.o
70libnvdimm-y += $(NVDIMM_SRC)/dimm_devs.o
71libnvdimm-y += $(NVDIMM_SRC)/dimm.o
72libnvdimm-y += $(NVDIMM_SRC)/region_devs.o
73libnvdimm-y += $(NVDIMM_SRC)/region.o
74libnvdimm-y += $(NVDIMM_SRC)/namespace_devs.o
75libnvdimm-y += $(NVDIMM_SRC)/label.o
76libnvdimm-y += $(NVDIMM_SRC)/badrange.o
77libnvdimm-$(CONFIG_ND_CLAIM) += $(NVDIMM_SRC)/claim.o
78libnvdimm-$(CONFIG_BTT) += $(NVDIMM_SRC)/btt_devs.o
79libnvdimm-$(CONFIG_NVDIMM_PFN) += $(NVDIMM_SRC)/pfn_devs.o
80libnvdimm-$(CONFIG_NVDIMM_DAX) += $(NVDIMM_SRC)/dax_devs.o
81libnvdimm-y += libnvdimm_test.o
82libnvdimm-y += config_check.o
83
84obj-m += test/
85