Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0
2
3iommu_pt_fmt-$(CONFIG_IOMMU_PT_AMDV1) += amdv1
4iommu_pt_fmt-$(CONFIG_IOMMUFD_TEST) += mock
5
6iommu_pt_fmt-$(CONFIG_IOMMU_PT_VTDSS) += vtdss
7
8iommu_pt_fmt-$(CONFIG_IOMMU_PT_RISCV64) += riscv64
9
10iommu_pt_fmt-$(CONFIG_IOMMU_PT_X86_64) += x86_64
11
12IOMMU_PT_KUNIT_TEST :=
13define create_format
14obj-$(2) += iommu_$(1).o
15iommu_pt_kunit_test-y += kunit_iommu_$(1).o
16CFLAGS_kunit_iommu_$(1).o += -DGENERIC_PT_KUNIT=1
17IOMMU_PT_KUNIT_TEST := iommu_pt_kunit_test.o
18
19endef
20
21$(eval $(foreach fmt,$(iommu_pt_fmt-y),$(call create_format,$(fmt),y)))
22$(eval $(foreach fmt,$(iommu_pt_fmt-m),$(call create_format,$(fmt),m)))
23
24# The kunit objects are constructed by compiling the main source
25# with -DGENERIC_PT_KUNIT
26$(obj)/kunit_iommu_%.o: $(src)/iommu_%.c FORCE
27 $(call rule_mkdir)
28 $(call if_changed_dep,cc_o_c)
29
30obj-$(CONFIG_IOMMU_PT_KUNIT_TEST) += $(IOMMU_PT_KUNIT_TEST)