⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gsm2.mak

📁 MTK分布式编译需要修改的文件。配合incredibuild3就可以使用了。
💻 MAK
📖 第 1 页 / 共 5 页
字号:
	endif
else
   NEED_COPY_MMIFEATURE = CUSTOMER_MMI

   ifeq ($(strip $(MMI_VERSION)),PLUTO_MMI)
		NEED_COPY_MMIFEATURE = PLUTO_MMI
	endif

	ifeq ($(strip $(MMI_VERSION)),NEPTUNE_MMI)
		NEED_COPY_MMIFEATURE = NEPTUNE_MMI
	endif

endif

ifeq ($(call Upper,$(PROJECT)),BASIC)
	NEED_COPY_MMIFEATURE = NONE
endif

ifeq ($(call Upper,$(PROJECT)),L1S)
	NEED_COPY_MMIFEATURE = NONE
endif

# *************************************************************************
# Search Paths
# *************************************************************************
vpath
vpath %.h   $(subst \,/,$(dir $(COMP_TRACE_DEFS)))
vpath %.ptr $(subst \,/,$(strip $(TST_DB))\pstrace_db)
vpath %.dep $(subst \,/,$(strip $(RULESDIR)))
vpath %.lib $(strip $(OBJSDIR))\lib

vpath %.bin $(strip $(TARGDIR))

# *************************************************************************
#  Implicit Rules and Compiler Options
# *************************************************************************
BIN_FILE       =  $(strip $(NEWTARGNAME)).bin
IMG_FILE       =  $(strip $(TARGNAME)).elf
CODE_GEN_LST	=  $(strip $(TST_DB))\codegen.lis
ROM_IMG_FILE   =  rompatch\$(strip $(PLATFORM))\$(strip $(CHIP_VER))\ROMSA_$(strip $(PLATFORM))_$(strip $(CHIP_VER)).sym
# *************************************************************************
#  Settings for BOOTLOADER
# *************************************************************************
BTLDVERNODIR   =  $(strip $(FIXPATH))\BootLoader\src
BTLD_PREFIX    =  $(strip $(CUSTOMER))_BOOTLOADER_$(strip $(BTLD_VERNO))_$(strip $(PLATFORM))_$(strip $(PURE_VERNO))
BTLD_BIN_FILE  =  $(strip $(BTLD_PREFIX)).bin
BTLD_SCATTERFILE	=	.\bootloader\src\scatter\scatBL_$(strip $(PLATFORM)).txt
BTLDLNKOPT     = $(strip $(LNKOPT)) -scatter $(BTLD_SCATTERFILE) \
                  -output $(strip $(TARGDIR))\$(BTLD_PREFIX).elf \
                  -symdefs $(strip $(TARGDIR))\$(BTLD_PREFIX).sym \
                  -list $(strip $(TARGDIR))\$(BTLD_PREFIX).lis \
                  -libpath $(DIR_ARMLIB)
-include $(BTLDVERNODIR)\verno_bootloader.bld
# *************************************************************************
#  Settings for FOTA
# *************************************************************************
# FOTA bin file name (cannot contain MAUI in FOTA bin file name)
FOTA_PREFIX    =  $(strip $(CUSTOMER))_FOTA_$(strip $(PLATFORM))_$(strip $(FOTA_PURE_VERNO))
FOTA_BIN_FILE  =  $(strip $(FOTA_PREFIX)).bin
CUSTOM_FOTA_H = $(strip $(FIXPATH))\custom\system\$(strip $(BOARD_VER))\custom_fota.h
FOTA_SCATTERFILE	=	.\fota\src\scatter\scatFOTA.txt
FOTALNKOPT     = $(strip $(LNKOPT)) -scatter $(FOTA_SCATTERFILE) \
                  -output $(strip $(TARGDIR))\$(FOTA_PREFIX).elf \
                  -symdefs $(strip $(TARGDIR))\$(FOTA_PREFIX).sym \
                  -list $(strip $(TARGDIR))\$(FOTA_PREFIX).lis \
                  -libpath $(DIR_ARMLIB)
# *************************************************************************
# New Build
# *************************************************************************
ifeq ($(strip $(call Upper,$(LEVEL))),VENDOR)
new : cleanall cleanlog cleanbin emiclean emigen resgen remake
else
  ifneq (,$(findstring $(strip $(PLATFORM)), $(strip $(NAND_FLASH_BOOTING_SUPPORT_PLATFORM))))
    ifeq ($(strip $(NAND_FLASH_BOOTING)),TRUE)
      ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen umts_gen codegen asnregen operator_check_lite $(BTLD_BIN_FILE) update
      else
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen codegen asnregen operator_check_lite $(BTLD_BIN_FILE) update  
      endif
    else
      ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen umts_gen codegen asnregen operator_check_lite update
      else
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen codegen asnregen operator_check_lite update
      endif
    endif
  else
    ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen umts_gen codegen asnregen operator_check_lite update
    else
new : cleanall emiclean emigen cmmgen mmi_feature_check asngen codegen asnregen operator_check_lite update
    endif
  endif
endif

# *************************************************************************
#  Update Build
# *************************************************************************
#update : cleanlog cleanbin mcddll_update codegen resgen cksysdrv remake
ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
  ifeq ($(strip $(CUSTOM)),MONZA29)
update : cleanlog codegen remake
  else
   ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
update : cleanlog cleanbin umts_gen mcddll_update codegen cksysdrv resgen remake
   else
update : cleanlog cleanbin mcddll_update codegen cksysdrv resgen remake
   endif
  endif
else
  ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
update : cleanlog cleanbin umts_gen mcddll_update codegen resgen cksysdrv remake
  else
update : cleanlog cleanbin mcddll_update codegen resgen cksysdrv remake
  endif
endif


# *************************************************************************
#  Remake Build
# *************************************************************************
ifeq ($(strip $(call Upper,$(REMAKE_MODS))),BOOTLOADER)
remake : $(BTLD_BIN_FILE) done
else
ifeq ($(strip $(call Upper,$(REMAKE_MODS))),FOTA)
remake : $(FOTA_BIN_FILE) done
else
ifdef FOTA_ENABLE
ifneq ($(strip $(FOTA_ENABLE)),NONE)
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) $(FOTA_BIN_FILE) done
else
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) done
endif
else
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) done
endif
endif
endif

# *************************************************************************
#  Tools code preprocess and generation
# *************************************************************************
ifeq  ($(strip $(call Upper,$(PROJECT))),UMTS)
code_generate: cleancodegen asngen umts_gen codegen asnregen mcddll_update done
else
code_generate: cleancodegen asngen codegen asnregen mcddll_update done
endif

# ---------------------------------------
# 3G Codegen Gen Files: ASN and DBME
# ---------------------------------------
umts_gen:
	(cd uas) &  \
	(uas_generate.bat) &  \
	(cd ..) &  \

# ---------------------------------------
# MCDDLL update
# ---------------------------------------
mcddll_update: codegen
ifneq ($(strip $(CUSTOM_RELEASE)),TRUE)
ifneq ($(call Upper,$(strip $(PROJECT))),L1S)
ifneq ($(call Upper,$(strip $(PROJECT))),BASIC)
	(cd ps) &  \
	(cd mcddll) &  \
    (perl updatemcddll_msvc.pl $(call Upper,$(strip $(PROJECT)))) &  \
    (cd ..) &  \
    (cd ..) &  \
	(copy /y ps\mcddll\mcddll.dll $(strip $(TST_DB))\mcddll.dll > nul)
endif
endif
endif
# -----------------------------
# Asn Gen Files
# -----------------------------
asngen:
   # XXX!!!. Temporary solution for customer engagement
	@if /I $(CUSTOMER) EQU PLUTO   \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(copy /z init\src\Pluto_idma.c init\src\idma.c) & \
			(copy /z init\include\Pluto_idma_out.h init\include\idma_out.h) & \
			(copy /z init\src\Pluto_bootarm.s init\src\bootarm.s) & \
			(copy /z init\src\Pluto_init.c init\src\init.c) \
		)

	-@if /I $(PROJECT) NEQ L1S   \
		(@if /I $(PROJECT) NEQ BASIC   \
			(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
				(@if /I $(MCD_SUPPORT) EQU TRUE   \
					(md ps\gen) & \
					(@echo Generate ASN Gen Files 1st Phase ...) & \
					(cd ps\tools) & \
					(perl ./mcdparser.pl mcd.ini --only=$(PROJECT) --define="$(CUSTOM_OPTION)") & \
					(cd ..\..) \
				else \
					(@echo Generate ASN Gen Files ...) & \
					(cd ps) & \
					(generate.bat) & \
					(@echo Generate ASN Gen Files Done ...) \
				) \
			) \
		)


asnregen:
	-@if /I $(PROJECT) NEQ L1S   \
		(@if /I $(PROJECT) NEQ BASIC   \
			(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
				(@if /I $(MCD_SUPPORT) EQU TRUE   \
					(@echo Generate ASN Gen Files 2nd Phase ...) & \
					(cd ps\tools) & \
					(perl ./mcdparser.pl mcd.ini  --only=$(PROJECT) --only=for_catcher --define="$(CUSTOM_OPTION)") & \
					(cd ..\..) \
				) \
			) \
		)


codegen : gencustominfo operator_check gencustomlists nvram_auto_gen $(CODEGEN_RESULT)
	-@if exist $(strip $(INFOMAKELOG)) \
		echo COMP_TRACE_DEFS = $(call sort, $(foreach def,$(COMP_TRACE_DEFS),$(def))) >> $(INFOMAKELOG)

# -----------------------------
# Step 1: Preprocess
# -----------------------------
$(TST_GEN_DEP_OUTS) : $(TST_GEN_DEP_SRCS)
	@echo Check Directories ...
	-@if not exist $(strip $(TST_DB)) \
		md $(TST_DB)

	-@if not exist $(strip $(TST_DB))\msglog_db \
		md $(strip $(TST_DB))\msglog_db

	-@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(@if not exist $(strip $(L1TRACE_DB_DIR)) \
				(md $(strip $(L1TRACE_DB_DIR))) \
			) & \
			(@if not exist $(strip $(L1VAL_DB_DIR)) \
				(md $(strip $(L1VAL_DB_DIR))) \
			) \
		)

	-@if not exist $(strip $(PSTRACE_DB_DIR)) \
		md $(strip $(PSTRACE_DB_DIR))

	-@if not exist $(strip $(GV_DB_DIR)) \
		md $(strip $(GV_DB_DIR))

	@echo Preprocessing C source code ...

	@tools\strcmpex.exe def def e make\~inc_def.tmp $(foreach def,$(COM_DEFS),-D$(def))
	@echo -D__NULL_DEF__ >> make\~inc_def.tmp

	@perl tools\echoLongString2.pl make\~inc_def.tmp -D $(COM_DEF_PATH)

#	@for /d %%i in ($(COM_DEF_PATH)) do \
#		(for /F %%j in (%%i) do \
#			(echo -D%%j >> make\~inc_def.tmp) \
#		) & \
#		(echo %%i > nul)

	@tools\strcmpex.exe inc inc e make\~inc.tmp $(foreach inc,$(COMMINCDIRS),-I$(inc))
	@type make\~inc.tmp >> make\~inc_def.tmp


	@if /I $(CUSTOM_RELEASE) EQU FALSE \
		@echo Compile parse_db.c ... & \
		($(CC) -E -DGEN_FOR_CPARSER -DGEN_FOR_PC $(VIA) make\~inc_def.tmp -USTDC_HEADERS -o $(strip $(TST_DB))\msglog_db\pri.db $(strip $(TSTDIR))\database\msglog_db\parse_db.c 2>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1) & \
		(@echo $(strip $(TST_DB))\msglog_db\pri.db > $(CODE_GEN_LST)) & \
		(@echo Compiling parse_db.c was done.) \
	else \
	  (if /I $(PROJECT) NEQ BASIC \
		($(CC) -E -DGEN_FOR_CPARSER -DGEN_FOR_PC $(VIA) make\~inc_def.tmp -USTDC_HEADERS -o $(strip $(TST_DB))\msglog_db\custom_pri.db $(strip $(TSTDIR))\database\msglog_db\custom_parse_db.c 2>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1) & \
		(if /I $(MTK_SUBSIDIARY) EQU TRUE \
		($(CC) -E -DGEN_FOR_CPARSER -DGEN_FOR_PC $(VIA) make\~inc_def.tmp -USTDC_HEADERS -o $(strip $(TST_DB))\msglog_db\app_pri.db $(strip $(TSTDIR))\database\msglog_db\app_parse_db.c 2>>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1)) & \
		(if $(words $(strip $(BPLGUINFOCUSTOM))) NEQ 1 ((@echo More than two $(strip $(BPLGUINFOCUSTOM)). Please check.) & \
		 (exit 644))) \
	  )
	@if /I $(CUSTOM_RELEASE) EQU TRUE \
		(if /I $(PROJECT) NEQ BASIC \
		(if /I $(MTK_SUBSIDIARY) EQU TRUE \
		($(CGEN) -cm $(strip $(TST_DB))\BPLGUInfoCustomSrc $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) $(strip $(TST_DB))\msglog_db\custom_pri.db $(strip $(TST_DB))\enumFileCustomSrc $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) 2>>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1) & \
		($(CGEN) -ap $(strip $(TST_DB))\BPLGUInfoCustomAppSrc $(strip $(TST_DB))\BPLGUInfoCustomSrc $(strip $(TST_DB))\msglog_db\app_pri.db $(strip $(TST_DB))\enumFileCustomAppSrc $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) 2>>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1) & \
		(del /q $(strip $(TST_DB))\BPLGUInfoCustomSrc) & \
		(del /q $(strip $(TST_DB))\enumFileCustomSrc) \
		else \
		($(CGEN) -cm $(strip $(TST_DB))\BPLGUInfoCustomAppSrc $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) $(strip $(TST_DB))\msglog_db\custom_pri.db $(strip $(TST_DB))\enumFileCustomAppSrc $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) 2>>$(CODE_GEN_LOG)) & \
		(if ERRORLEVEL 1 exit 1)) & \
		(@echo $(strip $(TST_DB))\BPLGUInfoCustomAppSrc > $(CODE_GEN_LST)) \
	  )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -