#
# Makefile for the Linux Kernel CIM specific device drivers.
#

ifeq ($(OUTPUT_BUILD_DIR),)
#J5
INC_DIR := $(srctree)/drivers/media/platform/hobot
OUT_DIR := ${OUT_BUILD_KERNEL_DIR}
ccflags-y += -I$(srctree)/drivers/media/platform/hobot/osal/linux/inc/
else
#j6
INC_DIR := $(srctree)/../hobot-drivers/camsys
OUT_DIR := ${OUTPUT_BUILD_DIR}/kernel
ccflags-y += -I$(srctree)/../hobot-drivers/osal/linux/inc/
ccflags-y += -I$(srctree)/../hobot-drivers/ion/
ccflags-y += -I$(srctree)/../hobot-drivers/smmu/
ccflags-y += -I$(srctree)/../hobot-drivers/global_time/
endif

obj-$(CONFIG_HOBOT_CIM_JPLUS) += hobot_cim.o
hobot_cim-objs := hobot_cim_hw_reg.o hobot_cim_ops.o hobot_dev_cim.o
ccflags-y += -I$(INC_DIR)/vpf/
ccflags-y += -I$(INC_DIR)/vin_node/
ccflags-y += -I$(INC_DIR)/j6_cim/

ifeq ($(CONFIG_HOBOT_GCOV_AVIO),y)
GCOV_PROFILE := y
endif

all: FORCE
	make -C $(OUT_DIR) M=$(PWD) modules -j${N}

clean: FORCE
	make -C $(OUT_DIR) M=$(PWD) clean -j${N}

FORCE:

