You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.7 KiB

###############################################################################
# export variables
###############################################################################
ifeq ($(CONFIG_SOCT_KMOD_CFLAGS),)
ccflags-y += $(CONFIG_SOCT_KMOD_CFLAGS)
endif
#===============================================================================
# local variables
#===============================================================================
ifeq ($(CONFIG_SOCT_CHIP_TYPE), "reserved5")
chip_dir = reserved5
else ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved9", "reserved8"),)
chip_dir = reserved9
else ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved13", "reserved6"),)
chip_dir = reserved9
else ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "hi3751v811"),)
chip_dir = hi3751v811
else
chip_dir = reserved19
endif
ccflags-y += -Idrivers/drv/ioctl_inc/generic
ccflags-y += -Idrivers/drv/ioctl_inc/gpio
ccflags-y += -Idrivers/drv/ioctl_inc/tvd
ccflags-y += -Idrivers/drv/ioctl_inc/hddec
ccflags-y += -Idrivers/drv/ioctl_inc/video
ccflags-y += -Idrivers/drv/ioctl_inc/common
ccflags-y += -Idrivers/drv/ext_inc/base
ccflags-y += -Idrivers/drv/ext_inc/common
ccflags-y += -Idrivers/drv/ext_inc/dftevent
ccflags-y += -Idrivers/drv/ext_inc/gpio
ccflags-y += -Idrivers/drv/ext_inc/hddec
ccflags-y += -Idrivers/drv/ext_inc/osal
ccflags-y += -Idrivers/drv/ext_inc/vfe
ccflags-y += -Idrivers/drv/ext_inc/otp
ccflags-y += -Idrivers/drv/hddec
ccflags-y += -Idrivers/drv/hddec/hal/$(chip_dir)/
ccflags-y += -fstack-protector-all
ccflags-y += -Werror
ccflags-y += -DLOG_D_MODULE_ID=SOC_ID_HDDEC
MODNAME := soc_hddec
ifeq ($(CONFIG_SOCT_DRV_BUILDIN),y)
MOD_OBJ_BUILD_FLAGS := -objs-y
MOD_OBJ_TARGET_FLAGS := obj-y
else
MOD_OBJ_BUILD_FLAGS := -objs-m
MOD_OBJ_TARGET_FLAGS := obj-m
endif
# end of CONFIG_SOCT_DRV_BUILDIN
ifeq ($(CONFIG_SOCT_HDDEC_SUPPORT),y)
$(MOD_OBJ_TARGET_FLAGS) += $(MODNAME).o
endif
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_ctrl.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_hal.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_intf.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_proc.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_sp.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_table.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += drv_hddec_td.o
$(MODNAME)$(MOD_OBJ_BUILD_FLAGS) += hal/$(chip_dir)/drv_hddec_platform.o
$(MODNAME)-objs := $($(MODNAME)$(MOD_OBJ_BUILD_FLAGS))
##################modules######################
KDIR := $(LINUX_DIR)
PWD := $(shell pwd)
CURFOLDER ?= $(pwd)
EXTRA_CFLAGS += -I$(CURFOLDER)/include
all:drivers_modules
drivers_modules:
$(MAKE) -C $(KDIR) M=$(PWD) modules CROSS_COMPILE=$(CROSS_COMPILE)
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
$(RM) Module.markers
$(RM) modules.order