blob: f9ed8ace7a1ab0bc8483556d8e1605b21fdabddd [file] [log] [blame]
INC_DIR =
COMP_DEFS =
FOLDER_LIST =
# 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
# Define source file lists to SRC_LIST
# Define source file folder to FOLDER_LIST
#service
ifeq ($(strip $(TST_SUPPORT)), TRUE)
FOLDER_LIST += ./custom/service/tst
endif
ifneq ($(filter __MTK_TARGET__,$(strip $(MODULE_DEFS))),)
FOLDER_LIST += ./custom/service/fs
endif
FOLDER_LIST += ./custom/service/nvram \
./custom/service/common \
./custom/service/mcf \
$(strip $(PROJDIR))/nvram_auto_gen
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)) \
)
# Not compile nl1_nvram_def_md97.c
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),nl1_nvram_def_md97.c),,$(file)))
# Not compile el1_nvram_def_md93.c/el1_nvram_def_md95.c
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),el1_nvram_def_md93.c),,$(file)))
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),el1_nvram_def_md95.c),,$(file)))
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),el1_nvram_def_md97.c),,$(file)))
# Not compile mml1_nvram_def_md93.c/mml1_nvram_def_md95.c
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),mml1_nvram_def_md93.c),,$(file)))
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),mml1_nvram_def_md95.c),,$(file)))
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),mml1_nvram_def_md97.c),,$(file)))
# Not compile mmrfc_nvram_def_md97.c
SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),mmrfc_nvram_def_md97.c),,$(file)))
SRC_LIST := $(call uniq,$(SRC_LIST))
ifeq ($(strip $(DHL_SUPPORT)), TRUE)
SRC_LIST += ./custom/service/tst/dhl_export_config.c
SRC_LIST += ./custom/service/tst/dhl_custom_set_log_buf.c
endif
#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))
INC_DIR += ./service/nvram/include \
./service/fs/common/include
# SV5
INC_DIR += ./service/sys_svc/gfh/public \
./service/sss/interface/inc \
./service/sst/include \
./service/sst/include
ifeq ($(filter __MTK_TARGET__,$(strip $(MODULE_DEFS))),)
INC_DIR += MoDIS_VC9/drv_sim/include
endif
#INC_DIR += ./service/tst/local_inc
# for customize secure
INC_DIR += ./interface/service/sys_svc
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 += interface/l1/el1/external
ifneq ($(filter __MD97__ __MD97P__,$(strip $(MODULE_DEFS))),)
INC_DIR += $(UNIVERSAL_COMMON)/interface/modem/$(MD_VER_FOLDER_PATH)/common/nr/external/custom
INC_DIR += $(UNIVERSAL_COMMON)/interface/modem/$(MD_VER_FOLDER_PATH)/common/nr/external/5g
endif
INC_DIR += interface/l1/nl1/external/4g
INC_DIR += interface/l1/nl1/external/5g
INC_DIR += interface/protocol/general
#fdr_reorg
INC_DIR += interface/protocol/as_c2k/common \
interface/service/sbp \
interface/l1/cl1/common \
interface/protocol/nas_c2k \
interface/protocol/as_c2k/1xrtt \
interface/protocol/as_c2k/evdo \
interface/protocol/l2_c2k/common
INC_DIR += interface/service/mcf