FANTSMMU_INCLUDE :=-I$(FANTGPU_PRO_PATH)/fantsmmu
FANTSMMU_OBJS = \
fantsmmu/fantsmmu_drv.o \
fantsmmu/fantsmmu.o

ifeq ($(SEPARATE_BUILD),y)
  fantsmmu-y := $(FANTSMMU_OBJS)
  obj-m += fantsmmu.o
else
  FANTSMMU := $(FANTSMMU_OBJS)
endif
$(srctree)/$(src)/fantsmmu/fantsmmu.o:
ifeq (,$(wildcard $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.c))
ifeq ($(CONFIG_X86),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.x86 $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
else ifeq ($(CONFIG_ARM),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.arm $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
else ifeq ($(CONFIG_ARM64),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.arm64 $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
else ifeq ($(CONFIG_LOONGARCH),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.loongarch $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
else ifeq ($(CONFIG_RISCV),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.riscv $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
else ifeq ($(CONFIG_SW64),y)
	cp -f $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o_shipped.sw64 $(FANTGPU_PRO_PATH)/fantsmmu/fantsmmu.o
endif
endif
