#
# Makefile for the Linux Kernel IPS specific device drivers.
#
ifeq ($(OUTPUT_BUILD_DIR),)
#J5
EXTRA_CFLAGS += -DIS_J5_STH     #编译J5代码
CONFIG_HOBOT_STITCH_JPLUS=m
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/
endif

obj-${CONFIG_HOBOT_STITCH_JPLUS} += hobot_stitch.o
hobot_stitch-objs := hobot_dev_stitch.o hobot_stitch_ops.o hobot_stitch_hw_reg.o
ccflags-y += -I$(srctree)/../hobot-drivers/camsys/vpf/

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

all: FORCE
	make -C ${OUTPUT_BUILD_DIR}/kernel M=$(PWD) modules

clean: FORCE
	make -C ${OUTPUT_BUILD_DIR}/kernel M=$(PWD) clean

FORCE:
