## two usages:
## 1. make clean && make
## 2. make clean && make target=gnr_dec/gnr_enc/oyb_dec/oyb_enc #those targets can be found in project_config.mk.
#
## following are default values when don't specify target, set all to y for checking compile errors.
## the variables in this file can be changed to y or n as you wanted.
## the variables in project_config.mk are the default parameters for different projects.
#
##ifeq ($(strip $(target)),)
VSI_FPGA ?= y
VSI_SIMICS ?= n
VSI_VC8000E ?= y
VSI_VC8000E_CLOSE ?= n
VSI_VC8000D ?= y
VSI_VCMD ?= y
VSI_CACHE ?= n
VSI_DEC400 ?= n
VSI_MMU ?= y
VSI_AXIFE ?= y
VPU_USE_HRTIMER ?= y
##else
##include $(PWD)/project_config.mk
##endif
#
#
hantrodriver-objs = hx280enc.o hantrodec.o hantro_fence.o hantro_vcmd.o hantro_vcmd_slice.o	\
		    vcmdswhwregisters.o bidirect_list.o devicemgr.o hantro_dmabuf.o hantro_fs.o hantro_drm.o \
		    xdxvpu_irq.o vpu_xmem.o vpu_smmu.o
# ccflags-y=-DUSE_CMA=0 -DUSE_HW=1
#HANTRO_CFLAGS += -DUSE_DTB_PROBE

ifeq ($(VPU_USE_HRTIMER),y)
	ccflags-y += -DVPU_USE_HRTIMER
endif

ifeq ($(VSI_FPGA),y)
	hantrodriver-objs += hantro_fpga.o
	ccflags-y += -DVSI_FPGA
endif

ifeq ($(VSI_SIMICS),y)
	ccflags-y += -DSIMICS_TEST
endif

ifeq ($(VSI_VC8000E),y)
	ccflags-y += -DHAS_VC8000E
endif

ifeq ($(VSI_VC8000E_CLOSE),y)
	ccflags-y += -DHAS_VC8000E_CLOSE
endif

ifeq ($(VSI_VC8000D),y)
	ccflags-y += -DHAS_VC8000D
endif

ifeq ($(VSI_VCMD),y)
	ccflags-y += -DHAS_VCMD
endif

ifeq ($(VSI_CACHE),y)
	hantrodriver-objs += hantrocache.o
	ccflags-y += -DHAS_CACHECORE
endif

ifeq ($(VSI_DEC400),y)
	hantrodriver-objs += hantrodec400.o
	ccflags-y += -DHAS_DEC400
endif

ifeq ($(VSI_AXIFE),y)
	hantrodriver-objs += hantro_axife.o
	ccflags-y += -DHAS_AXIFE
endif

ifeq ($(VSI_MMU),y)
	hantrodriver-objs += hantro_mmu.o
	ccflags-y += -DHAS_MMU
endif
ccflags-y += -DUSE_HW=1

#
#
## VPU
XDX_VPU_DRV := $(hantrodriver-objs)
#
XDX_VPU_FILES := 
#
XDX_VPU_FILES = $(addprefix vpu/,$(XDX_VPU_DRV))
#
