使用者工具

網站工具


calculation_bios_build_time

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
calculation_bios_build_time [2024/07/09 08:28]
don
calculation_bios_build_time [2024/09/11 12:36] (目前版本)
don
行 2: 行 2:
  
 makefile makefile
 +<code>
 +target: target1 target2 
 +<tab>gcc -o ExecutionFile target1 target2
 +</code>
 +
 +
 +Step1 : Add two variables before .XXXXX   ex:.PHONY
 +<code>
 +START_TIME := $(shell echo %time%)
 +END_TIME := $(shell echo %time%)
 +</code>
 +
 +Step2 : Add two targets
 +<code>
 +start_time:
 + @echo Start Time: $(START_TIME)
 +
 +end_time:
 + $(eval END_TIME := $(shell echo %time%))
 + @echo Start Time: $(START_TIME)
 + @echo End Time: $(END_TIME)
 + @echo.
 + @echo Calculate time...
 + @powershell -Command "$$start_time = [datetime]::Parse('$(START_TIME)'); $$end_time = [datetime]::Parse('$(END_TIME)'); $$duration = $$end_time - $$start_time;echo Build_time: $$duration"
 +</code>
 +
 +Step3 : Add "start_time" "end_time" targets to ".PHONY"
 +<code>
 +.PHONY : all clean rebuild run RunAmiSdl AptioV sdl Prologue start_time end_time
 +</code>
 +
 +Step4 : Add the target to start location and end location\\
 +
 +all: <color #ed1c24>start_time</color> Prologue $(BUILD_DIR) RunAmiSdl AptioV <color #ed1c24>end_time</color>
 +
 +
 +Completion makefile
 +
 <code> <code>
 export CONFIGURATION_DIR:=AmiPkg/Configuration/ export CONFIGURATION_DIR:=AmiPkg/Configuration/
行 28: 行 66:
 END_TIME := $(shell echo %time%) END_TIME := $(shell echo %time%)
  
-.PHONY : all clean rebuild run RunAmiSdl AptioV sdl Prologue+.PHONY : all clean rebuild run RunAmiSdl AptioV sdl Prologue start_time end_time
  
 all: start_time Prologue $(BUILD_DIR) RunAmiSdl AptioV end_time all: start_time Prologue $(BUILD_DIR) RunAmiSdl AptioV end_time
calculation_bios_build_time.1720484901.txt.gz · 上一次變更: 2024/07/09 08:28 由 don