xref: /linux/tools/testing/cxl/Kbuild (revision 55d0969c451159cff86949b38c39171cab962069)
1# SPDX-License-Identifier: GPL-2.0
2ldflags-y += --wrap=acpi_table_parse_cedt
3ldflags-y += --wrap=is_acpi_device_node
4ldflags-y += --wrap=acpi_evaluate_integer
5ldflags-y += --wrap=acpi_pci_find_root
6ldflags-y += --wrap=nvdimm_bus_register
7ldflags-y += --wrap=devm_cxl_port_enumerate_dports
8ldflags-y += --wrap=devm_cxl_setup_hdm
9ldflags-y += --wrap=devm_cxl_add_passthrough_decoder
10ldflags-y += --wrap=devm_cxl_enumerate_decoders
11ldflags-y += --wrap=cxl_await_media_ready
12ldflags-y += --wrap=cxl_hdm_decode_init
13ldflags-y += --wrap=cxl_dvsec_rr_decode
14ldflags-y += --wrap=devm_cxl_add_rch_dport
15ldflags-y += --wrap=cxl_rcd_component_reg_phys
16ldflags-y += --wrap=cxl_endpoint_parse_cdat
17ldflags-y += --wrap=cxl_dport_init_ras_reporting
18
19DRIVERS := ../../../drivers
20CXL_SRC := $(DRIVERS)/cxl
21CXL_CORE_SRC := $(DRIVERS)/cxl/core
22ccflags-y := -I$(srctree)/drivers/cxl/
23ccflags-y += -D__mock=__weak
24ccflags-y += -DTRACE_INCLUDE_PATH=$(CXL_CORE_SRC) -I$(srctree)/drivers/cxl/core/
25
26obj-m += cxl_acpi.o
27
28cxl_acpi-y := $(CXL_SRC)/acpi.o
29cxl_acpi-y += mock_acpi.o
30cxl_acpi-y += config_check.o
31cxl_acpi-y += cxl_acpi_test.o
32
33obj-m += cxl_pmem.o
34
35cxl_pmem-y := $(CXL_SRC)/pmem.o
36cxl_pmem-y += $(CXL_SRC)/security.o
37cxl_pmem-y += config_check.o
38cxl_pmem-y += cxl_pmem_test.o
39
40obj-m += cxl_port.o
41
42cxl_port-y := $(CXL_SRC)/port.o
43cxl_port-y += config_check.o
44cxl_port-y += cxl_port_test.o
45
46
47obj-m += cxl_mem.o
48
49cxl_mem-y := $(CXL_SRC)/mem.o
50cxl_mem-y += config_check.o
51cxl_mem-y += cxl_mem_test.o
52
53obj-m += cxl_core.o
54
55cxl_core-y := $(CXL_CORE_SRC)/port.o
56cxl_core-y += $(CXL_CORE_SRC)/pmem.o
57cxl_core-y += $(CXL_CORE_SRC)/regs.o
58cxl_core-y += $(CXL_CORE_SRC)/memdev.o
59cxl_core-y += $(CXL_CORE_SRC)/mbox.o
60cxl_core-y += $(CXL_CORE_SRC)/pci.o
61cxl_core-y += $(CXL_CORE_SRC)/hdm.o
62cxl_core-y += $(CXL_CORE_SRC)/pmu.o
63cxl_core-y += $(CXL_CORE_SRC)/cdat.o
64cxl_core-$(CONFIG_TRACING) += $(CXL_CORE_SRC)/trace.o
65cxl_core-$(CONFIG_CXL_REGION) += $(CXL_CORE_SRC)/region.o
66cxl_core-y += config_check.o
67cxl_core-y += cxl_core_test.o
68cxl_core-y += cxl_core_exports.o
69
70KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
71
72obj-m += test/
73