rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | INC_DIR = |
| 2 | COMP_DEFS = |
| 3 | FOLDER_LIST = |
| 4 | # source file folder for xgen |
| 5 | GEN_FOLDER_LIST = $(strip $(BUILD_SYSDIR)) $(strip $(BUILD_CODEGENDIR)) |
| 6 | INC_DIR += $(strip $(BUILD_SYSDIR)) $(strip $(BUILD_CODEGENDIR)) |
| 7 | # Define source file lists to SRC_LIST |
| 8 | # Define source file folder to FOLDER_LIST |
| 9 | |
| 10 | FOLDER_LIST += $(GEN_FOLDER_LIST) |
| 11 | |
| 12 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 13 | $(foreach FILE,$(wildcard $(DIR)/*.c),$(FILE)) \ |
| 14 | ) |
| 15 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 16 | $(foreach FILE,$(wildcard $(DIR)/*.cpp),$(FILE)) \ |
| 17 | ) |
| 18 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 19 | $(foreach FILE,$(wildcard $(DIR)/*.s),$(FILE)) \ |
| 20 | ) |
| 21 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 22 | $(foreach FILE,$(wildcard $(DIR)/*.S),$(FILE)) \ |
| 23 | ) |
| 24 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 25 | $(foreach FILE,$(wildcard $(DIR)/*.dws),$(FILE)) \ |
| 26 | ) |
| 27 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 28 | $(foreach FILE,$(wildcard $(DIR)/*.rec),$(FILE)) \ |
| 29 | ) |
| 30 | |
| 31 | ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297) |
| 32 | SRC_LIST += custom/protocol/common/ps/custom_nras_config.c |
| 33 | endif |
| 34 | |
| 35 | ifeq ($(strip $(LGE_SECURITY)), TRUE) |
| 36 | INC_DIR += custom/modem/lgesecurity |
| 37 | endif |
| 38 | |
| 39 | |
| 40 | ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297P) |
| 41 | SRC_LIST += custom/protocol/common/ps/custom_nras_config.c |
| 42 | endif |
| 43 | |
| 44 | SRC_LIST := $(call uniq,$(SRC_LIST)) |
| 45 | |
| 46 | INC_DIR += driver/sys_drv/cache/inc |
| 47 | INC_DIR += driver/sys_drv/cache/inc/$(MD_VER_FOLDER) |
| 48 | |
| 49 | INC_DIR := $(call uniq,$(INC_DIR)) |
| 50 | |
| 51 | # Add gblob sml verify file |
| 52 | SRC_LIST += custom/middleware/common/custom_sml_sec_verify.c |
| 53 | |
| 54 | SRC_LIST += custom/middleware/common/custom_nvram_lid_prot.c |
| 55 | |
| 56 | # Define the specified compile options to COMP_DEFS |
| 57 | COMP_DEFS += __UCS2_ENCODING \ |
| 58 | MMI_ON_HARDWARE_P \ |
| 59 | APCS_INTWORK \ |
| 60 | USE_JAM=0 \ |
| 61 | COMPILER_SUPPORTS_LONG=1 |
| 62 | |
| 63 | ifeq ($(filter __NOR_FLASH_BOOTING__,$(strip $(DEFINES))),) |
| 64 | ifdef NEED_BUILD_BOOTLOADER |
| 65 | ifeq ($(strip $(NEED_BUILD_BOOTLOADER)),TRUE) |
| 66 | COMP_DEFS += __BL_ENABLE__ |
| 67 | COMP_DEFS += REMAPPING |
| 68 | endif |
| 69 | endif |
| 70 | endif |
| 71 | |
| 72 | ifeq ($(strip $(ENHANCED_SINGLE_BANK_NOR_FLASH_SUPPORT)),TRUE) |
| 73 | COMP_DEFS += REMAPPING |
| 74 | endif |