blob: 6865989d961f629bdb4ca3cd13eb919a3ce750d3 [file] [log] [blame]
# Define ./interface/modem folder path by project option
ifneq ($(filter __MD93__,$(strip $(MODULE_DEFS))),)
MD_VER_FOLDER_PATH = mt6293
else ifneq ($(filter __MD95__,$(strip $(MODULE_DEFS))),)
MD_VER_FOLDER_PATH = mt6295
else ifneq ($(filter __MD97__,$(strip $(MODULE_DEFS))),)
MD_VER_FOLDER_PATH = mt6297
else ifneq ($(filter __MD97P__,$(strip $(MODULE_DEFS))),)
MD_VER_FOLDER_PATH = mt6297p
else
#no match chip
endif
AUTO_MERGE_FOLDER = ./custom/driver/audio ./custom/driver/drv/misc_drv
INC_DIR =
COMP_DEFS =
FOLDER_LIST =
INC_DIR += ./interface/driver/storage/sim
# Define source file lists to SRC_LIST
# Define source file folder to FOLDER_LIST
#driver
ifneq ($(strip $(TEST_LOAD_TYPE)),BASIC)
FOLDER_LIST += $(call CUSTOM_FLD_MAPPING,./custom/driver/audio)
endif
FOLDER_LIST += ./custom/driver/common
FOLDER_LIST += $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/misc_drv) \
ifneq ($(strip $(TEST_LOAD_TYPE)),BASIC)
ifneq ($(strip $(TEST_LOAD_TYPE)),L1S)
ifdef GPS_SUPPORT
ifneq ($(strip $(GPS_SUPPORT)),NONE)
FOLDER_LIST += $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/gps)
INC_DIR += $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/gps)
endif
endif
endif
endif
##
AUTO_MERGE_TMP := $(foreach DIR,$(AUTO_MERGE_FOLDER),$(if $(filter $(DIR)/_Default_BB/$(strip $(PLATFORM)) $(call CUSTOM_FLD_MAPPING,$(DIR)),$(FOLDER_LIST)),$(DIR),))
SRC_LIST += $(foreach DIR,$(AUTO_MERGE_TMP), \
$(subst /,/,$(foreach file,$(wildcard $(DIR)/_Default_BB/$(strip $(PLATFORM))/*.c) $(wildcard $(DIR)/_Default_BB/$(strip $(PLATFORM))/*.cpp),$(if $(wildcard $(call CUSTOM_FLD_MAPPING,$(DIR))/$(notdir $(file))),,$(file))) $(wildcard $(call CUSTOM_FLD_MAPPING,$(DIR))/*.c) $(wildcard $(call CUSTOM_FLD_MAPPING,$(DIR))/*.cpp)) \
)
FOLDER_LIST := $(filter-out $(foreach DIR,$(AUTO_MERGE_TMP),$(DIR)/_Default_BB/$(strip $(PLATFORM)) $(call CUSTOM_FLD_MAPPING,$(DIR))),$(FOLDER_LIST))
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.c),$(FILE)) \
)
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.cpp),$(FILE)) \
)
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.s),$(FILE)) \
)
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.S),$(FILE)) \
)
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.dws),$(FILE)) \
)
SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \
$(foreach FILE,$(wildcard $(DIR)/*.rec),$(FILE)) \
)
#only in MoDIS
ifeq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
MODIS_DIS_FILE := custom_emi.c custom_flash.c usb_custom.c wndrv_configure.c wndrv_rf_ah.c wndrv_rf_maxim.c
MODIS_DIS_FILE += custom_flash_norfdm5.c afe.c mal1_create.c kbdmain_joystick.c ERS_api.c ERS_sys.s custom_sfi.c
MODIS_DIS_FILE += combo_flash_init.c combo_flash_nor.c
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),$(call Lower,$(MODIS_DIS_FILE))),,$(file)))
endif
SRC_LIST := $(call uniq,$(SRC_LIST))
# Define include path lists to INC_DIR
#ifeq ($(strip $(DSP_SOLUTION)),DUALMACDSP)
# AUDFOLDER = driver/audio/src/v2
#else
AUDFOLDER = driver/audio/src/v1
#endif
INC_DIR += driver/btmt/rf_desense
INC_DIR += $(strip $(AUDFOLDER))/inc
INC_DIR += driver/btmt/rf_desense \
driver/peripheral/inc \
driver/storage/flash/mtd/inc \
driver/storage/flash/fdm/inc \
driver/connectivity/usb_class/include
INC_DIR += driver/sys_drv/cache/inc
INC_DIR += driver/sys_drv/cache/inc/$(MD_VER_FOLDER)
INC_DIR += service/nvram/include
# File System custom file (temporary solution)
INC_DIR += driver/storage/mc/inc
ifeq ($(filter __MTK_TARGET__,$(strip $(MODULE_DEFS))),)
INC_DIR += MoDIS_VC9/drv_sim/include
endif
INC_DIR := $(call uniq,$(INC_DIR))
# Define the specified compile options to COMP_DEFS
COMP_DEFS += __UCS2_ENCODING \
MMI_ON_HARDWARE_P \
APCS_INTWORK \
USE_JAM=0 \
COMPILER_SUPPORTS_LONG=1
ifeq ($(filter __NOR_FLASH_BOOTING__,$(strip $(DEFINES))),)
ifdef NEED_BUILD_BOOTLOADER
ifeq ($(strip $(NEED_BUILD_BOOTLOADER)),TRUE)
COMP_DEFS += __BL_ENABLE__
COMP_DEFS += REMAPPING
endif
endif
endif
ifeq ($(strip $(ENHANCED_SINGLE_BANK_NOR_FLASH_SUPPORT)),TRUE)
COMP_DEFS += REMAPPING
endif
INC_DIR += driver/peripheral/inc
INC_DIR += driver/devdrv/usim/inc
INC_DIR += driver/devdrv/elm/inc
INC_DIR += interface/driver/devdrv/cuif/inc
INC_DIR += interface/driver/sleep_drv \
interface/driver/dvfs_drv/$(MD_VER_FOLDER)
INC_DIR += interface/l1/el1/external
INC_DIR += interface/protocol/general \
$(UNIVERSAL_COMMON)/interface/modem/$(MD_VER_FOLDER_PATH)/common/nr/external/custom
ifneq ($(filter __MIPS_IA__, $(strip $(MODULE_DEFS))),)
INC_DIR += driver/sys_drv/mmu/inc
endif
# *************************************************************************
# From Global include path
# *************************************************************************
INC_DIR += driver/connectivity/usb_driver/inc