at commit c03c1a14
| 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | iommu_pt_fmt-$(CONFIG_IOMMU_PT_AMDV1) += amdv1 |
| 4 | iommu_pt_fmt-$(CONFIG_IOMMUFD_TEST) += mock |
| 5 | |
| 6 | iommu_pt_fmt-$(CONFIG_IOMMU_PT_VTDSS) += vtdss |
| 7 | |
| 8 | iommu_pt_fmt-$(CONFIG_IOMMU_PT_RISCV64) += riscv64 |
| 9 | |
| 10 | iommu_pt_fmt-$(CONFIG_IOMMU_PT_X86_64) += x86_64 |
| 11 | |
| 12 | IOMMU_PT_KUNIT_TEST := |
| 13 | define create_format |
| 14 | obj-$(2) += iommu_$(1).o |
| 15 | iommu_pt_kunit_test-y += kunit_iommu_$(1).o |
| 16 | CFLAGS_kunit_iommu_$(1).o += -DGENERIC_PT_KUNIT=1 |
| 17 | IOMMU_PT_KUNIT_TEST := iommu_pt_kunit_test.o |
| 18 | |
| 19 | endef |
| 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_rule,cc_o_c) |
| 29 | |
| 30 | obj-$(CONFIG_IOMMU_PT_KUNIT_TEST) += $(IOMMU_PT_KUNIT_TEST) |