[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6

MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF  modem version: NA

Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/make/common/option.mak b/mcu/make/common/option.mak
new file mode 100644
index 0000000..f1d8a39
--- /dev/null
+++ b/mcu/make/common/option.mak
@@ -0,0 +1,792 @@
+#
+#  Copyright Statement:
+#  --------------------
+#  This software is protected by Copyright and the information contained
+#  herein is confidential. The software may not be copied and the information
+#  contained herein may not be used or disclosed except with the written
+#  permission of MediaTek Inc. (C) 2005
+#
+#  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+#  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+#  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+#  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+#  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+#  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+#  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+#  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+#  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+#  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+#  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+#
+#  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+#  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+#  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+#  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+#  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+#
+#  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+#  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+#  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+#  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+#  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+
+# *************************************************************************
+# Include GNU Make Standard Library (GMSL)
+# *************************************************************************
+include ./tools/GMSL/gmsl
+Upper = $(subst z,Z,$(subst y,Y,$(subst x,X,$(subst w,W,$(subst v,V,$(subst u,U,$(subst t,T,$(subst s,S,$(subst r,R,$(subst q,Q,$(subst p,P,$(subst o,O,$(subst n,N,$(subst m,M,$(subst l,L,$(subst k,K,$(subst j,J,$(subst i,I,$(subst h,H,$(subst g,G,$(subst f,F,$(subst e,E,$(subst d,D,$(subst c,C,$(subst b,B,$(subst a,A,$(1)))))))))))))))))))))))))))
+
+
+CUSTOM_FLD_MAPPING = $(if $($(subst /,_,$(patsubst %/,%,$(subst //,/,$(subst \,/,$(call lc, $(1))))))), \
+                     $($(subst /,_,$(patsubst %/,%,$(subst //,/,$(subst \,/,$(call lc, $(1))))))),\
+                     $(if $(wildcard $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/$(strip $(CUSTOM_FLAVOR))),\
+                     $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/$(strip $(CUSTOM_FLAVOR)),\
+                     $(if $(wildcard $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/DEFAULT), \
+                     $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/DEFAULT,)))
+
+                      
+AUTO_MERGE_FILE_CHECK = $(if $(shell $(LIST_DIR) "$(call CUSTOM_FLD_MAPPING,$(1))/$(2)"  2>$(DEV_NUL)), $(call CUSTOM_FLD_MAPPING,$(1))/$(2), \
+                        $(if $(shell $(LIST_DIR) "$(1)/_Default_BB/$(strip $(PLATFORM))/$(2)"  2>$(DEV_NUL)), $(1)/_Default_BB/$(strip $(PLATFORM))/$(2),))
+# *************************************************************************
+# Set defaul value to Ckmake flag
+# *************************************************************************
+DEPENDENCY_CONFLICT = FALSE
+# *************************************************************************
+# Dependency Check error message Interfaces
+# *************************************************************************
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_SETA_OR_SETB,OptA,ValA,OptB,ValB)
+#               $(call DEP_ERR_SETA_OR_SETB,OptA,ValA,OptB,ValB1/ValB2/.../ValBn)
+#               $(call DEP_ERR_SETA_OR_SETB,OptA,ValA,OptB,non ValB)
+# Output:       PLEASE set OptA as ValA or set OptB as ValB
+#               PLEASE set OptA as ValA or set OptB as ValB1/ValB2/.../ValBn
+#               PLEASE set OptA as ValA or set OptB as non ValB
+#
+# Example:      $(call DEP_ERR_SETA_OR_SETB,BROWSER_SUPPORT,OBIGO_Q05A,UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT,non OBIGO_Q05A)
+#               PLEASE set BROWSER_SUPPORT as OBIGO_Q05A or set UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT as non OBIGO_Q05A
+# ------------------------------------------------------------------------
+DEP_ERR_SETA_OR_SETB = $(warning ERROR: PLEASE set $1 as $2 or set $3 as $4)
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_ONA_OR_OFFB,OptA,OptB)
+#               $(call DEP_ERR_ONA_OR_OFFB,OptA,OptB$OptC&...&OptN)
+# Output:       PLEASE turn on OptA or turn off OptB
+#
+# Example:      $(call DEP_ERR_ONA_OR_OFFB,NAND_SUPPORT,NAND_FLASH_BOOTING)
+#               PLEASE turn on NAND_SUPPORT or turn off NAND_FLASH_BOOTING
+# ------------------------------------------------------------------------
+DEP_ERR_ONA_OR_OFFB = $(warning ERROR: PLEASE turn on $1 or turn off $2)
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_SETA_OR_OFFB,OptA,ValA,OptB)
+#               $(call DEP_ERR_SETA_OR_OFFB,OptA,ValA1/ValA2/.../ValAn,OptB)
+#               $(call DEP_ERR_SETA_OR_OFFB,OptA,non ValA,OptB)
+# Output:       PLEASE set OptA as ValA or turn off OptB
+#               PLEASE set OptA as ValA1/ValA2/.../ValAn or turn off OptB
+#               PLEASE set OptA as non ValA or turn off OptB
+#
+# Example:      $(call DEP_ERR_SETA_OR_OFFB,MELODY_VER,DSP_WT_SYN,J2ME_SUPPORT)
+#               PLEASE set MELODY_VER as DSP_WT_SYN or turn off J2ME_SUPPORT
+# ------------------------------------------------------------------------
+DEP_ERR_SETA_OR_OFFB = $(warning ERROR: PLEASE set $1 as $2 or turn off $3)
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_SETA_OR_ONB,OptA,ValA,OptB)
+#               $(call DEP_ERR_SETA_OR_ONB,OptA,ValA1/ValA2/.../ValAn,OptB)
+#               $(call DEP_ERR_SETA_OR_ONB,OptA,non ValA,OptB)
+# Output:       PLEASE set OptA as ValA or turn on OptB
+#               PLEASE set OptA as ValA1/ValA2/.../ValAn or turn on OptB
+#               PLEASE set OptA as non ValA or turn on OptB
+#
+# Example:      $(call DEP_ERR_SETA_OR_ONB,MMS_SUPPORT,non OBIGO_Q05A,UNIFIED_MESSAGE_FOLDER)
+#               PLEASE set MMS_SUPPORT as non OBIGO_Q05A or turn on UNIFIED_MESSAGE_FOLDER
+# ------------------------------------------------------------------------
+DEP_ERR_SETA_OR_ONB = $(warning ERROR: PLEASE set $1 as $2 or turn on $3)
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_OFFA_OR_OFFB,OptA,OptB)
+# Output:       PLEASE turn off OptA or turn off OptB
+#
+# Example:      $(call DEP_ERR_OFFA_OR_OFFB,CMUX_SUPPORT,BLUETOOTH_SUPPORT)
+#               PLEASE turn off CMUX_SUPPORT or turn off BLUETOOTH_SUPPORT
+# ------------------------------------------------------------------------
+DEP_ERR_OFFA_OR_OFFB = $(warning ERROR: PLEASE turn off $1 or turn off $2)
+# ------------------------------------------------------------------------
+# Usage:        $(call DEP_ERR_ONA_OR_ONB,OptA,OptB)
+# Output:       PLEASE turn on OptA or turn on OptB
+#
+# Example:      $(call DEP_ERR_ONA_OR_ONB,UCM_SUPPORT,VOIP_SUPPORT)
+#               PLEASE turn on UCM_SUPPORT or turn on VOIP_SUPPORT
+# ------------------------------------------------------------------------
+DEP_ERR_ONA_OR_ONB = $(warning ERROR: PLEASE turn on $1 or turn on $2)
+# *************************************************************************
+# Set defaul value to eliminate "option not define" warning
+# *************************************************************************
+BM_NEW      = FALSE
+COMPOBJS =
+
+SUPPORT_PLATFORM = TK6291 ELBRUS MT6763 MT6295M MT6739 MT6771 MT3967 MT6779 MT6297 MT6885 MERCURY MT6873 MT6853 MT6893 MT6833  MT6880 MT6890 MT6877 MT2735
+
+ifndef PROJECT_NAME
+$(error PROJECT_NAME is not defined)
+endif
+ifndef PROJECT_MAKEFILE
+$(error PROJECT_MAKEFILE is not defined)
+endif
+ifndef FLAVOR
+$(error FLAVOR is not defined)
+endif
+
+# *************************************************************************
+# Include temporary build script
+# *************************************************************************
+
+# default cmd setting
+include make/common/cmd_cfg.mak
+
+-include make/common/Verno.bld
+ifneq ($(wildcard make/common/Verno.bld),)
+ifdef VERNO
+MTK_INTERNAL_VERNO := $(strip $(VERNO))
+endif
+endif
+
+HW_VER := $(call Upper,$(strip $(PROJECT_NAME)))_HW
+
+
+include $(PROJECT_MAKEFILE)
+include make/common/buildconfig.mak
+-include make/common/build_warning_def.mak
+-include $(strip $(TMPDIR))/~buildinfo.tmp
+-include $(strip $(TMPDIR))/~net_path.tmp
+-include $(strip $(TMPDIR))/cus_folder.tmp
+include $(strip $(MAKE_COMMON))/compiler.mak
+
+VERNO := $(call Upper,$(strip $(VERNO)))
+
+ifndef CUSTOM_FLAVOR
+$(error CUSTOM_FLAVOR is not defined)
+endif
+
+
+# *************************************************************************
+# Determine to build in which domain
+# *************************************************************************
+# Default MPD 5G release
+MPD_SOURCE_FULL_BUILD = FALSE
+ifneq ($(wildcard make/common/rel/mpd/5g),)
+  MPD_SOURCE_FULL_BUILD = TRUE
+endif
+
+# Default MPD 4G release
+MPD_SOURCE_4G_BUILD = FALSE
+ifneq ($(wildcard make/common/rel/mpd/4g),)
+  MPD_SOURCE_4G_BUILD = TRUE
+endif
+
+# Default SWRD release
+MTK_SW_DOMAIN = FALSE
+ifneq ($(wildcard make/common/rel/hq/USR.txt),)
+  ifeq ($(wildcard make/common/rel/mpd),)
+    MTK_SW_DOMAIN = TRUE
+  endif
+endif
+
+# Default custom release
+ifndef CUSTOM_RELEASE
+  CUSTOM_RELEASE = FALSE
+endif
+
+# *************************************************************************
+# Common definitions
+# *************************************************************************
+
+COMMINCDIRS    += $(CUSTOM_COMMINC)
+COM_DEFS       += $(CUSTOM_OPTION)
+
+NEED_BUILD_BOOTLOADER = FALSE
+
+# MD OFFLOAD COPRO Setting
+MD_COPRO_CONFIG := FALSE
+FORCE_GEN       := FALSE
+
+# always off
+DHL_MALMO_SUPPORT  = FALSE
+CSD_SUPPORT        = NONE
+FEATURE_OVERLOAD   = FALSE
+HIF_SDIO_SUPPORT   = FALSE
+MDSYS              = NONE
+NVRAM_PSEUDO_MERGE = OFF
+OP01_2G_ONLY       = FALSE
+
+# always on
+AEC_ENABLE = TRUE
+DRV_DEBUG_MEMORY_TRACE_SUPPORT = TRUE
+
+COM_DEFS += __HW_PFC_SUPPORT__
+COM_DEFS += __USB_COMPORT_SUPPORT_MTK_DRIVER__
+COM_DEFS += __DISABLE_A5_2__
+COM_DEFS += PMIC_INIT_PHONE_ON_EVB
+COM_DEFS += __IPV6__ __IPV4V6__
+COM_DEFS += __VAMOS_1__ __VAMOS_2__
+COM_DEFS += __R99__
+COM_DEFS += __CENTRALIZED_SLEEP_MANAGER__
+COM_DEFS += __L1_GPS_CO_CLOCK_SUPPORT__
+COM_DEFS += __L1_LOCK_AFCDAC_AT_STARTUP_SUPPORT__
+COM_DEFS += __L1_CRYSTAL_ON_PMIC_SUPPORT__
+COM_DEFS += __MMRF_BSIBPIRS_DYNAMIC_ALLOCATION_SUPPORT__
+COM_DEFS += __CGLA__ __UICC_CHANNEL_SUPPORT__
+COM_DEFS += __SIM_RECOVERY_ENHANCEMENT__
+COM_DEFS += __USIM_SUPPORT__ __EF_NETPAR_SUPPORT__ __PHB_USIM_SUPPORT__
+COM_DEFS += __SLIM_MODEM_EM_MODE__ __MODEM_EM_MODE__
+ifneq ($(strip $(UE_SIMULATOR)),TRUE)
+  COM_DEFS += __TAS_SUPPORT__
+endif
+ifeq ($(filter BASIC,$(TEST_LOAD_TYPE)),)
+  COM_DEFS += __3G_NEW_DATA_PLANE_ARCH__ __RATDM_UL_SHAQ__ __RATDM_SHAQ_HAS_PRIORITY_QUEUE__ __CSHSPA_SUPPORT__
+  ifeq ($(strip $(UMTS_TDD_SUPPORT)),UMTS_TDD128_MODE_SUPPORT)
+    COM_DEFS += __UMTS_TDD128_BAND_A__
+    COM_DEFS += __UMTS_TDD128_BAND_F__
+  endif
+  COM_DEFS += __UL2_HSPA_PLUS_RX_COPRO__
+  COM_DEFS += __UL2_HSPA_PLUS_TX_COPRO__
+  COM_DEFS += __AOC_SUPPORT__
+  COM_DEFS += __ECC_RETRY_ENHANCEMENT__
+  COM_DEFS += __REL4__ __GERAN_R4__
+  COM_DEFS += __REL5__ __GERAN_R5__
+  COM_DEFS += __2G_RF_CUSTOM_TOOL_SUPPORT__
+  ifneq ($(strip $(UE_SIMULATOR)), TRUE)
+    COM_DEFS += MTK_SLEEP_ENABLE
+  endif
+endif
+ifeq ($(filter L1S BASIC,$(TEST_LOAD_TYPE)),)
+  COM_DEFS += __IS_BYTECOPY_SUPPORT__
+  COM_DEFS += __RFC2507_SUPPORT__
+endif
+ifeq ($(strip $(TEST_LOAD_TYPE)),NONE)
+  COM_DEFS += __RLC_HSDPA_COPRO__ __MAC_HSDPA_COPRO__
+  COM_DEFS += __L2_HSUPA_COPRO__
+  COM_DEFS += __CTM_SUPPORT__
+endif
+# custom option
+COM_DEFS += __MANUAL_MODE_NW_SEL__
+COM_DEFS += __AT_ESWM_SUPPORT__
+COM_DEFS += __CHECK_SYMBOL_MULTIPLE_DEFINITION__
+COM_DEFS += __DRV_NO_USB_CHARGER__
+COM_DEFS += DRV_USB_FORCE_TRIGGER_ONE_EINT
+COM_DEFS += MSDC_MMC40_SUPPORT
+COM_DEFS += __R6_OOS__
+COM_DEFS += __SMP_ARCH__
+COM_DEFS += __USB_HIGH_SPEED_COM_PORT_ENABLE__
+ifeq ($(filter BASIC,$(TEST_LOAD_TYPE)),)
+  COM_DEFS += __DYNAMIC_HSPA_PREFERENCE__
+  COM_DEFS += __KAL_CROSS_CORE_SUPPORT__
+  COM_DEFS += __NBR_CELL_INFO__
+  COM_DEFS += TK6268_FPGA1
+  COM_DEFS += __UMTS_NEW_ARCH__
+endif
+ifeq ($(strip $(TEST_LOAD_TYPE)),BASIC)
+  COM_DEFS += MRS_NOT_PRESENT
+endif
+ifeq ($(strip $(TEST_LOAD_TYPE)),L1S)
+  COM_DEFS += UL1_PHASE4_TEST
+endif
+ifeq ($(strip $(TEST_LOAD_TYPE)),NONE)
+  ifdef MODEM_SPEC
+    ifneq ($(strip $(MODEM_SPEC)),MTK_MODEM_C2K)
+      COM_DEFS += __CHANNEL_LOCK__
+    endif
+  endif
+endif
+ifeq ($(filter __FPGA__,$(strip $(COM_DEFS))),)
+  ifneq ($(strip $(UE_SIMULATOR)),TRUE)
+    COM_DEFS += __SATCC__  __SATCE__  __SATCL__
+    COM_DEFS += __SATCZ__  __SATCAA__
+  endif
+endif
+
+#Custom Option for SE3 UT
+ifneq ($(strip $(UE_SIMULATOR)),TRUE)
+  ifeq ($(strip $(MODIS_CONFIG)),TRUE)
+      COM_DEFS += __L4C_GPRS_UT__ __L4BPDN_UT__
+      COM_DEFS += __EM_MODE__ __MODEM_EM_MODE__ UNIT_TEST __TCM_UT__ __TCM_UGTCM_UT__
+      COM_DEFS += __IPV6__ __IPV4V6__ __REL7__ __REL8__
+      COM_DEFS += __SP_GEMINI_3G_SWITCH__ __NRSPCA__
+      COM_DEFS += __SM_UT__ __IPV6_8960_RD_INTERNAL_TEST__ __SM_PRESERVE_RT_PDP_SEVERAL_SECONDS__
+      COM_DEFS += __TCM_RAT_TCM_UT__
+      COM_DEFS += __PAM_UT__
+
+      #RATDM UT
+      COM_DEFS += __RATDM_UT__
+
+      #PDCP/RABM UT
+      COM_DEFS += __PDCP_UT__ __PDCP_LOOPBACK_UT__
+
+      #LLC UT
+      COM_DEFS += __LLC_UT__
+
+      #SNDCP UT
+      COM_DEFS += __SNDCP_UT__ SND_UT_FLC
+
+      ifeq ($(strip $(IMS_SUPPORT)),TRUE)
+        COM_DEFS += __IMS_SUPPORT__
+      endif
+
+      #CSD UT
+      #CSD support is removed from Project Make
+
+      #Removed due to PS1 request (Hope UT logic is same with real target)
+      #COM_DEFS += __MULTI_CARRIER_HSDPA__=3
+      #COM_DEFS += __DCHSUPA_ADJ_FREQ_SUPPORT__
+  endif
+endif
+
+# *************************************************************************
+# COM_DEFS_FOR_xxx defined
+# *************************************************************************
+# Platform Options
+COM_DEFS_FOR_FPGA = FPGA
+COM_DEFS_FOR_$(strip $(PLATFORM)) = $(strip $(PLATFORM)) $(strip $(PLATFORM))_$(strip $(CHIP_VER))
+
+ifeq ($(strip $(PLATFORM)),MT6893)
+  COM_DEFS_FOR_MT6893 += MT6885 MT6885_$(strip $(CHIP_VER))
+endif
+
+COM_DEFS_FOR_PLATFORM =  COM_DEFS_FOR_$(strip $(PLATFORM))
+
+# RF Module Options
+#add for UESIM project
+COM_DEFS_FOR_MT6176_UMTS_FDD = MT6176_RF MT6176_UMTS_FDD
+COM_DEFS_FOR_MT6176_LTE      = MT6176_RF MT6176_LTE_RF
+COM_DEFS_FOR_MT6179_LTE      = MT6179_RF MT6179_LTE_RF
+
+COM_DEFS_FOR_RF_MODULE       =  COM_DEFS_FOR_$(strip $(RF_MODULE))
+
+ifdef UMTS_RF_MODULE
+ifneq ($(strip $(UMTS_RF_MODULE)),NONE)
+  COM_DEFS_FOR_RF_MODULE =  COM_DEFS_FOR_$(strip $(UMTS_RF_MODULE))
+endif
+endif
+
+ifdef UMTS_TDD128_RF_MODULE
+ifneq ($(strip $(UMTS_TDD128_RF_MODULE)),NONE)
+  COM_DEFS_FOR_RF_MODULE =  COM_DEFS_FOR_$(strip $(UMTS_TDD128_RF_MODULE))
+endif
+endif
+
+ifdef LTE_RF_MODULE
+ifneq ($(strip $(LTE_RF_MODULE)),NONE)
+  COM_DEFS_FOR_RF_MODULE =  COM_DEFS_FOR_$(strip $(LTE_RF_MODULE))
+endif
+endif
+
+# BAND_SUPPORT Options
+COM_DEFS_FOR_PGSM900   = __PGSM900__
+COM_DEFS_FOR_EGSM900   = __EGSM900__
+COM_DEFS_FOR_RGSM900   = __RGSM900__
+COM_DEFS_FOR_DCS1800   = __DCS1800__
+COM_DEFS_FOR_PCS1900   = __PCS1900__
+COM_DEFS_FOR_GSM850    = __GSM850__
+COM_DEFS_FOR_GSM450    = __GSM450__
+COM_DEFS_FOR_DUAL900   = __EGSM900__ __DCS1800__
+COM_DEFS_FOR_TRIPLE    = __EGSM900__ __DCS1800__ __PCS1900__
+COM_DEFS_FOR_QUAD      = __EGSM900__ __DCS1800__ __PCS1900__  __GSM850__
+COM_DEFS_FOR_DUAL850   = __GSM850__ __PCS1900__
+COM_DEFS_FOR_TRIPLE850 = __GSM850__ __DCS1800__ __PCS1900__  TRIPLE850
+
+COM_DEFS_FOR_BAND_SUPPORT =  COM_DEFS_FOR_$(strip $(BAND_SUPPORT))
+# BAND_SUPPORT Options end
+
+# AFC_VCXO_TYPE Options
+COM_DEFS_FOR_VCXO       = AFC_VCXO
+COM_DEFS_FOR_VCXO_SC    = AFC_VCXO AFC_SC
+COM_DEFS_FOR_VCXO_TC    = AFC_VCXO AFC_TC
+COM_DEFS_FOR_VCXO_SC_TC = AFC_VCXO AFC_SC AFC_TC
+COM_DEFS_FOR_VCXO_2G    = AFC_VCXO_2G
+
+COM_DEFS_FOR_AFC_VCXO_TYPE =  COM_DEFS_FOR_$(strip $(AFC_VCXO_TYPE))
+# AFC_VCXO_TYPE Options end
+
+# *************************************************************************
+# parameter config in para_def.mak
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/para_def.mak
+
+# *************************************************************************
+# Component Compile Options
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/common_def.mak
+
+# *************************************************************************
+# Components list
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/complist_def.mak
+
+# *************************************************************************
+# Common include path
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/commincdirs_def.mak
+
+# *************************************************************************
+# L1 TMD Files
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/tmd_def.mak
+
+# *************************************************************************
+# Component trace definition header files
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/trace_def.mak
+
+# *************************************************************************
+# Include checkvalue.mak to check invalid feature values.
+# *************************************************************************
+-include make/common/checkvalue.mak
+-include make/common/old_features.mak
+
+# *************************************************************************
+# Include MPD specail compile settings.
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/mpd_sp_def.mak
+
+
+# *************************************************************************
+# Check rel setting and decide for REL_SRC_COMP(_SW)/REL_MTK_COMP(_SW) 
+# *************************************************************************
+
+#For custom UCR package
+ifneq ($(strip $(RELEASE_PACKAGE)), REL_INTERNAL)
+  include make/common/rel/$(strip $(RELEASE_PACKAGE)).mak
+endif
+CUS_REL_SRC_COMP_CUST := $(filter $(REL_SRC_COMP),$(COMPLIST))
+CUS_REL_MTK_COMP_CUST := $(filter $(REL_MTK_COMP),$(COMPLIST))
+
+ifneq ($(strip $(CUSTOM_RELEASE)),TRUE)
+  #Check internal(MPD/SWRD) rel setting
+  include make/common/rel/REL_SUB_MPD_5G.mak
+  
+  ifneq ($(NO_PCIBT),TRUE)
+    #Check if module is not defined in internal domain
+    ifneq ($(filter-out $(REL_SUB_COMP), $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST)),)
+      $(warning ERROR: $(filter-out $(REL_SUB_COMP), $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST)) is NOT defined in MTK internal domain, please add module to REL_SUB_xxx.mak)
+      $(warning Please refer http://wiki/display/MOLY/How+to+add+a+new+module for internal rel setting.)
+      DEPENDENCY_CONFLICT = TRUE
+    endif
+
+    #Check if module is not defined in custom domain
+    ifneq ($(strip $(MODIS_CONFIG)),TRUE)
+     ifneq ($(filter-out $(REL_CR_COMP), $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST)),)
+      $(warning ERROR: $(filter-out $(REL_CR_COMP), $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST)) is NOT defined in custom domain, please add module to REL_CR_xxx.mak)
+      $(warning Please refer http://wiki/display/MOLY/How+to+add+a+new+module for custom rel setting.)
+      DEPENDENCY_CONFLICT = TRUE
+     endif
+    endif
+
+    #For MPD 5G check
+    REL_FIVEG_SRC_COMP  := $(REL_SRC_COMP_SUB_MPD_5G)
+    ifneq ($(filter-out $(REL_FIVEG_SRC_COMP),$(FIVEG_COMP)),)
+      $(warning ERROR: $(filter-out $(REL_FIVEG_SRC_COMP),$(FIVEG_COMP)) is added to FIVEG_COMP and should be defined as REL_SRC_COMP_MPD_5G in REL_SUB_MPD_5G.mak)
+      $(warning Please refer http://wiki/display/MOLY/How+to+add+a+new+module for MPD srel etting.)
+      DEPENDENCY_CONFLICT = TRUE
+    endif
+
+    #For MPD 4G check
+    REL_FOURG_SRC_COMP  := $(REL_SRC_COMP_SUB_MPD_4G)
+    ifneq ($(filter-out $(REL_FOURG_SRC_COMP),$(FOURG_COMP)),)
+      $(warning ERROR:$(filter-out $(REL_FOURG_SRC_COMP),$(FOURG_COMP)) is added to FIVEG_COMP and should be defined as REL_SRC_COMP_MPD_4G in REL_SUB_MPD_4G.mak)
+      $(warning Please refer http://wiki/display/MOLY/How+to+add+a+new+module for MPD rel setting.)
+      DEPENDENCY_CONFLICT = TRUE
+    endif
+
+    #For MPD common/ SWRD check
+    REL_COMMON_SRC_COMP := $(REL_SRC_COMP_SUB_MPD_COMMON) $(REL_SRC_COMP_SUB_SW)
+    ifneq ($(filter-out $(REL_COMMON_SRC_COMP),$(filter-out $(FIVEG_COMP)$(FOURG_COMP),$(COMPLIST))),)
+      $(warning ERROR:$(filter-out $(REL_COMMON_SRC_COMP),$(filter-out $(FIVEG_COMP)$(FOURG_COMP),$(COMPLIST))) is added to COMPLIST and should be defined in REL_SUB_MPD_COMMON.mak or REL_SUB_SW.mak)
+      $(warning Please refer http://wiki/display/MOLY/How+to+add+a+new+module for other MPD setting.)
+      DEPENDENCY_CONFLICT = TRUE
+    endif
+  endif
+
+  ifeq ($(MPD_SOURCE_FULL_BUILD), TRUE)
+    #For SWRD USR package
+    CUS_REL_SRC_COMP_SW := $(filter $(REL_SRC_COMP_SW),$(COMPLIST))
+    CUS_REL_MTK_COMP_SW := $(filter $(REL_MTK_COMP_SW),$(COMPLIST))
+
+  # Dedide for REL_SRC_COMP/REL_MTK_COMP in each domain
+  else ifeq ($(strip $(MPD_SOURCE_4G_BUILD)),TRUE)
+    include make/common/rel/REL_SUB_MPD_4G.mak
+  else ifeq ($(strip $(MTK_SW_DOMAIN)),TRUE)
+    include make/common/rel/REL_SUB_SW.mak
+  else
+    include make/common/rel/REL_SUB_MPD_COMMON.mak
+  endif
+endif 
+
+# *************************************************************************
+# EXTRA_LTE settings.
+# *************************************************************************
+SP_LTE_COMP += emm esm etc eval
+
+ifneq ($(wildcard $(LTE_SRC_FDR)),)
+COMPLIST += $(SP_LTE_COMP)
+endif
+
+AUTO_MERGE_FLR = ./custom/driver/audio ./custom/driver/drv/misc_drv
+AUTO_MERGE_PTH = $(foreach DIR,$(AUTO_MERGE_FLR),$(call CUSTOM_FLD_MAPPING,$(DIR)) $(DIR)/_Default_BB/$(strip $(PLATFORM)))
+COMMINCDIRS := $(AUTO_MERGE_PTH) $(COMMINCDIRS)
+
+# *************************************************************************
+# COMPOBJS compile settings.
+# *************************************************************************
+
+CUST_REL_LIB := $(wildcard ./cust_rel_lib/lib*.a)
+ifneq ($(strip $(CUST_REL_LIB)),)
+  COMPOBJS += $(strip $(CUST_REL_LIB))
+endif
+
+ifeq ($(strip $(SMART_PHONE_CORE)),ANDROID_MODEM)
+  ifdef MTK_BT_CHIP
+    ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)
+      COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libcvsd_codec.a
+      COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libmsbc_codec.a
+    else
+      COMPOBJS += driver/audio/lib/MTKGCC/libcvsd_codec.a
+      COMPOBJS += driver/audio/lib/MTKGCC/libmsbc_codec.a
+    endif
+  else
+    ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)
+      COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libcvsd_codec.a
+      COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libmsbc_codec.a
+    else
+      COMPOBJS += driver/audio/lib/MTKGCC/libcvsd_codec.a
+      COMPOBJS += driver/audio/lib/MTKGCC/libmsbc_codec.a
+    endif
+  endif
+    
+  ifeq ($(strip $(VOLTE_SUPPORT)),TRUE)
+    ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)
+	    #COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libdtmf.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg711.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg711plc.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg722.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg726.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg729.a
+	    COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libg7231.a
+    else
+	    COMPOBJS += driver/audio/lib/MTKGCC/libdtmf.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg711.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg711plc.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg722.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg726.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg729.a
+	    COMPOBJS += driver/audio/lib/MTKGCC/libg7231.a
+    endif
+  endif
+ 
+  ifdef TEST_LOAD_TYPE
+    ifeq ($(strip $(TEST_LOAD_TYPE)),NONE)
+      ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)    
+         COMPOBJS += driver/audio/lib/MTKGCC_SHAOLIN/libblisrc.a
+         CUS_REL_OBJ_LIST += driver/audio/lib/MTKGCC_SHAOLIN/libblisrc.a
+      else
+         COMPOBJS += driver/audio/lib/MTKGCC/libblisrc.a
+         CUS_REL_OBJ_LIST += driver/audio/lib/MTKGCC/libblisrc.a
+      endif
+    endif
+  endif
+endif
+
+ifdef SSS_SUPPORT
+  ifeq ($(strip $(SSS_SUPPORT)),SSS_LIB)
+    ifeq ($(strip $(COMPILER)),GCC)
+      ifneq ($(filter MIPS32 MIPS16 NANOMIPS,$(strip $(COMPILER_ISA))),)
+        ifneq ($(filter MIPS32 MIPS16,$(strip $(COMPILER_ISA))),)
+          COMPOBJS += service/sss/lib/libsss_gcc_sv5.a
+        endif
+        ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)
+          COMPOBJS += service/sss/lib/libsss_gcc_NANOMIPS.a
+        endif
+      else
+        $(warning ERROR: sss can not support compiler $(strip $(COMPILER_ISA), please check!)
+        DEPENDENCY_CONFLICT = TRUE
+      endif
+        CUS_REL_OBJ_LIST += ./service/sss/lib/sss_gcc_sv5.lib
+    else
+       $(warning ERROR: sss can not support compiler $(strip $(COMPILER), please check!)
+       DEPENDENCY_CONFLICT = TRUE
+    endif
+  endif
+  ifeq ($(strip $(SSS_SUPPORT)),SSS_SOURCE)
+    ifeq ($(strip $(COMPILER)),GCC)
+      ifneq ($(filter MIPS32 MIPS16,$(strip $(COMPILER_ISA))),)      
+        SSS_SOURCE_COPY_DST := service/sss/lib/libsss_gcc_sv5.a
+      endif
+      ifeq ($(strip $(COMPILER_ISA)),NANOMIPS)
+        SSS_SOURCE_COPY_DST := service/sss/lib/libsss_gcc_NANOMIPS.a
+      endif
+    endif
+  endif
+endif
+
+# BASIC projects do not need L1_UTMD_FILES
+ifeq ($(strip $(TEST_LOAD_TYPE)),BASIC)
+  L1_UTMD_FILES :=
+endif
+
+# catcher_filter config file
+include interface/service/logging_database/XDD/Catcher_filters_Setting.mak
+
+#####################################################################
+# No whole archive lib (the libs list in below will not check symbol multiple definition)
+#####################################################################
+NO_WHOLE_ARCHIVE_LIB := custom
+
+#####################################################################
+# DSP ASE MODULES define
+#####################################################################
+# lib release, SMP in all core
+DSP_ASE_MODULES := audio
+
+# *************************************************************************
+# Dependency rule
+# *************************************************************************
+include $(strip $(MAKE_COMMON))/rule_def/dep_def.mak
+
+COMP_TRACE_DEFS = $(COMP_TRACE_DEFS_MODEM)
+
+# *************************************************************************
+# Include extra dependency check.
+# *************************************************************************
+-include make/common/extra_dep.mak
+
+ALL_COMPLIST := $(sort $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST))
+# Generate CUS_REL_SRC_COMP/REL_MTK_COMP
+CUS_REL_SRC_COMP_TEMP := $(filter $(REL_SRC_COMP),$(ALL_COMPLIST))
+CUS_REL_SRC_COMP += $(CUS_REL_SRC_COMP_TEMP)
+
+CUS_REL_MTK_COMP_TEMP := $(filter $(REL_MTK_COMP),$(ALL_COMPLIST))
+CUS_REL_MTK_COMP += $(CUS_REL_MTK_COMP_TEMP)
+
+# Remove the REMOVE_CUSTOM_OPTION specified in project makefile from COM_DEFS
+COM_DEFS  := $(filter-out $(REMOVE_CUSTOM_OPTION),$(COM_DEFS))
+
+###########################################
+
+ifeq ($(strip $(ATEST_SYS_ENABLE)),TRUE)
+include make/module/middleware/internal/atest_sys.mak
+endif
+
+ifdef VARIATION_PROJ
+  ifneq ($(strip $(VARIATION_PROJ)),)
+    include make/common/variation/$(strip $(VARIATION_PROJ)).mak
+    ALL_COMPLIST := $(sort $(FIVEG_COMP) $(FOURG_COMP) $(COMPLIST))
+    CUS_REL_SRC_COMP_TEMP := $(filter $(REL_SRC_COMP) $(CUS_REL_SRC_COMP),$(ALL_COMPLIST))
+    CUS_REL_SRC_COMP := $(CUS_REL_SRC_COMP_TEMP)
+    CUS_REL_MTK_COMP_TEMP := $(filter $(REL_MTK_COMP) $(CUS_REL_MTK_COMP),$(ALL_COMPLIST))
+    CUS_REL_MTK_COMP := $(CUS_REL_MTK_COMP_TEMP)
+  endif
+endif
+
+# consistency check for ALL_COMPLIST & CUS_REL_XXX_COMP
+# check each comp in $(CUS_REL_XXX_COMP) if it has been put in $(ALL_COMPLIST)
+CREL_COMP_NOT_COMPLIST  = $(filter-out $(ALL_COMPLIST),$(CUS_REL_SRC_COMP) $(CUS_REL_PAR_SRC_COMP) $(CUS_REL_MTK_COMP))
+# CREL_COMP_NOT_COMPLIST := $(filter-out fota,$(CREL_COMP_NOT_COMPLIST))
+ifneq ($(words $(CREL_COMP_NOT_COMPLIST)),0)
+  $(warning ERROR: $(foreach comp,$(CREL_COMP_NOT_COMPLIST),"$(comp)") in CUS_REL_XXX_COMP but NOT in COMPLIST)
+  DEPENDENCY_CONFLICT = TRUE
+endif
+
+# check no module define in $(CUS_REL_SRC_COMP) and $(CUS_REL_MTK_COMP) both
+COMP_BOTH_IN_SRC_MTK = $(filter $(CUS_REL_SRC_COMP),$(CUS_REL_MTK_COMP))
+ifneq ($(words $(COMP_BOTH_IN_SRC_MTK)),0)
+  $(warning ERROR: $(foreach comp,$(COMP_BOTH_IN_SRC_MTK),"$(comp)") in CUS_REL_SRC_COMP but also in CUS_REL_MTK_COMP)
+  DEPENDENCY_CONFLICT = TRUE
+endif
+
+# COMPLIST(during CUSTOM_RELEASE)      = CUS_REL_SRC_COMP + CUS_REL_PAR_SRC_COMP
+ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
+  COMPLIST = $(strip $(CUS_REL_SRC_COMP))
+else
+  ifeq ($(strip $(MTK_SW_DOMAIN)),TRUE)
+    COMPLIST = $(strip $(CUS_REL_SRC_COMP))
+  endif
+endif
+
+# *************************************************************************
+# Check whether module is source code build in sub
+# *************************************************************************
+
+# check the COM_DEFS value
+COM_DEFS_INVALID_LIST := TRUE FALSE ENABLE DISABLE FULL SLIM NONE
+ifdef COM_DEFS
+  COM_DEFS_INVALID_VALUE := $(filter $(strip $(COM_DEFS)),$(COM_DEFS_INVALID_LIST))
+  ifneq ($(COM_DEFS_INVALID_VALUE),)
+    $(warning ERROR: COM_DEFS value ($(strip $(COM_DEFS_INVALID_VALUE))) is NOT allowable, please do Not assign COM_DEFS value as : ($(strip $(COM_DEFS_INVALID_LIST)))) 
+    DEPENDENCY_CONFLICT = TRUE 
+  endif
+endif
+
+# L1_UTMD_FILES check: the LTE security files can NOT be added to L1_UTMD_FILES.
+ifdef L1_UTMD_FILES
+L1_UTMD_FILES_TEMP := $(filter protocol/lte_sec/% ,$(L1_UTMD_FILES))
+L1_UTMD_FILES_TEMP := $(filter l1/lte_sec/% ,$(L1_UTMD_FILES_TEMP))
+  ifneq ($(strip $(L1_UTMD_FILES_TEMP)),)
+    $(warning ERROR: L1_UTMD_FILES value $(foreach comp,$(L1_UTMD_FILES_TEMP),"$(comp)") is NOT allowable,)
+    $(warning ERROR: the LTE security files can NOT be added to L1_UTMD_FILES.)
+    DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+# COMP_TRACE_DEFS_MODEM check: the LTE security files can NOT be added to COMP_TRACE_DEFS_MODEM
+ifdef COMP_TRACE_DEFS_MODEM
+COMP_TRACE_DEFS_MODEM_TEMP := $(filter protocol/lte_sec/% ,$(COMP_TRACE_DEFS_MODEM))
+COMP_TRACE_DEFS_MODEM_TEMP := $(filter l1/lte_sec/% ,$(COMP_TRACE_DEFS_MODEM_TEMP))
+  ifneq ($(strip $(COMP_TRACE_DEFS_MODEM_TEMP)),)
+    $(warning ERROR: COMP_TRACE_DEFS_MODEM value $(foreach comp,$(COMP_TRACE_DEFS_MODEM_TEMP),"$(comp)") is NOT allowable,)
+    $(warning ERROR: the LTE security files can NOT be added to COMP_TRACE_DEFS_MODEM.)
+    DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+# L1_UTMD_FILES_LTE_SEC check: only the LTE security files can be added.
+ifdef L1_UTMD_FILES_LTE_SEC
+L1_UTMD_FILES_LTE_SEC_TEMP := $(filter-out protocol/lte_sec/% ,$(L1_UTMD_FILES_LTE_SEC))
+L1_UTMD_FILES_LTE_SEC_TEMP := $(filter-out l1/lte_sec/% ,$(L1_UTMD_FILES_LTE_SEC_TEMP))
+  ifneq ($(strip $(L1_UTMD_FILES_LTE_SEC_TEMP)),)
+    #$(warning ERROR: L1_UTMD_FILES_LTE_SEC value $(foreach comp,$(L1_UTMD_FILES_LTE_SEC_TEMP),"$(comp)") is NOT allowable,)
+    #$(warning ERROR: only the LTE security files can be added to L1_UTMD_FILES_LTE_SEC.)
+    #DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+# COMP_TRACE_DEFS_MODEM_LTE_SEC check: only the LTE security files can be added.
+ifdef COMP_TRACE_DEFS_MODEM_LTE_SEC
+COMP_TRACE_DEFS_MODEM_LTE_SEC_TEMP := $(filter-out protocol/lte_sec/% ,$(COMP_TRACE_DEFS_MODEM_LTE_SEC))
+COMP_TRACE_DEFS_MODEM_LTE_SEC_TEMP := $(filter-out l1/lte_sec/% ,$(COMP_TRACE_DEFS_MODEM_LTE_SEC_TEMP))
+  ifneq ($(strip $(COMP_TRACE_DEFS_MODEM_LTE_SEC_TEMP)),)
+    #$(warning ERROR: COMP_TRACE_DEFS_MODEM_LTE_SEC value $(foreach comp,$(COMP_TRACE_DEFS_MODEM_LTE_SEC_TEMP),"$(comp)") is NOT allowable,)
+    #$(warning ERROR: only the LTE security files can be added to COMP_TRACE_DEFS_MODEM_LTE_SEC.)
+    #DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+ifeq ($(strip $(CUSTOM_RELEASE)),FALSE)
+  ifneq ($(strip $(FLAVOR)), $(strip $(ORIGINAL_FLAVOR)))
+   $(warning ERROR: ORIGINAL_FLAVOR value should be $(FLAVOR))
+   DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+ifeq ($(strip $(CUSTOM_RELEASE)),FALSE)
+  ifneq ($(strip $(PROJECT_NAME)), $(strip $(ORIGINAL_PROJECT_NAME)))
+   $(warning ERROR: ORIGINAL_PROJECT_NAME value should be $(PROJECT_NAME))
+   DEPENDENCY_CONFLICT = TRUE
+  endif
+endif
+
+# temp add
+UNIVERSAL_DATABASE_SUPPORT = TRUE
+
+COMMINCDIRS := $(sort $(COMMINCDIRS))
+
+ifdef DEPENDENCY_CONFLICT
+  ifeq ($(strip $(DEPENDENCY_CONFLICT)),TRUE)
+    $(error PLEASE check above dependency errors!)
+  endif
+endif