Changed the way of using precompiled header in the build process. Now the use of...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 8 Oct 2006 16:07:32 +0000 (16:07 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 8 Oct 2006 16:07:32 +0000 (16:07 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1690 6f19259b-4bc3-4df7-8a09-765794883524

EdkNt32Pkg/Sec/SecMain_build.xml
Tools/Conf/BuildMacro.xml
Tools/Conf/tools_def.template
Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java

index 0b2996a..5a27f5c 100644 (file)
@@ -74,6 +74,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </GenBuild>\r
   </target>\r
   <target name="sourcefiles">\r
+      <Build_Init>\r
+        <EXTRA.INC>\r
+          <includepath path="${INCLUDE_PATHS}"/>\r
+        </EXTRA.INC>\r
+      </Build_Init>\r
       <Build_AUTOGEN FILEEXT="c" FILENAME="AutoGen" FILEPATH=".">\r
          <EXTRA.INC>\r
             <includepath path="${INCLUDE_PATHS}"/>\r
index b149cd6..dc5bcfb 100644 (file)
@@ -14,9 +14,59 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     Macro for intialize some properties. This Macro build will be called before source file build.  \r
     -->\r
   <macrodef name="Build_Init">\r
+    <element name="EXTRA.INC" optional="yes"/>\r
+    <element name="EXTRA.ARG" optional="yes"/>\r
+    \r
     <sequential>\r
       <var name="OBJECTS" value="" />\r
       <var name="SDB_FILES" value="" />\r
+\r
+      <if>\r
+        <isset property="PCH"/>\r
+        <then>\r
+          <if>\r
+            <available type="file" file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
+            <then>\r
+              <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep">\r
+                <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
+                <EXTRA.INC/>\r
+              </makedeps>\r
+            </then>\r
+          </if>\r
+    \r
+          <OnDependency>\r
+            <sourcefiles>\r
+              <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
+            </sourcefiles>\r
+            <targetfiles>\r
+              <file Name="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
+            </targetfiles>\r
+    \r
+            <sequential>\r
+              <!-- Generate pre-compiled header -->\r
+              <cc userdefine="on">\r
+                <command type="CC" cmd="${PCH}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
+                  outputFile="${DEST_DIR_OUTPUT}/AutoGen.h.obj">\r
+                  <EXTRA.INC/>\r
+                  <argument value="${PCH_FLAGS}"/>\r
+                  <EXTRA.ARG/>\r
+                  <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
+                </command>\r
+              </cc>\r
+\r
+              <if>\r
+                <equals arg1="${CC_FAMILY}" arg2="GCC"/>\r
+                <then>\r
+                  <move file="${DEST_DIR_OUTPUT}/AutoGen.h.obj" tofile="${DEST_DIR_OUTPUT}/AutoGen.h.gch" overwrite="true"/>\r
+                </then>\r
+                <else>\r
+                  <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/AutoGen.h.obj"/>\r
+                </else>\r
+              </if>\r
+            </sequential>\r
+          </OnDependency>\r
+        </then>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -60,25 +110,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
 \r
         <sequential>\r
-          <!-- Use pre-compiled header if available -->\r
-          <if>\r
-            <and>\r
-              <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </and>\r
-            <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </then>\r
-            <else>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
-            </else>\r
-          </if>\r
-\r
           <cc userdefine="on">\r
             <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
               outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${CC_DPATH}">\r
               <EXTRA.INC/>\r
-              <argument value="${LOCAL_CC_FLAGS}"/>\r
+              <argument value="${CC_FLAGS}"/>\r
               <EXTRA.ARG/>\r
               <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
             </command>\r
@@ -112,44 +148,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
-      <if>\r
-        <available type="file" file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-        <then>\r
-          <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep">\r
-            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-            <EXTRA.INC/>\r
-          </makedeps>\r
-        </then>\r
-      </if>\r
-\r
-      <OnDependency>\r
-        <sourcefiles>\r
-          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
-        </sourcefiles>\r
-        <targetfiles>\r
-          <file Name="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-        </targetfiles>\r
-\r
-        <sequential>\r
-          <!-- Generate pre-compiled header -->\r
-          <if>\r
-            <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-            <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-              <cc userdefine="on">\r
-                <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
-                    outputFile="${DEST_DIR_OUTPUT}/AutoGen.h.obj" dpath="${CC_DPATH}">\r
-                  <EXTRA.INC/>\r
-                  <argument value="${LOCAL_CC_FLAGS}"/>\r
-                  <EXTRA.ARG/>\r
-                  <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-                </command>\r
-              </cc>\r
-            </then>\r
-          </if>\r
-        </sequential>\r
-      </OnDependency>\r
-\r
       <if>\r
         <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
         <then>\r
@@ -170,22 +168,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
 \r
         <sequential>\r
-          <!-- Generate pre-compiled header -->\r
-          <if>\r
-            <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-            <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </then>\r
-            <else>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
-            </else>\r
-          </if>\r
-\r
           <cc userdefine="on">\r
             <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
                 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${CC_DPATH}">\r
               <EXTRA.INC/>\r
-              <argument value="${LOCAL_CC_FLAGS}"/>\r
+              <argument value="${CC_FLAGS}"/>\r
               <EXTRA.ARG/>\r
               <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
             </command>\r
@@ -645,25 +632,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
         \r
         <sequential>\r
-          <!-- Use pre-compiled header if available -->\r
-          <if>\r
-            <and>\r
-              <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </and>\r
-            <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </then>\r
-            <else>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
-            </else>\r
-          </if>\r
-\r
           <cc userdefine="on">\r
             <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
                      includepathDelimiter="-I" dpath="${CC_DPATH}"\r
                      outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj">\r
-              <argument value="${LOCAL_CC_FLAGS}"/>\r
+              <argument value="${CC_FLAGS}"/>\r
               <EXTRA.INC />\r
               <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
             </command>\r
@@ -722,25 +695,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
             <EXTRA.INC/>\r
           </vfrcompile>\r
     \r
-          <!-- Use pre-compiled header if available -->\r
-          <if>\r
-            <and>\r
-              <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </and>\r
-            <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            </then>\r
-            <else>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
-            </else>\r
-          </if>\r
-\r
           <cc userdefine="on">\r
             <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" \r
                      includepathDelimiter="-I" family="${CC_FAMILY}" dpath="${CC_DPATH}"\r
                      outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" >\r
-              <argument value="${LOCAL_CC_FLAGS}"/>\r
+              <argument value="${CC_FLAGS}"/>\r
               <EXTRA.INC/>\r
               <EXTRA.ARG/>\r
               <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
index 33a22e4..53f2648 100644 (file)
@@ -353,19 +353,22 @@ RELEASE_VS2005PRO_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF
 *_MYTOOLS_IA32_PP_NAME           = cl.exe \r
 *_MYTOOLS_IA32_ASM_NAME          = ml.exe\r
 *_MYTOOLS_IA32_ASM_EXT           = .asm\r
+*_MYTOOLS_IA32_PCH_NAME          = cl.exe \r
 \r
 *_MYTOOLS_IA32_*_PATH            = C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\r
 *_MYTOOLS_IA32_*_DPATH           = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\r
 *_MYTOOLS_IA32_ASMLINK_PATH      = C:\WINDDK\3790.1830\bin\bin16\\r
 \r
 *_MYTOOLS_IA32_PP_FLAGS          = /nologo /P /TC /FI${DEST_DIR_DEBUG}/AutoGen.h \r
-DEBUG_MYTOOLS_IA32_CC_FLAGS      = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm \r
-RELEASE_MYTOOLS_IA32_CC_FLAGS    = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192\r
+DEBUG_MYTOOLS_IA32_CC_FLAGS      = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
+RELEASE_MYTOOLS_IA32_CC_FLAGS    = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 DEBUG_MYTOOLS_IA32_ASM_FLAGS     = /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi  \r
 RELEASE_MYTOOLS_IA32_ASM_FLAGS   = /nologo /W3 /WX /c /coff /Cx /Zd /W0\r
 *_MYTOOLS_IA32_SLINK_FLAGS       = /nologo /LTCG\r
 DEBUG_MYTOOLS_IA32_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG   \r
 RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text\r
+DEBUG_MYTOOLS_IA32_PCH_FLAGS     = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
+RELEASE_MYTOOLS_IA32_PCH_FLAGS   = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 \r
 ##################\r
 # x64 definitions\r
@@ -377,6 +380,7 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /
 *_MYTOOLS_X64_DLINK_NAME        = link.exe\r
 *_MYTOOLS_X64_ASMLINK_NAME      = link.exe\r
 *_MYTOOLS_X64_PP_NAME           = cl.exe\r
+*_MYTOOLS_X64_PCH_NAME          = cl.exe\r
 \r
 *_MYTOOLS_X64_SLINK_FLAGS       = /nologo /LTCG\r
 \r
@@ -386,12 +390,14 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /
 *_MYTOOLS_X64_ASMLINK_PATH      = C:\WINDDK\3790.1830\bin\bin16\\r
 \r
 *_MYTOOLS_X64_PP_FLAGS          = /nologo /P /TC /FI${DEST_DIR_DEBUG}/AutoGen.h \r
-DEBUG_MYTOOLS_X64_CC_FLAGS      = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF\r
-RELEASE_MYTOOLS_X64_CC_FLAGS    = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF\r
+DEBUG_MYTOOLS_X64_CC_FLAGS      = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
+RELEASE_MYTOOLS_X64_CC_FLAGS    = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 DEBUG_MYTOOLS_X64_ASM_FLAGS     = /nologo /W3 /WX /c /Cx /Zd /Zi\r
 RELEASE_MYTOOLS_X64_ASM_FLAGS   = /nologo /W3 /WX /c /Cx /Zd\r
 DEBUG_MYTOOLS_X64_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG \r
 RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text\r
+DEBUG_MYTOOLS_X64_PCH_FLAGS     = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
+RELEASE_MYTOOLS_X64_PCH_FLAGS   = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 \r
 ##################\r
 # IPF definitions\r
@@ -402,6 +408,7 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /O
 *_MYTOOLS_IPF_CC_NAME       = cl.exe\r
 *_MYTOOLS_IPF_SLINK_NAME    = lib.exe\r
 *_MYTOOLS_IPF_DLINK_NAME    = link.exe\r
+*_MYTOOLS_IPF_PCH_NAME      = cl.exe\r
 \r
 *_MYTOOLS_IPF_SLINK_FLAGS   = /nologo /LTCG\r
 \r
@@ -410,9 +417,10 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /O
 *_MYTOOLS_IPF_*_PATH        = C:\WINDDK\3790.1830\bin\win64\x86\r
 \r
 *_MYTOOLS_IPF_PP_FLAGS      = /nologo /P /TC\r
-*_MYTOOLS_IPF_CC_FLAGS      = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h \r
+*_MYTOOLS_IPF_CC_FLAGS      = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 *_MYTOOLS_IPF_ASM_FLAGS     = -N us -X explicit -M ilp64 -N so -W4\r
 *_MYTOOLS_IPF_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /LTCG /OPT:REF /IGNORE:4086 /MAP /MACHINE:IA64 /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /MAP:${DEST_DIR_DEBUG}/${BASE_NAME}.map /PDB:${DEST_DIR_DEBUG}/${BASE_NAME}.pdb \r
+*_MYTOOLS_IPF_PCH_FLAGS     = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch\r
 \r
 ##################\r
 # EBC definitions\r
index 99767ab..d614e67 100644 (file)
@@ -480,6 +480,9 @@ public class GenBuildTask extends Ant {
             String cmdPath = GlobalData.getCommandSetting(key, fpdModuleId);\r
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME;\r
             String cmdName = GlobalData.getCommandSetting(key, fpdModuleId);\r
+            if (cmdName.length() == 0) {\r
+                continue;\r
+            }\r
             File cmdFile = new File(cmdPath + File.separatorChar + cmdName);\r
             getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));\r
 \r
index c02bc1f..195ffde 100644 (file)
@@ -374,6 +374,13 @@ public class ModuleBuildFileGenerator {
         // Initialize some properties by user\r
         //\r
         Element initEle = document.createElement("Build_Init");\r
+        Element initIncEle = document.createElement("EXTRA.INC");\r
+        for (int i = 0; i < includes.length; i++) {\r
+            Element includeEle = document.createElement("includepath");\r
+            includeEle.setAttribute("path", includes[i]);\r
+            initIncEle.appendChild(includeEle);\r
+        }\r
+        initEle.appendChild(initIncEle);\r
         root.appendChild(initEle);\r
 \r
         String moduleDir = project.getProperty("MODULE_DIR");\r