Introduce a new property INCLUDE_PATHS. This property can used by customized build...
[mirror_edk2.git] / EdkNt32Pkg / Sec / SecMain_build.xml
index b0436d385b8b25f73893ee7a161edc8970e3b8c2..56b26350052c93436e9cb66bd3d922b4441f2ff2 100644 (file)
@@ -24,103 +24,84 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   <!-- Compile all dependency Library instances. --> \r
 \r
   <target name="libraries">\r
   <!-- Compile all dependency Library instances. --> \r
 \r
   <target name="libraries">\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BaseLib\build.xml" inheritAll="false" target="BaseLib">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BaseMemoryLib\build.xml" inheritAll="false" target="BaseMemoryLib">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BasePrintLib\build.xml" inheritAll="false" target="BasePrintLib">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BasePeCoffLib\build.xml" inheritAll="false" target="BasePeCoffLib">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BaseReportStatusCodeLibNull\build.xml" inheritAll="false" target="BaseReportStatusCodeLibNull">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <ant antfile="${WORKSPACE_DIR}\MdePkg\Library\BaseDebugLibNull\build.xml" inheritAll="false" target="BaseDebugLibNull">\r
-      <property name="WORKSPACE_DIR" value="${WORKSPACE_DIR}" /> \r
-      <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}\MdePkg/" /> \r
-      <property name="ARCH" value="${ARCH}" /> \r
-      <property name="TARGET" value="${TARGET}" /> \r
-      <property name="PACKAGE" value="MdePkg" /> \r
-    </ant>\r
-    <Expand />\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="27d67720-ea68-48ae-93da-a3a074c90e30"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="fd44e603-002a-4b29-9f5f-529e815b6165"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="556f5d10-7309-4af4-b80a-8196bd60946f"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="55c61087-7367-4546-bc32-4937c5e6aff3"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
+    <GenBuild type="build">\r
+      <property name="ARCH" value="${ARCH}"/>\r
+      <property name="MODULE_GUID" value="9ba1d976-0624-41a3-8650-28165e8d9ae8"/>\r
+      <property name="MODULE_VERSION" value=""/>\r
+      <property name="PLATFORM" value="${PLATFORM}"/>\r
+      <property name="PACKAGE_GUID" value="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      <property name="PACKAGE_VERSION" value=""/>\r
+    </GenBuild>\r
   </target>\r
   <target name="sourcefiles">\r
   </target>\r
   <target name="sourcefiles">\r
-      <Build_AUTOGEN FILENAME="AutoGen" FILEPATH=".">\r
+      <Build_AUTOGEN FILEEXT="c" FILENAME="AutoGen" FILEPATH=".">\r
          <EXTRA.INC>\r
          <EXTRA.INC>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include\${ARCH}"/>\r
-            <includepath path="${DEST_DIR_DEBUG}"/>\r
+            <includepath path="${INCLUDE_PATHS}"/>\r
          </EXTRA.INC>\r
        </Build_AUTOGEN>\r
          </EXTRA.INC>\r
        </Build_AUTOGEN>\r
-      <Build_C_Code FILENAME="FwVol" FILEPATH=".">\r
+      <Build_CCode FILEEXT="c" FILENAME="FwVol" FILEPATH=".">\r
          <EXTRA.INC>\r
          <EXTRA.INC>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include\${ARCH}"/>\r
-            <includepath path="${DEST_DIR_DEBUG}"/>\r
+            <includepath path="${INCLUDE_PATHS}"/>\r
          </EXTRA.INC>\r
          </EXTRA.INC>\r
-      </Build_C_Code>\r
-      <Build_C_Code FILENAME="WinNtThunk" FILEPATH=".">\r
+      </Build_CCode>\r
+      <Build_CCode FILEEXT="c" FILENAME="WinNtThunk" FILEPATH=".">\r
          <EXTRA.INC>\r
          <EXTRA.INC>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include\${ARCH}"/>\r
-            <includepath path="${DEST_DIR_DEBUG}"/>\r
+            <includepath path="${INCLUDE_PATHS}"/>\r
          </EXTRA.INC>\r
          </EXTRA.INC>\r
-      </Build_C_Code>\r
-      <Build_C_Code FILENAME="SecMain" FILEPATH=".">\r
+      </Build_CCode>\r
+      <Build_CCode FILEEXT="c" FILENAME="SecMain" FILEPATH=".">\r
          <EXTRA.INC>\r
          <EXTRA.INC>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\MdePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkModulePkg\Include\${ARCH}"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include"/>\r
-            <includepath path="${WORKSPACE_DIR}\EdkNt32Pkg\Include\${ARCH}"/>\r
-            <includepath path="${DEST_DIR_DEBUG}"/>\r
+            <includepath path="${INCLUDE_PATHS}"/>\r
          </EXTRA.INC>\r
          </EXTRA.INC>\r
-      </Build_C_Code>\r
+      </Build_CCode>\r
     </target>\r
     </target>\r
+\r
     <target name="sections" />\r
     <target name="sections" />\r
+\r
     <target name="output" >\r
     <target name="output" >\r
-      <echo message="##Entering Output!" />\r
-      \r
       <OnDependency>\r
         <sourcefiles>\r
       <OnDependency>\r
         <sourcefiles>\r
-          <file list="${OBJECTS}"/>\r
+          <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r
           <file list="${LIBS}"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file list="${LIBS}"/>\r
         </sourcefiles>\r
         <targetfiles>\r
@@ -128,26 +109,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
         \r
         <sequential>\r
         </targetfiles>\r
         \r
         <sequential>\r
-          <shellscript shell="cmd.exe" tmpsuffix=".cmd">\r
+          <cc userdefine="on">\r
+            <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"\r
+                outputFile="${DEST_DIR_OUTPUT}/SecMainLocal.lib">\r
+                \r
+              <argument value="${SLINK_FLAGS}"/>\r
+\r
+              <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>\r
+            </command>\r
+          </cc>\r
+          \r
+          <var name="LIBS" value="${LIBS} ${DEST_DIR_OUTPUT}/SecMainLocal.lib" />\r
+         \r
+          <shellscript shell="cmd.exe" tmpsuffix=".cmd" >\r
+            <arg line="/q"/>\r
             <arg line="/c"/>\r
             <arg line="call"/>\r
             <arg line="/c"/>\r
             <arg line="call"/>\r
-            "${LINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MsvcRt.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb\r
+            "${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb\r
           </shellscript>\r
         </sequential>\r
       </OnDependency>\r
           </shellscript>\r
         </sequential>\r
       </OnDependency>\r
-      <!--      \r
-      <cc userdefine="on">\r
-        <command type="LINK">\r
-          <argument value="/LIBPATH:&quot;${env.MSVCDir}\Lib&quot; /LIBPATH:&quot;${env.MSVCDir}\PlatformSdk\Lib&quot;" />\r
-          <argument value="/NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG" />\r
-          <argument value="Kernel32.lib MsvcRt.lib Gdi32.lib User32.lib Winmm.lib" />\r
-          <argument value="${OBJECTS}" />\r
-          <argument value="${LIBS}" />\r
-          <argument value="/base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb" />\r
-      </command>\r
-    </cc>\r
-    -->\r
   </target>\r
   </target>\r
+  \r
   <target name="clean" ></target>\r
 \r
   <target name="cleanAll"></target>\r
   <target name="clean" ></target>\r
 \r
   <target name="cleanAll"></target>\r