1. make文件夹里面的Gsm2.mak修改make工具的编译项为IncredBuild增加运行参数
[c-sharp] view plain copy
#@echo tools/make.exe -fmake/comp.mak -r -R COMPONENT=$* ... $(strip $(COMPLOGDIR))/$*.log
@if /I %OS% EQU WINDOWS_NT /
(if /I $(BM_NEW) EQU TRUE /
(if not exist $(strip $(COMPLOGDIR))/$* md $(strip $(COMPLOGDIR))/$*) & /
(tools/make.exe -fmake/comp.mak -k -r -R $(strip $(CMD_ARGU)) COMPONENT=$* > $(strip $(COMPLOGDIR))/$*.log 2>&1) & /
(if ERRORLEVEL 1 /
(perl tools/get_log.pl $(strip $(COMPLOGDIR))/$*.log $(strip $(COMPLOGDIR))/$* tools/copy_mmi_include_h.bat) & /
(rd /S /Q $(strip $(COMPLOGDIR))/$*) & /
(rd /S /Q $(strip $(HEADER_TEMP))) & /
(exit 1) /
else /
(perl tools/get_log.pl $(strip $(COMPLOGDIR))/$*.log $(strip $(COMPLOGDIR))/$*) & /
(rd /S /Q $(strip $(COMPLOGDIR))/$*) /
) /
else /
(if not exist $(strip $(COMPLOGDIR))/$* md $(strip $(COMPLOGDIR))/$*) & /
(tools/make.exe -fmake/comp.mak -r -R $(strip $(CMD_ARGU)) COMPONENT=$* > $(strip $(COMPLOGDIR))/$*.log 2>&1) & /
(if ERRORLEVEL 1 /
(perl tools/get_log.pl $(strip $(COMPLOGDIR))/$*.log $(strip $(COMPLOGDIR))/$* tools/copy_mmi_include_h.bat) & /
(rd /S /Q $(strip $(COMPLOGDIR))/$*) & /
(rd /S /Q $(strip $(HEADER_TEMP))) & /
(exit 1) /
else /
(perl tools/get_log.pl $(strip $(COMPLOGDIR))/$*.log $(strip $(COMPLOGDIR))/$*) & /
(rd /S /Q $(strip $(COMPLOGDIR))/$*) /
) /
) /
修改为
[c-sharp] view plain copy
@if /I %OS% EQU WINDOWS_NT /
(if /I $(BM_NEW) EQU TRUE /
(XGConsole /command="tools/make.exe -fmake/comp.mak -k -r -R $(strip $(CMD_ARGU)) COMPONENT=$* > $(strip $(COMPLOGDIR))/$*.log 2>&1" /NOLOGO /profile="tools/XGConsole.xml") /
else /
(XGConsole /command="tools/make.exe -fmake/comp.mak -r -R $(strip $(CMD_ARGU)) COMPONENT=$* > $(strip $(COMPLOGDIR))/$*.log 2>&1" /NOLOGO /profile="tools/XGConsole.xml") /
) /
2. tools工具夹里面加入 XGConsole.xml
内容为:
[c-sharp] view plain copy
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tools>
<Tool Filename="perl" AllowRemote="true" />
<Tool Filename="make" AllowIntercept="true" />
<Tool Filename="tcc" AllowRemote="true" />
<Tool Filename="tcpp" AllowRemote="true" />
<Tool Filename="armasm" AllowRemote="true" />
<Tool Filename="armcc" AllowRemote="true" />
<Tool Filename="armcpp" AllowRemote="true" />
<Tool Filename="strcmpex" AllowRemote="true" />
<Tool Filename="warp" AllowRemote="true" />
<Tool Filename="armar" AllowRemote="false" />
<Tool Filename="fromelf" AllowRemote="false" />
</Tools>
</Profile>
3. 在项目下面的make2.pl修改以下几行
[c-sharp] view plain copy
if (($action eq "update") || ($action eq "remake") || ($action eq "new") || ($action eq "bm_new") ||
($action eq "c,r") || ($action eq "c,u")) {
if ($ENV{"NUMBER_OF_PROCESSORS"} > 1) {
if ($fullOpts eq "") {
$fullOpts = "CMD_ARGU=-j$ENV{//"NUMBER_OF_PROCESSORS//"}";
} else {
$fullOpts .= ",-j$ENV{//"NUMBER_OF_PROCESSORS//"}";
}
}
}
修改为:
[c-sharp] view plain copy
if (($action eq "update") || ($action eq "remake") || ($action eq "new") || ($action eq "bm_new") ||
($action eq "c,r") || ($action eq "c,u")) {
if ($ENV{"NUMBER_OF_PROCESSORS"} >= 1) {
if ($fullOpts eq "") {
$fullOpts = "CMD_ARGU=-j$ENV{/"NUMBER_OF_PROCESSORS/"}"."0";
} else {
$fullOpts .= ",-j$ENV{/"NUMBER_OF_PROCESSORS/"}"."0";
}
}
}
然后将 $ENV{"NUMBER_OF_PROCESSORS"} = 10; 修改为你想要的进程数
最后将别的工程可以分布式的make.exe文件替换下就可以了
重新编译
---------------------
作者:jiangyu912
来源:CSDN
原文:https://blog.csdn.net/jiangyu912/article/details/6118625
版权声明:本文为博主原创文章,转载请附上博文链接!