rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame^] | 1 | INC_DIR = |
| 2 | COMP_DEFS = |
| 3 | FOLDER_LIST = |
| 4 | |
| 5 | # Define source file lists to SRC_LIST |
| 6 | # Define source file folder to FOLDER_LIST |
| 7 | #modem |
| 8 | FOLDER_LIST += $(call CUSTOM_FLD_MAPPING,./custom/modem/ps) \ |
| 9 | custom/protocol/common/atp/src \ |
| 10 | custom/protocol/common/atci/src \ |
| 11 | custom/protocol/common/ps \ |
| 12 | ./custom/modem/common |
| 13 | |
| 14 | |
| 15 | #fdr_reorg |
| 16 | ifneq ($(strip $(TEST_LOAD_TYPE)),BASIC) |
| 17 | FOLDER_LIST += custom/protocol/common/ps |
| 18 | else |
| 19 | SRC_LIST += custom/protocol/common/ps/custom_em.c \ |
| 20 | custom/protocol/common/ps/ul1_nvram_def.c |
| 21 | endif |
| 22 | |
| 23 | |
| 24 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 25 | $(foreach FILE,$(wildcard $(DIR)/*.c),$(FILE)) \ |
| 26 | ) |
| 27 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 28 | $(foreach FILE,$(wildcard $(DIR)/*.cpp),$(FILE)) \ |
| 29 | ) |
| 30 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 31 | $(foreach FILE,$(wildcard $(DIR)/*.s),$(FILE)) \ |
| 32 | ) |
| 33 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 34 | $(foreach FILE,$(wildcard $(DIR)/*.S),$(FILE)) \ |
| 35 | ) |
| 36 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 37 | $(foreach FILE,$(wildcard $(DIR)/*.dws),$(FILE)) \ |
| 38 | ) |
| 39 | SRC_LIST += $(foreach DIR,$(FOLDER_LIST), \ |
| 40 | $(foreach FILE,$(wildcard $(DIR)/*.rec),$(FILE)) \ |
| 41 | ) |
| 42 | |
| 43 | # Not compile ul1_nvram_def_md93.c/ul1_nvram_def_md95.c |
| 44 | SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),ul1_nvram_def_md93.c),,$(file))) |
| 45 | SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),ul1_nvram_def_md95.c),,$(file))) |
| 46 | SRC_LIST := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Lower,$(file))),ul1_nvram_def_md97.c),,$(file))) |
| 47 | SRC_LIST := $(call uniq,$(SRC_LIST)) |
| 48 | |
| 49 | ifneq ($(filter BASIC,$(TEST_LOAD_TYPE)),) |
| 50 | SRC_LIST := $(filter-out custom/protocol/common/ps/custom_eas_config.c,$(SRC_LIST)) |
| 51 | else |
| 52 | ## For caband_gen |
| 53 | ifneq ($(strip $(MODIS_CONFIG)),TRUE) |
| 54 | SRC_LIST += $(strip $(PROJDIR))/custom/modem/eas_caband_tbl/eas_caband_tbl_v2.c |
| 55 | else |
| 56 | SRC_LIST += $(strip $(MODISPROJDIR))/_BUILD_XGEN/custom/modem/eas_caband_tbl/eas_caband_tbl_v2.c |
| 57 | endif |
| 58 | endif |
| 59 | |
| 60 | ifeq ($(filter __L5_SUPPORT__, $(strip $(MODULE_DEFS))),) |
| 61 | SRC_LIST := $(filter-out custom/protocol/common/ps/custom_l5.c,$(SRC_LIST)) |
| 62 | SRC_LIST := $(filter-out custom/protocol/common/ps/custom_l5_at.c,$(SRC_LIST)) |
| 63 | SRC_LIST := $(filter-out custom/protocol/common/ps/custom_l5_mipc.c,$(SRC_LIST)) |
| 64 | SRC_LIST := $(filter-out custom/protocol/common/ps/custom_l5_mbci.c,$(SRC_LIST)) |
| 65 | endif |
| 66 | |
| 67 | INC_DIR += custom/protocol/common/ps \ |
| 68 | $(call CUSTOM_FLD_MAPPING,./custom/modem/ps) \ |
| 69 | protocol/interface/l4misc \ |
| 70 | protocol/interface/l4 \ |
| 71 | protocol/layer4/l4/include \ |
| 72 | protocol/layer4/l4/atci/include \ |
| 73 | protocol/layer4/l4/l4c/include/common \ |
| 74 | protocol/layer4/l4/l4c/include/proc \ |
| 75 | protocol/layer4/l4/csm/cc/include \ |
| 76 | protocol/layer4/l4/uem/include \ |
| 77 | protocol/layer4/l4/phb/include \ |
| 78 | protocol/layer4/l4/csm/cc/include \ |
| 79 | protocol/layer4/l4/csm \ |
| 80 | protocol/layer4/l4/tcm/etcm/include \ |
| 81 | protocol/layer4/l4/smsal/include \ |
| 82 | protocol/layer4/l4/csm/ss/asn1/gen/include \ |
| 83 | protocol/layer4/l4/smu/include \ |
| 84 | protocol/layer4/l4/rac/common/include \ |
| 85 | protocol/layer4/l4/rac/ugrac/include \ |
| 86 | protocol/layer4/sim/include \ |
| 87 | interface/l1/gl1/internal |
| 88 | |
| 89 | ifeq ($(strip $(LGE_SECURITY)), TRUE) |
| 90 | INC_DIR += custom/modem/lgesecurity |
| 91 | endif |
| 92 | |
| 93 | ifdef RF_MODULE |
| 94 | ifneq ($(strip $(RF_MODULE)),NONE) |
| 95 | INC_DIR +=custom/l1/gl1_rf/$(strip $(RF_MODULE)) |
| 96 | endif |
| 97 | endif |
| 98 | |
| 99 | ifneq ($(strip $(EUTRAN_MODE_SUPPORT)),NONE) |
| 100 | INC_DIR += protocol/layer4/l4/rac/erac/include |
| 101 | endif |
| 102 | |
| 103 | INC_DIR += $(strip $(PROJDIR))/verno \ |
| 104 | $(strip $(PROJDIR))/nvram_auto_gen |
| 105 | |
| 106 | INC_DIR += driver/sys_drv/cache/inc |
| 107 | INC_DIR += driver/sys_drv/cache/inc/$(MD_VER_FOLDER) |
| 108 | INC_DIR += service/mtf/inc |
| 109 | |
| 110 | # ATCI is always needed. |
| 111 | INC_DIR += custom/protocol/common/atci/include |
| 112 | |
| 113 | # ATP is always needed. |
| 114 | INC_DIR += custom/protocol/common/atp/include |
| 115 | |
| 116 | ifeq ($(filter __MTK_TARGET__,$(strip $(MODULE_DEFS))),) |
| 117 | INC_DIR += MoDIS_VC9/drv_sim/include |
| 118 | endif |
| 119 | |
| 120 | INC_DIR := $(call uniq,$(INC_DIR)) |
| 121 | |
| 122 | |
| 123 | # Define the specified compile options to COMP_DEFS |
| 124 | COMP_DEFS += __UCS2_ENCODING \ |
| 125 | MMI_ON_HARDWARE_P \ |
| 126 | APCS_INTWORK \ |
| 127 | USE_JAM=0 \ |
| 128 | COMPILER_SUPPORTS_LONG=1 |
| 129 | |
| 130 | ifneq ($(words $(wildcard $(call CUSTOM_FLD_MAPPING,./custom/modem/ps)/custom_port_setting.c)), 0) |
| 131 | COMP_DEFS += __CUSTOMIZED_PORT_SETTING__ |
| 132 | endif |
| 133 | |
| 134 | INC_DIR += protocol/interface/ims |
| 135 | |
| 136 | INC_DIR += interface/l1/el1/external |
| 137 | |
| 138 | INC_DIR += interface/protocol/general |
| 139 | |
| 140 | #fdr_reorg |
| 141 | INC_DIR += interface/protocol/as_c2k/common \ |
| 142 | custom/protocol/common/ps \ |
| 143 | interface/l1/cl1/common \ |
| 144 | interface/protocol/nas_c2k \ |
| 145 | protocol/interface/general \ |
| 146 | protocol/interface/iwlan \ |
| 147 | interface/protocol/as_c2k/1xrtt \ |
| 148 | interface/protocol/as_c2k/evdo \ |
| 149 | interface/protocol/l2_c2k/common |
| 150 | |
| 151 | INC_DIR += service/kal/common/include |
| 152 | INC_DIR += service/kal/lib/mlib/include |
| 153 | INC_DIR += driver/sys_drv/init/inc |
| 154 | INC_DIR += service/sst/include |
| 155 | INC_DIR += driver/devdrv/elm/inc |
| 156 | INC_DIR += interface/driver/sib_drv/scc |
| 157 | INC_DIR += interface/driver/devdrv/pcie |
| 158 | |
| 159 | INC_DIR += protocol/interface/lte |
| 160 | INC_DIR += protocol/interface/agps |
| 161 | INC_DIR += protocol/interface/ddm |
| 162 | ifneq ($(filter __L5_SUPPORT__, $(strip $(MODULE_DEFS))),) |
| 163 | INC_DIR += interface/protocol/l5/mipc/common |
| 164 | INC_DIR += interface/protocol/l5/mipc/msg |
| 165 | INC_DIR += $(strip $(PROJDIR))/modem/mipc/include |
| 166 | endif |
| 167 | INC_DIR += interface/driver/dpcopro/custom |
| 168 | |
| 169 | INC_DIR += interface/service/icd \ |
| 170 | interface/service/icd/errc \ |
| 171 | interface/service/icd/nl1 \ |
| 172 | interface/service/icd/nl2 \ |
| 173 | interface/service/icd/el2 \ |
| 174 | interface/service/icd/el1 \ |
| 175 | interface/service/icd/event/enas \ |
| 176 | interface/service/icd/event/errc \ |
| 177 | interface/service/icd/event/nrrc \ |
| 178 | interface/service/icd/event/nl2 \ |
| 179 | interface/service/icd/event/el2 \ |
| 180 | interface/service/icd/event/nl1 \ |
| 181 | interface/service/icd/event/el1 \ |
| 182 | interface/service/icd/event/cm |
| 183 | |
| 184 | ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297) |
| 185 | CATEGORY_INCDIRS += protocol/interface/enl2/el2 |
| 186 | CATEGORY_INCDIRS += protocol/interface/enl2/en_common |
| 187 | else ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297P) |
| 188 | CATEGORY_INCDIRS += protocol/interface/enl2/el2 |
| 189 | CATEGORY_INCDIRS += protocol/interface/enl2/en_common |
| 190 | else |
| 191 | CATEGORY_INCDIRS += protocol/interface/el2 |
| 192 | endif |