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

📄 gsm2.mak

📁 MTK分布式编译需要修改的文件。配合incredibuild3就可以使用了。
💻 MAK
📖 第 1 页 / 共 5 页
字号:
#	based on .h generate .ptr
.h.ptr:
	@echo Preprocessing PS trace definition ... $<
	@if /I $(PROJECT) NEQ BASIC \
			(copy $(subst /,\,$<) ~$(basename $(notdir $(subst \,/,$<))).c >nul) & \
			($(CC) -E -DGEN_FOR_PC $(VIA) make\~inc_def.tmp -o $(strip $(TST_DB))\pstrace_db\$(basename $(notdir $(subst \,/,$<))).ptr ~$(basename $(notdir $(subst \,/,$<))).c 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\pstrace_db\$(basename $(notdir $(subst \,/,$<))).ptr >> $(CODE_GEN_LST)) & \
			(del ~$(basename $(notdir $(subst \,/,$<))).c)

# -----------------------------
# B ==> Base information
# P ==> Protocol trace information
# L ==> Layer 1 trace information
# G ==> Global variable information
# V ==> Layer 1 validation information
# U ==> GSM/GPRS Union Information
# -----------------------------

# -----------------------------
# Step 2: Generate Base Information
# -----------------------------
$(strip $(TST_DB))\msglog_db\BInfo :  $(TST_GEN_DEP_OUTS) $(PTR_GEN_OUTS) $(strip $(TSTDIR))\database\Tgt_Cnf
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate Base Information ...) & \
			($(CGEN) -c $(strip $(TST_DB))\msglog_db\pri.db $(strip $(TSTDIR))\database\Tgt_Cnf $(strip $(TSTDIR))\database\Pc_Cnf $(strip $(TST_DB))\msglog_db\BInfo $(strip $(TST_DB))\enumFile $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\msglog_db\BInfo >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TST_DB))\enumFile >> $(CODE_GEN_LST)) \
		)

# -----------------------------
# Step 3: Protocol trace information
# -----------------------------
#$(strip $(TST_DB))\pstrace_db\BPInfo : $(strip $(TST_DB))\msglog_db\BInfo
$(strip $(TST_GEN_DEP_STP3_OUTS)) : $(strip $(TST_GEN_DEP_STP3_SRCS))
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate PS Trace Information ...) & \
			($(CGEN) -ps $(strip $(TST_DB))\pstrace_db\BPInfo $(strip $(TST_DB))\msglog_db\BInfo $(strip $(TST_DB))\pstrace_db $(strip $(TST_DB))\pstrace_db\ps_trace.h 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\pstrace_db\BPInfo >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TST_DB))\msglog_db\BInfo >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TST_DB))\pstrace_db\ps_trace.h >> $(CODE_GEN_LST)) & \
			(del /q $(strip $(TST_DB))\msglog_db\BInfo > nul) \
		else \
			(echo Generate PS Trace Information ...) & \
			($(CGEN) -ps $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOMSRCP)) $(strip $(TST_DB))\BPLGUInfoCustomAppSrc $(strip $(TST_DB))\pstrace_db $(strip $(TST_DB))\pstrace_db\ps_trace.h 2>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOMSRCP)) >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TST_DB))\pstrace_db\ps_trace.h >> $(CODE_GEN_LST)) & \
			(del /q $(strip $(TST_DB))\BPLGUInfoCustomAppSrc > nul) \
		)

# -----------------------------
# Step 4: Layer 1 trace information
# -----------------------------
$(strip $(TST_DB))\l1trace_db\BPLInfo : $(strip $(TST_DB))\pstrace_db\BPInfo $(TMD_FILES)
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate L1 Trace Information ...) & \
			($(CGEN) -L1 $(strip $(TST_DB))\l1trace_db\BPLInfo $(strip $(TST_DB))\pstrace_db\BPInfo L1_CATCHER $(strip $(TSTDIR))\src\TrcMod.c $(strip $(TSTDIR))\include\TrcMod.h $(TMD_FILES) 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\l1trace_db\BPLInfo >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TSTDIR))\src\TrcMod.c >> $(CODE_GEN_LST)) & \
			(echo $(strip $(TSTDIR))\include\TrcMod.h >> $(CODE_GEN_LST)) \
		)
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(for /d %%i in ($(TMD_GEN_C_H_FILES)) do \
			   (echo %%i >> $(CODE_GEN_LST)) \
			) & \
			(del /q $(strip $(TST_DB))\pstrace_db\BPInfo > nul) \
		) 

# -----------------------------
# Step 5: Result temporary - Global variable information
# -----------------------------
$(strip $(TST_DB))\BPLGInfo : $(strip $(TST_DB))\l1trace_db\BPLInfo $(GV_FILES)
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate Global variable Information ...) & \
			($(CGEN) -gv $(strip $(TST_DB))\BPLGInfo $(strip $(TST_DB))\l1trace_db\BPLInfo $(strip $(TST_DB))\gv\ $(strip $(TSTDIR))\src\gvTbl.c 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\BPLGInfo >> $(CODE_GEN_LST)) & \
			(del /q $(strip $(TST_DB))\l1trace_db\BPLInfo > nul) \
		)

# -----------------------------
# Step 6:  Result - Layer 1 validation information (L1S)
# -----------------------------
$(strip $(TST_DB))\l1validation_db\BPLVInfo :  $(strip $(TST_DB))\BPLGInfo $(L1V_FILES)
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate L1 Validation Information ...) & \
			($(CGEN) -L1V $(strip $(TST_DB))\l1validation_db\BPLVInfo $(strip $(TST_DB))\BPLGInfo $(strip $(TST_DB))\l1validation_db\ 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\l1validation_db\BPLVInfo >> $(CODE_GEN_LST)) & \
			(del /q $(strip $(TST_DB))\BPLGInfo > nul) \
		)

# -----------------------------
# Step 7: Result - Union Information (GSM/GPRS)
#------------------------------
$(strip $(TST_DB))\BPLGUInfo :  $(strip $(TST_DB))\BPLGInfo $(strip $(TST_DB))\uniontag.txt
	@if /I $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Generate Union Information ...) & \
			($(CGEN) -un $(strip $(TST_DB))\BPLGUInfo $(strip $(TST_DB))\BPLGInfo $(strip $(TST_DB))\uniontag.txt 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(echo $(strip $(TST_DB))\BPLGUInfo >> $(CODE_GEN_LST)) & \
			(del /q $(strip $(TST_DB))\BPLGInfo > nul) \
		)

# ------------------------------------------
# Step 8: Result - Merge customization code
# ------------------------------------------
$(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) :  $(strip $(TST_DB))\BPLGUInfo
	@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 $(PROJECT) NEQ BASIC \
		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
			(echo Merge customization code ...) & \
			($(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) & \
			(@echo Compile app_parse_db.c) & \
			($(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) & \
			(@echo Compiling app_parse_db.c was done.) & \
			($(CGEN) -cm $(strip $(TST_DB))\BPLGUInfoCustom $(strip $(TST_DB))\BPLGUInfo $(strip $(TST_DB))\msglog_db\custom_pri.db $(strip $(TST_DB))\enumFileCustom $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			($(CGEN) -ap $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) $(strip $(TST_DB))\BPLGUInfoCustom $(strip $(TST_DB))\msglog_db\app_pri.db $(strip $(TST_DB))\enumFileCustomApp $(strip $(PLATFORM))_$(strip $(CHIP_VER)) $(strip $(VERNO)) $(FIXPATH)\plutommi 2>>$(CODE_GEN_LOG)) & \
			(if ERRORLEVEL 1 exit 1) & \
			(del /q $(strip $(TST_DB))\BPLGUInfo > nul) & \
			(del /q $(strip $(TST_DB))\BPLGUInfoCustom > nul) \
		)

# Disable Step 9 due to this flow is not used now.
# ------------------------------------------
# Step 9: Result - Split system checking and code gen (Split system)
# ------------------------------------------
#$(strip $(TST_DB))\BPLGUSplitInfo :  $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) $(strip $(TSTDIR))\database\Routing.txt $(strip $(TST_DB))\BPGUInfo_pc
#	@if /I $(PROJECT) NEQ BASIC \
#		(@if /I $(CUSTOM_RELEASE) EQU FALSE   \
#			(echo Generate Split System Information ...) & \
#			($(CGEN) -ss $(strip $(TST_DB))\BPLGUSplitInfo $(strip $(TST_DB))\$(strip $(BPLGUINFOCUSTOM)) $(strip $(TST_DB))\BPGUInfo_pc $(strip $(TSTDIR))\database\Routing.txt $(strip $(TSTDIR))\src\tst_routing.c 2>>$(CODE_GEN_LOG)) & \
#			(if ERRORLEVEL 1 exit 1) & \
#			(echo $(strip $(TST_DB))\BPLGUSplitInfo >> $(CODE_GEN_LST)) \
#		)


# *************************************************************************
# nvram_auto_gen
# *************************************************************************
nvram_auto_gen : 
#nvram_auto_gen : gencustominfo
	@tools\strcmpex.exe TRUE TRUE e make\~cus_opt.tmp $(foreach def,$(COM_DEFS),-D \"$(def)\")
	@tools\strcmpex.exe TRUE TRUE e make\~inc.tmp $(foreach inc,$(COMMINCDIRS),$(inc))

ifneq ($(strip $(call Upper,$(PROJECT))),BASIC)
	@if exist $(MMIDIR)\customer \
		((echo CUSTOM_FOLDER = $(foreach def,$(BOARD_VER),$(def))> tools\NVRAMStatistic\include\custom_option.txt) & \
		(echo MMI_FOLDER = $(foreach def,$(MMI_BASE),$(def))>> tools\NVRAMStatistic\include\custom_option.txt) & \
		(echo CUSTOM_OPTION = $(foreach def,$(BOARD_VER) $(PLATFORM) $(LCD_MODULE) $(EXT_CAM_MODULE) $(CMOS_SENSOR),-D "$(def)") \>> tools\NVRAMStatistic\include\custom_option.txt) & \
		(type make\~cus_opt.tmp >> tools\NVRAMStatistic\include\custom_option.txt))

	@if exist $(MMIDIR)\customer \
		(@perl -e "open F,'<make\~inc.tmp';my $$i=join('',<F>);close F;$$i =~s/\s+/ /gs;$$i =~ s/(\S+)/-I \"..\\..\\..\\$$1\"/gs;print \"CUSTOM_INC = $$i\";" > tools\NVRAMStatistic\include\custom_include.txt)

   #Output NVRAM info
	@if exist tools\NVRAMStatistic\include \
		(tools\NVRAMStatistic\NVRAMAutogen.bat $(strip $(CUSTOMER)))
endif

	@if exist $(strip $(TST_DB))\BPLGUInfoCustomAppSrc (del /q $(strip $(TST_DB))\BPLGUInfoCustomAppSrc)



# *************************************************************************
# Clean Generated Code Sources
# *************************************************************************
cleancodegen:
   # $(CODE_GEN_LST) should be copied to another place then delete
	-@if exist $(CODE_GEN_LST)						         \
		(copy $(CODE_GEN_LST) make\~codegenlis.tmp) &   \
		(@for /f %%i in ($(CODE_GEN_LST)) do 	         \
			(@if exist %%i	(del %%i))                                    \
		)

# *************************************************************************
#  Executable Targets
# *************************************************************************
$(BIN_FILE):
	@echo Linking $(strip $(NEWTARGNAME)) ...
	@perl tools\time.pl -n
	@echo $(LNKOPT) $(INITLIB)(bootarm.obj) > make\~libs.tmp
	@for /d %%i in ($(COMPLIST)) do \
		@if /I "%%i" NEQ "rompatch" \
		(echo $(COMPLIBDIR)\%%i.lib >> make\~libs.tmp)

ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
	@if /I "$(strip $(MAUI_IN_ROM))" EQU "TRUE" \
		echo $(CUS_MTK_LIB)\rompatch.lib(*) >> make\~libs.tmp
else
	@if /I "$(strip $(MAUI_IN_ROM))" EQU "TRUE" \
		echo $(COMPLIBDIR)\rompatch.lib(*) >> make\~libs.tmp
endif

ifneq ($(strip $(MTK_LIBS)),)
	@tools\strcmpex.exe abc abc e make\~libs_2.tmp $(MTK_LIBS)
	@perl tools\lnitem.pl make\~libs_2.tmp
	@type make\~libs_2.tmp >> make\~libs.tmp
	@del make\~libs_2.tmp
endif

ifneq ($(strip $(COMPOBJS)),)	
	@echo $(COMPOBJS)>> make\~libs.tmp
endif

	@if /I "$(strip $(MAUI_IN_ROM))" EQU "TRUE" \
		(echo $(ROM_IMG_FILE) >> make\~libs.tmp)

	@perl .\tools\sortLib.pl make\~libs.tmp $(strip $(COMPOBJS))
	@if /I %OS% EQU WINDOWS_NT \
		($(LINK) $(VIA) make\~sortedLibs.tmp > $(LOG) 2>&1) \
	else \
		($(LINK) $(VIA) make\~sortedLibs.tmp > $(LOG) )

   # -----------------------------
   # The size of the binary image depends on the available memory on the target
   # platform.
   # -----------------------------
	@echo Creating binary file $(BIN_FILE)
	$(BIN_CREATE) $(strip $(TARGDIR))\$(IMG_FILE) $(BIN_FORMAT) -output $(strip $(TARGDIR))\$(BIN_FILE)
ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
ifneq ($(findstring JRD,$(call Upper,$(strip $(CUSTOMER)))),)
	$(BIN_CREATE) $(strip $(TARGDIR))\$(IMG_FILE) -m32 -output $(strip $(TARGDIR))\$(patsubst %.bin,%.m32,$(strip $(BIN_FILE)))
endif
endif
	@if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM  \
		(@if /I "$(strip $(UID_SUPPORT))" EQU "TRUE"  .\tools\update_img.exe -sym $(strip $(TARGDIR))\$(TARGNAME).sym -path $(strip $(TARGDIR))\$(BIN_FILE)\ROM) & \
		(@if /I "$(strip $(NAND_FLASH_BOOTING))" NEQ "TRUE" \
		  (@echo Combine resource images with original ROM) & \
		  ($(CATBIN) -p $(strip $(TARGDIR))\$(BIN_FILE) -s $(SCATTERFILE) -o $(strip $(TARGDIR))\$(strip $(BIN_FILE))\JTAG_$(BIN_FILE)) \
		) & \
		(@if exist $(strip $(FLASHFILE)) \
			   (perl .\tools\append2.pl $(strip $(TARGDIR))\$(TARGNAME).sym $(strip $(FLASHFILE)) $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM $(call Upper,$(strip $(BIN_FILE))) $(VERNO) $(strip $(THE_MF)) $(MEMORY_CFG)) \
			else \
			   (perl .\tools\append2.pl $(strip $(TARGDIR))\$(TARGNAME).sym $(FLASH_CFG) $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM $(call Upper,$(strip $(BIN_FILE))) $(VERNO) $(strip $(THE_MF)) $(EMI_INFO)) \
		)

	@if not exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM  \
	   (@if /I "$(strip $(UID_SUPPORT))" EQU "TRUE"  .\tools\update_img.exe -sym $(strip $(TARGDIR))\$(TARGNAME).sym -path $(strip $(TARGDIR))\$(BIN_FILE)) & \
		(@if exist $(strip $(FLASHFILE)) \
			(perl .\tools\append2.pl $(strip $(TARGDIR))\$(TARGNAME).sym $(strip $(FLASHFILE)) $(strip $(TARGDIR))\$(BIN_FILE) $(call Upper,$(strip $(BIN_FILE))) $(VERNO) $(strip $(THE_MF)) $(MEMORY_CFG)) \
			else \
			(perl .\tools\append2.pl $(strip $(TARGDIR))\$(TARGNAME).sym $(FLASH_CFG) $(strip $(TARGDIR))\$(BIN_FILE) $(call Upper,$(strip $(BIN_FILE))) $(VERNO) $(strip $(THE_MF)) $(EMI_INFO)) \
		)

	@if exist .\tools\NFBPack3rdROM.pl \
	(if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM  \
		(perl .\tools\NFBPack3rdROM.pl $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ $(strip $(THE_MF)) \
		) \
	else \
		(perl .\tools\NFBPack3rdROM.pl $(strip $(TARGDIR))\ $(strip $(THE_MF))))

ifdef FOTA_ENABLE
ifneq ($(strip $(FOTA_ENABLE)),NONE)
	@if exist tools\fota_ext_name.pl \
	   (perl tools\fota_ext_name.pl $(CUSTOM_FOTA_H) > make\~fota_ext.tmp)

	@for /f %%i in (make\~fota_ext.tmp) do \
	(@if not exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM \
	  (if exist tools\fota.exe \
            tools\fota.exe -ch $(strip $(TARGDIR))\$(strip $(BIN_FILE)) %%i))
endif
endif

   # -----------------------------
   # Nothting related binary directly
   # -----------------------------
	@if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\__* (del /q $(strip $(TARGDIR))\$(strip $(BIN_FILE))\__*)
	@if exist $(strip $(TARGDIR))\__* (del /q $(strip $(TARGDIR))\__*)
	@if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM  \
		((@copy /y $(SCATTERFILE) $(strip $(TARGDIR))\$(strip $(BIN_FILE)) > nul) & \

⌨️ 快捷键说明

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