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