📄 gsm2.mak
字号:
(if exist $(strip $(TARGDIR))\$(strip $(BTLD_BIN_FILE)) \
(@if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\$(strip $(BTLD_BIN_FILE)) del $(strip $(TARGDIR))\$(strip $(BIN_FILE))\$(strip $(BTLD_BIN_FILE))) & \
(copy /Y $(strip $(TARGDIR))\$(strip $(BTLD_BIN_FILE)) $(strip $(TARGDIR))\$(strip $(BIN_FILE)) > nul)) \
) \
else \
(copy /y $(SCATTERFILE) $(strip $(TARGDIR)) > nul)
@if exist $(strip $(MMI_FEATURES_FILE)) (copy /y $(strip $(MMI_FEATURES_FILE)) $(strip $(TARGDIR)) > nul)
@if exist $(strip $(MMI_FEATURES_SWITCH_FILE)) (copy /y $(strip $(MMI_FEATURES_SWITCH_FILE)) $(strip $(TARGDIR)) > nul)
@if exist $(strip $(THE_MF)) (copy /y $(strip $(THE_MF)) $(strip $(TARGDIR)) > nul)
# *************************************************************************
# FOTA Targets
# *************************************************************************
fota: $(FOTA_BIN_FILE) done
del_fota:
ifneq ($(strip $(FOTA_ENABLE)),NONE)
@-if not exist $(TARGDIR) (md $(TARGDIR)) \
else \
(@if exist $(strip $(TARGDIR))\$(FOTA_BIN_FILE) (del $(strip $(TARGDIR))\$(FOTA_BIN_FILE))) & \
(@if exist $(strip $(TARGDIR))\$(FOTA_PREFIX).elf (del $(strip $(TARGDIR))\$(FOTA_PREFIX).elf)) & \
(@if exist $(strip $(TARGDIR))\$(FOTA_PREFIX).lis (del $(strip $(TARGDIR))\$(FOTA_PREFIX).lis)) & \
(@if exist $(strip $(TARGDIR))\$(FOTA_PREFIX).sym (del $(strip $(TARGDIR))\$(FOTA_PREFIX).sym)) & \
(@if exist $(strip $(TARGDIR))\$(FOTA_PREFIX).htm (del $(strip $(TARGDIR))\$(FOTA_PREFIX).htm)) & \
(@if exist $(strip $(TARGDIR))\*.log (del /q $(strip $(TARGDIR))\*.log))
endif
$(FOTA_BIN_FILE): del_fota
ifneq ($(strip $(FOTA_ENABLE)),NONE)
-@if not exist $(COMPLOGDIR) (md $(COMPLOGDIR)) \
else (@if exist $(strip $(COMPLOGDIR))\fota.log (del /q $(strip $(COMPLOGDIR))\fota.log))
-@if not exist $(PROJDIR) (md $(PROJDIR))
-@if not exist $(OBJSDIR) (md $(OBJSDIR))
@echo Generate FOTA CMM file ...
@perl .\tools\fota_NocodeCMMAutoGen.pl themf=$(strip $(THE_MF)) verno=$(strip $(FOTA_PURE_VERNO)) \
> FOTA_$(strip $(CUSTOMER))_$(strip $(PLATFORM))_nocode.cmm
-@if not exist $(strip $(OBJSDIR))\fota (md $(strip $(OBJSDIR))\fota) \
else (@if exist $(strip $(OBJSDIR))\fota\*.obj (del $(strip $(OBJSDIR))\fota\*.obj))
-@if not exist $(strip $(COMPLIBDIR)) (md $(COMPLIBDIR)) \
else (@if exist $(strip $(COMPLIBDIR))\fota.lib (del $(strip $(COMPLIBDIR))\fota.lib))
-@if not exist $(RULESDIR) (md $(RULESDIR)) \
else (@if exist $(strip $(RULESDIR))\fota.dep (del $(strip $(RULESDIR))\fota.dep))
@tools\make.exe -fmake\gsm2.mak -r -R CUSTOMER=$(strip $(CUSTOMER)) PROJECT=$(strip $(PROJECT)) fota.lib
@echo Linking $(strip $(FOTA_PREFIX)) ...
@perl tools\time.pl -n
@echo $(FOTALNKOPT) > make\~libs.tmp
@echo $(strip $(COMPLIBDIR))\fota.lib(*) >> make\~libs.tmp
@echo $(LINK) $(VIA) 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) )
@echo Creating binary file $(FOTA_BIN_FILE)
@echo $(BIN_CREATE) $(strip $(TARGDIR))\$(FOTA_PREFIX).elf $(BIN_FORMAT) -output $(strip $(TARGDIR))\$(FOTA_BIN_FILE)
$(BIN_CREATE) $(strip $(TARGDIR))\$(FOTA_PREFIX).elf $(BIN_FORMAT) -output $(strip $(TARGDIR))\$(FOTA_BIN_FILE)
endif
# *************************************************************************
# BOOTLOADER Targets
# *************************************************************************
bootloader: $(BTLD_BIN_FILE) done
$(BTLD_BIN_FILE): gen_bl_verno
ifneq (,$(findstring $(strip $(PLATFORM)), $(strip $(NAND_FLASH_BOOTING_SUPPORT_PLATFORM))))
ifeq ($(strip $(NAND_FLASH_BOOTING)),TRUE)
@-if not exist $(TARGDIR) (md $(TARGDIR)) \
else \
(@if exist $(strip $(TARGDIR))\$(BTLD_BIN_FILE) (del $(strip $(TARGDIR))\$(BTLD_BIN_FILE))) & \
(@if exist $(strip $(TARGDIR))\$(BTLD_PREFIX).elf (del $(strip $(TARGDIR))\$(BTLD_PREFIX).elf)) & \
(@if exist $(strip $(TARGDIR))\$(BTLD_PREFIX).lis (del $(strip $(TARGDIR))\$(BTLD_PREFIX).lis)) & \
(@if exist $(strip $(TARGDIR))\$(BTLD_PREFIX).sym (del $(strip $(TARGDIR))\$(BTLD_PREFIX).sym)) & \
(@if exist $(strip $(TARGDIR))\$(BTLD_PREFIX).htm (del $(strip $(TARGDIR))\$(BTLD_PREFIX).htm)) & \
(@if exist $(strip $(TARGDIR))\*.log (del /q $(strip $(TARGDIR))\*.log))
-@if not exist $(COMPLOGDIR) (md $(COMPLOGDIR)) \
else (@if exist $(strip $(COMPLOGDIR))\bootloader.log (del /q $(strip $(COMPLOGDIR))\bootloader.log))
-@if not exist $(PROJDIR) (md $(PROJDIR))
-@if not exist $(OBJSDIR) (md $(OBJSDIR))
-@if not exist $(strip $(OBJSDIR))\bootloader (md $(strip $(OBJSDIR))\bootloader) \
else (@if exist $(strip $(OBJSDIR))\bootloader\*.obj (del $(strip $(OBJSDIR))\bootloader\*.obj))
-@if not exist $(strip $(COMPLIBDIR)) (md $(COMPLIBDIR)) \
else (@if exist $(strip $(COMPLIBDIR))\bootloader.lib (del $(strip $(COMPLIBDIR))\bootloader.lib))
-@if not exist $(RULESDIR) (md $(RULESDIR)) \
else (@if exist $(strip $(RULESDIR))\bootloader.dep (del $(strip $(RULESDIR))\bootloader.dep))
@tools\make.exe -fmake\gsm2.mak -r -R CUSTOMER=$(strip $(CUSTOMER)) PROJECT=$(strip $(PROJECT)) bootloader.lib
@echo Linking $(strip $(BTLD_PREFIX)) ...
@perl tools\time.pl -n
@echo $(BTLDLNKOPT) > make\~libs.tmp
@echo $(strip $(COMPLIBDIR))\bootloader.lib(*) >> 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) )
@echo Creating binary file $(BTLD_BIN_FILE)
$(BIN_CREATE) $(strip $(TARGDIR))\$(BTLD_PREFIX).elf $(BIN_FORMAT) -output $(strip $(TARGDIR))\$(BTLD_BIN_FILE)
@perl .\tools\bl_append.pl $(strip $(TARGDIR))\$(strip $(BTLD_BIN_FILE)) $(strip $(BTLDVERNODIR))\bl_verno.c $(strip $(BTLD_SCATTERFILE)) $(strip $(THE_MF))
@if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\ROM \
(if exist $(strip $(TARGDIR))\$(strip $(BIN_FILE))\$(strip $(BTLD_BIN_FILE)) \
del $(strip $(TARGDIR))\$(strip $(BIN_FILE))\$(strip $(BTLD_BIN_FILE))) & \
copy /Y $(strip $(TARGDIR))\$(strip $(BTLD_BIN_FILE)) $(strip $(TARGDIR))\$(strip $(BIN_FILE)) > nul
endif
endif
# *************************************************************************
# Generate Bootloader VersionNo
# *************************************************************************
gen_bl_verno:
@echo Generate BOOTLOADER CMM file ...
@perl .\tools\bl_NocodeCMMAutoGen.pl plat=$(strip $(PLATFORM)) board_ver=$(strip $(BOARD_VER)) \
custom=$(strip $(CUSTOMER)) blver=$(strip $(BTLD_VERNO)) verno=$(strip $(PURE_VERNO)) \
> BOOTLOADER_$(strip $(CUSTOMER))_$(strip $(PLATFORM))_nocode.cmm
@echo Generate BOOTLOADER version number ...
@if not exist $(strip $(BTLDVERNODIR)) exit 0
@if exist $(strip $(BTLDVERNODIR))\bl_verno.c (del $(strip $(BTLDVERNODIR))\bl_verno.c)
@echo #include "kal_release.h" > $(strip $(BTLDVERNODIR))\bl_verno.c
@echo const kal_uint32 CHECKSUM_SEED = $(strip $(BTLD_CHECKSUM_SEED)); >> $(strip $(BTLDVERNODIR))\bl_verno.c
@echo const kal_int8 BootLDVerno[5] = "$(strip $(BTLD_VERNO))"; >> $(strip $(BTLDVERNODIR))\bl_verno.c
@echo Generate BOOTLOADER .lis and .pth file ...
@perl .\tools\bl_info.pl board_ver=$(strip $(BOARD_VER))
# *************************************************************************
# Generate VersionNo
# *************************************************************************
genverno:
@echo Generate version number ... >> $(LOG)
@if not exist $(VERNODIR) \
md $(VERNODIR)
@if exist $(strip $(VERNODIR))\verno.c (del $(strip $(VERNODIR))\verno.c)
@echo #include "kal_release.h" > $(strip $(VERNODIR))\verno.c
@echo kal_char* release_verno(void) >> $(strip $(VERNODIR))\verno.c
@echo { >> $(strip $(VERNODIR))\verno.c
@echo static kal_char verno_str[] = "$(strip $(VERNO))"; >> $(strip $(VERNODIR))\verno.c
@echo return verno_str; >> $(strip $(VERNODIR))\verno.c
@echo } >> $(strip $(VERNODIR))\verno.c
@echo kal_char* release_hw_ver(void) >> $(strip $(VERNODIR))\verno.c
@echo { >> $(strip $(VERNODIR))\verno.c
@echo static kal_char hw_ver_str[] = "$(strip $(HW_VER))"; >> $(strip $(VERNODIR))\verno.c
@echo return hw_ver_str; >> $(strip $(VERNODIR))\verno.c
@echo } >> $(strip $(VERNODIR))\verno.c
@echo kal_char* build_date_time(void) >> $(strip $(VERNODIR))\verno.c
@echo { >> $(strip $(VERNODIR))\verno.c
@echo static kal_char build_date_time_str[] = "$(strip $(BUILD_DATE_TIME))"; >> $(strip $(VERNODIR))\verno.c
@echo return build_date_time_str; >> $(strip $(VERNODIR))\verno.c
@echo } >> $(strip $(VERNODIR))\verno.c
@echo kal_char* release_build(void) >> $(strip $(VERNODIR))\verno.c
@echo { >> $(strip $(VERNODIR))\verno.c
@echo static kal_char build_str[] = "$(strip $(BUILD))"; >> $(strip $(VERNODIR))\verno.c
@echo return build_str; >> $(strip $(VERNODIR))\verno.c
@echo } >> $(strip $(VERNODIR))\verno.c
@echo kal_char* release_branch(void) >> $(strip $(VERNODIR))\verno.c
@echo { >> $(strip $(VERNODIR))\verno.c
@echo static kal_char build_branch_str[] = "$(strip $(BRANCH))"; >> $(strip $(VERNODIR))\verno.c
@echo return build_branch_str; >> $(strip $(VERNODIR))\verno.c
@echo } >> $(strip $(VERNODIR))\verno.c
@echo #define VERNO_STR "$(strip $(VERNO))" > $(strip $(VERNODIR))\verno.h
# *************************************************************************
# Generate Custom Information
# *************************************************************************
gencustominfo:
# For RF_MODULE = MT6129D
ifdef DRV_CUSTOM_TOOL_SUPPORT
ifeq ($(strip $(DRV_CUSTOM_TOOL_SUPPORT)),TRUE)
ifeq ($(findstring MT6129D,$(strip $(RF_MODULE))),MT6129D)
@if exist $(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe \
(if exist $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_MT6129D.dws \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_MT6129D.dws) \
else \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen.dws) \
)
endif
endif
endif
# For RF_MODULE = MT6139E
ifdef DRV_CUSTOM_TOOL_SUPPORT
ifeq ($(strip $(DRV_CUSTOM_TOOL_SUPPORT)),TRUE)
ifeq ($(findstring MT6139E,$(strip $(RF_MODULE))),MT6139E)
@if exist $(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe \
(if exist $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_MT6139E.dws \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_MT6139E.dws) \
else \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen.dws) \
)
endif
endif
endif
# For RF_MODULE != MT6129D or != MT6139E
ifdef DRV_CUSTOM_TOOL_SUPPORT
ifeq ($(strip $(DRV_CUSTOM_TOOL_SUPPORT)),TRUE)
ifeq ($(findstring MT6129D,$(strip $(RF_MODULE))),)
ifeq ($(findstring MT6139E,$(strip $(RF_MODULE))),)
@if /I "$(strip $(DRV_CUSTOM_TOOL_SUPPORT))" EQU "TRUE" \
(if exist $(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe \
(if exist $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen.dws \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen.dws) \
) \
)
endif
endif
endif
endif
@if /I "$(strip $(DRV_CUSTOM_TOOL_SUPPORT))" EQU "TRUE" \
(if /I "$(strip $(BOARD_VER))" EQU "SUPERMAN29_DEMO_BB" \
(if exist $(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe \
(if exist $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_$(strip $(SUB_BOARD_VER)).dws \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen_$(strip $(SUB_BOARD_VER)).dws) \
) \
) \
)
# For rotated keypad on Tianyu28_demo landscape MMI
@if /I "$(strip $(DRV_CUSTOM_TOOL_SUPPORT))" EQU "TRUE" \
(if /I "$(strip $(BOARD_VER))" EQU "TIANYU28_DEMO_BB" \
(if /I "$(strip $(MAIN_LCD_SIZE))" EQU "320X240" \
(if exist $(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe \
(if exist $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen1.dws \
($(FIXPATH)\custom\drv\Drv_Tool\DrvGen.exe $(FIXPATH)\custom\drv\misc_drv\$(strip $(BOARD_VER))\codegen\codegen1.dws) \
) \
) \
) \
)
ifneq ($(call Upper,$(strip $(PROJECT))),BASIC)
ifneq ($(strip $(call Upper,$(LEVEL))),LEVEL2_OBJ)
@if exist $(FIXPATH)\$(MMIDIR)\Customer\LcdResource\MainLcd$(strip $(MAIN_LCD_SIZE))\*.* \
(copy /y $(FIXPATH)\$(MMIDIR)\Customer\LcdResource\MainLcd$(strip $(MAIN_LCD_SIZE))\*.* $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(MMI_VERSION))\*.* > nul)
endif
endif
# copy only for Neptune_Color
@if /I "$(strip $(CUSTOMER))" EQU "NEPTUNE_COLOR" \
(if exist $(FIXPATH)\plutommi\customer\CustResource\NEPTUNE_COLOR_MMI\Themecomponents.h \
(copy /y $(FIXPATH)\plutommi\Customer\CustResource\NEPTUNE_COLOR_MMI\Themecomponents.h $(FIXPATH)\plutommi\Customer\CustResource\PLUTO_MMI\Themecomponents.h > nul) \
)
@if /I "$(NEED_COPY_MMIFEATURE)" EQU "CUSTOMER_MMI" \
(if exist $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(CUSTOMER))_MMI\MMI_features_switch$(strip $(CUSTOMER)).h \
(copy /y $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(CUSTOMER))_MMI\MMI_features_switch$(strip $(CUSTOMER)).h $(FIXPATH)\$(MMIDIR)\MMI\Inc\MMI_features_switch.h > nul) \
)
@if /I "$(NEED_COPY_MMIFEATURE)" EQU "PLUTO_MMI" \
(if exist $(FIXPATH)\$(MMIDIR)\Customer\CustResource\PLUTO_MMI\MMI_features_switchPLUTO.h \
(copy /y $(FIXPATH)\$(MMIDIR)\Customer\CustResource\PLUTO_MMI\MMI_features_switchPLUTO.h $(FIXPATH)\$(MMIDIR)\MMI\Inc\MMI_features_switch.h) \
) & \
(if exist $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(CUSTOMER))_MMI\MMI_features_switch$(strip $(CUSTOMER)).h \
(copy /y $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(CUSTOMER))_MMI\MMI_features_switch$(strip $(CUSTOMER)).h $(FIXPATH)\$(MMIDIR)\MMI\Inc\MMI_features_switch.h) \
)
@if /I "$(NEED_COPY_MMIFEATURE)" EQU "NEPTUNE_MMI" \
(if exist $(FIXPATH)\$(MMIDIR)\Customer\CustResource\NEPTUNE_MMI\MMI_features_switchNEPTUNE.h \
(copy /y $(FIXPATH)\$(MMIDIR)\Customer\CustResource\NEPTUNE_MMI\MMI_features_switchNEPTUNE.h $(FIXPATH)\$(MMIDIR)\MMI\Inc\MMI_features_switch.h) \
) & \
(if exist $(FIXPATH)\$(MMIDIR)\Customer\CustResource\$(strip $(CUSTOMER))_MMI\MMI_features_switch$(st
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -