xref: /linux/tools/testing/cxl/Kbuild (revision c8bfe3fad4f86a029da7157bae9699c816f0c309)
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
17
18DRIVERS := ../../../drivers
19CXL_SRC := $(DRIVERS)/cxl
20CXL_CORE_SRC := $(DRIVERS)/cxl/core
21ccflags-y := -I$(srctree)/drivers/cxl/
22ccflags-y += -D__mock=__weak
23ccflags-y += -DTRACE_INCLUDE_PATH=$(CXL_CORE_SRC) -I$(srctree)/drivers/cxl/core/
24
25obj-m += cxl_acpi.o
26
27cxl_acpi-y := $(CXL_SRC)/acpi.o
28cxl_acpi-y += mock_acpi.o
29cxl_acpi-y += config_check.o
30cxl_acpi-y += cxl_acpi_test.o
31
32obj-m += cxl_pmem.o
33
34cxl_pmem-y := $(CXL_SRC)/pmem.o
35cxl_pmem-y += $(CXL_SRC)/security.o
36cxl_pmem-y += config_check.o
37cxl_pmem-y += cxl_pmem_test.o
38
39obj-m += cxl_port.o
40
41cxl_port-y := $(CXL_SRC)/port.o
42cxl_port-y += config_check.o
43cxl_port-y += cxl_port_test.o
44
45
46obj-m += cxl_mem.o
47
48cxl_mem-y := $(CXL_SRC)/mem.o
49cxl_mem-y += config_check.o
50cxl_mem-y += cxl_mem_test.o
51
52obj-m += cxl_core.o
53
54cxl_core-y := $(CXL_CORE_SRC)/port.o
55cxl_core-y += $(CXL_CORE_SRC)/pmem.o
56cxl_core-y += $(CXL_CORE_SRC)/regs.o
57cxl_core-y += $(CXL_CORE_SRC)/memdev.o
58cxl_core-y += $(CXL_CORE_SRC)/mbox.o
59cxl_core-y += $(CXL_CORE_SRC)/pci.o
60cxl_core-y += $(CXL_CORE_SRC)/hdm.o
61cxl_core-y += $(CXL_CORE_SRC)/pmu.o
62cxl_core-y += $(CXL_CORE_SRC)/cdat.o
63cxl_core-$(CONFIG_TRACING) += $(CXL_CORE_SRC)/trace.o
64cxl_core-$(CONFIG_CXL_REGION) += $(CXL_CORE_SRC)/region.o
65cxl_core-y += config_check.o
66cxl_core-y += cxl_core_test.o
67cxl_core-y += cxl_core_exports.o
68
69KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
70
71obj-m += test/
72