1# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 2# 3# This program is free software; you can redistribute it and/or 4# modify it under the terms of the GNU General Public License 5# as published by the Free Software Foundation; either version 2 6# of the License, or (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program; if not, write to the Free Software 15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 17# $(ROOT)/mpp/code/component/hifb/Makefile 18 19ifeq ($(PARAM_FILE), ) 20 PARAM_FILE:=../../Makefile.param 21 include $(PARAM_FILE) 22endif 23 24INC_DIR =$(MPP_PATH)/component/hifb/include 25 26#******************************************************************************* 27#********************* Set the source code and include path ******************** 28MPP_ROOT := $(SDK_PATH)/mpp 29CBB_ROOT := $(SDK_PATH)/mpp/cbb 30COMPONENT_ROOT := $(SDK_PATH)/mpp/component 31 32# Head file path variable's 33CFG_INC += -I$(PWD)/include 34CFG_INC += -I$(PWD)/src 35CFG_INC += -I$(PWD)/src/init 36CFG_INC += -I$(PWD)/drv/$(HIARCH) 37CFG_INC += -I$(PWD)/drv/include 38ifeq ($(MPP_BUILD), n) 39CFG_INC += -I$(REL_INC) 40endif 41ifeq ($(CONFIG_SYNC_FILE),y) 42CFG_INC += -I$(KERNEL_ROOT)/drivers/hi_fence 43EXTRA_CFLAGS += -DCONFIG_HIFB_FENCE_SUPPORT 44endif 45 46KBUILD_EXTRA_SYMBOLS += $(HI_KBUILD_EXTRA_SYMBOLS) 47#***************************************************************************# 48 49 50#********************* List all the release file ******************************* 51 52ifeq ($(HIGDB),y) 53EXTRA_CFLAGS += -g 54endif 55 56EXTRA_CFLAGS += $(CFG_INC) 57EXTRA_CFLAGS += $(MPP_CFLAGS) 58EXTRA_CFLAGS += $(DRV_CFLAGS) 59EXTRA_CFLAGS += -I$(MPP_PATH)/cbb/include 60EXTRA_CFLAGS += -I$(MPP_PATH)/cbb/include/adapt 61EXTRA_CFLAGS += -I$(CBB_ROOT)/base/arch/$(HIARCH)/include/$(HI_SUBARCH) 62EXTRA_CFLAGS += -I$(CBB_ROOT)/base/ext_inc 63EXTRA_CFLAGS += -I$(CBB_ROOT)/sys/include 64EXTRA_CFLAGS += -I$(CBB_ROOT)/sys/include/adapt 65EXTRA_CFLAGS += -I$(CBB_ROOT)/sys/ext_inc 66EXTRA_CFLAGS += -I$(CBB_ROOT)/vo/include 67EXTRA_CFLAGS += -I$(CBB_ROOT)/vo/vo_dev/include 68EXTRA_CFLAGS += -I$(MPP_PATH)/component/tde/include 69EXTRA_CFLAGS += -I$(MPP_PATH)/component/tde/driver/include 70 71HIFB_MOD_NAME := hifb 72MOD_NAME := hi_fb 73 74EXTRA_CFLAGS += -Wall -D$(HIARCH) -D$(HI_FPGA) -Wno-date-time 75 76ifeq ($(CONFIG_DRIVER_SPACE_TYPE),user_space) 77EXTRA_CFLAGS :=$(subst base/,based/,$(EXTRA_CFLAGS)) 78EXTRA_CFLAGS :=$(subst sys/,sysd/,$(EXTRA_CFLAGS)) 79endif 80 81-include $(PWD)/src/Makefile 82-include $(PWD)/drv/$(ARCH_DIR)/Makefile 83 84ifeq ($(CONFIG_DRM_HISI_HISMART), y) 85EXTRA_CFLAGS += -I$(PWD)/drm_hal/ 86-include $(PWD)/drm_hal/Makefile 87endif 88$(HIFB_MOD_NAME)-objs = $(HIFB_SRC:%.c=%.o) 89 90ifneq ($(KERNELRELEASE),) 91 obj-m += hifb.o 92endif 93 94# compile linux or huawei_liteos 95include $(PWD)/Make.$(OSTYPE) 96