Streamline the tools build and make it friendlier to gcc.
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 May 2006 22:14:18 +0000 (22:14 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 May 2006 22:14:18 +0000 (22:14 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@97 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
Tools/Source/TianoTools/Common/build.xml
Tools/Source/TianoTools/CompressDll/build.xml
Tools/Source/TianoTools/FwImage/build.xml
Tools/Source/TianoTools/GenCRC32Section/build.xml
Tools/Source/TianoTools/GenDepex/build.xml
Tools/Source/TianoTools/GenFfsFile/build.xml
Tools/Source/TianoTools/GenFvImage/build.xml
Tools/Source/TianoTools/GenSection/build.xml
Tools/Source/TianoTools/GuidChk/build.xml
Tools/Source/TianoTools/SetStamp/build.xml
Tools/Source/TianoTools/StrGather/build.xml
Tools/Source/TianoTools/VfrCompile/build.xml
Tools/Source/TianoTools/build.xml

index 593db56..91cba35 100644 (file)
@@ -80,7 +80,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${LIB_DIR}/CommonTools"\r
         outtype="static"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
@@ -88,19 +87,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
 \r
       <fileset dir="${basedir}/Common" \r
-        includes="*.h *.c" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
-\r
+        includes="*.c" />\r
     </cc>\r
-    <if>\r
-      <os family="dos"/>\r
-      <then>\r
-        <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">\r
-          <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/CommonTools${ext_static}"/>\r
-        </exec>\r
-      </then>\r
-    </if>\r
   </target>\r
 \r
   <target name="clean" depends="init">\r
index e742e21..2ef3849 100644 (file)
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
   <property name="LINK_OUTPUT_TYPE" value="static"/>\r
   <property name="BUILD_DIR" value="${WORKSPACE}/Tools/Source/TianoTools/${ToolName}/tmp"/>\r
-  <target name="GenTool" depends="init,Lib,Dll">\r
+  <target name="GenTool" depends="init,Lib>\r
     <echo message="Building the EDK Tool: ${ToolName}"/>\r
   </target>\r
   <target name="init">\r
@@ -70,16 +70,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </then>\r
       </elseif>\r
     </if>\r
-    <condition property="CheckDepends">\r
-      <uptodate targetfile="${BIN_DIR}/${LibName}${ext_dynamic}">\r
-        <srcfiles dir="${BUILD_DIR}" includes="CommonTools.lib, CustomizedCompress.lib, CompressDll.obj"/>\r
-      </uptodate>\r
-    </condition>\r
-  \r
   </target>\r
   \r
-  <target name="Lib" depends="init">\r
-    <cc name="${ToolChain}" objdir="${BUILD_DIR}" outtype="static" optimize="speed">\r
+  <target name="Lib" depends="init" unless="gcc">\r
+    <cc name="${ToolChain}" \r
+      objdir="${BUILD_DIR}" \r
+      outtype="shared" \r
+      optimize="speed" \r
+      outfile="${BIN_DIR}/${LibName}"\r
+      >\r
       <fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
@@ -87,20 +86,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <includepath path="${env.JAVA_HOME}/include"/>\r
       <includepath path="${env.JAVA_HOME}/include/win32"/>\r
+      <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
+      <syslibset libs="kernel32" unless="gcc"/>\r
     </cc>\r
   </target>\r
-  <target name="Dll" unless="CheckDepends">\r
-     <if>\r
-      <os family="dos"/>\r
-      <then>\r
-        <echo message="Begin link!"/>\r
-        <exec dir="${BUILD_DIR}" executable="link" failonerror="false">\r
-          <arg line="kernel32.lib ${LIB_DIR}/CommonTools.lib ${LIB_DIR}/CustomizedCompress.lib /NOLOGO /DLL /MACHINE:I386  /OUT:${BUILD_DIR}/${LibName}${ext_dynamic} ${ToolName}"/>\r
-        </exec>\r
-        <copy todir="${BIN_DIR}" file="${BUILD_DIR}/${LibName}${ext_dynamic}"/>\r
-      </then>\r
-    </if>\r
-  </target>\r
   <target name="clean" depends="init">\r
     <echo message="Removing Intermediate Files Only"/>\r
     <delete>\r
index c51e27e..13ecb1f 100644 (file)
@@ -83,7 +83,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <fileset dir="${basedir}/${ToolName}" \r
@@ -95,8 +94,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
   </target>\r
 \r
index cbdd04a..a432c86 100644 (file)
@@ -67,8 +67,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         <property name="ext_static" value=".lib"/>\r
         <property name="ext_dynamic" value=".dll"/>\r
         <property name="ext_exe" value=".exe"/>\r
-                               <property name="MSVC_DIR" value="C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/Include" />\r
-                               <property name="MSVC_SDK_DIR" value="C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include" />\r
                        </then>\r
                        <elseif>\r
                          <equals arg1="${ToolChain}" arg2="gcc"/>\r
@@ -85,29 +83,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <fileset dir="${basedir}/${ToolName}" \r
-        includes="${FileSet}" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
+        includes="${FileSet}"/>\r
 \r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools${ext_static}"/>\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
 \r
     </cc>\r
-    <if>\r
-      <os family="dos"/>\r
-      <then>\r
-        <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">\r
-          <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/${ToolName}${ext_exe}"/>\r
-        </exec>\r
-      </then>\r
-    </if>\r
   </target>\r
 \r
   <target name="clean" depends="init">\r
index 9135694..55812b1 100644 (file)
@@ -15,9 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Copyright (c) 2006, Intel Corporation\r
 -->\r
   <property name="ToolName" value="GenDepex"/>\r
-  <property name="LibName" value="DepexParser"/>\r
-  <property name="FileSet" value="GenDepex.c GenDepex.h"/>\r
-       <property name="LibFileSet" value="DepexParser.c DepexParser.h" />\r
+  <property name="FileSet" value="DepexParser.c GenDepex.c GenDepex.h"/>\r
 \r
   <taskdef resource="cpptasks.tasks"/>\r
   <typedef resource="cpptasks.types"/>\r
@@ -28,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   <property name="LINK_OUTPUT_TYPE" value="static"/>\r
   <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>\r
 \r
-  <target name="GenTool" depends="init, Lib, Tool">\r
+  <target name="GenTool" depends="init, Tool">\r
     <echo message="Building the EDK Tool: ${ToolName}"/>\r
   </target>\r
 \r
@@ -81,54 +79,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                </if>\r
   </target>\r
 \r
-  <target name="Tool" depends="init, Lib">\r
+  <target name="Tool" depends="init">\r
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <fileset dir="${basedir}/${ToolName}" \r
-        includes="${FileSet}" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
+        includes="${FileSet}" />\r
 \r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools${ext_static}"/>\r
-                       <linkerarg value="${LIB_DIR}/${LibName}${ext_static}"/>\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
        </target>\r
 \r
-       <target name="Lib" depends="init">\r
-    <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
-        outfile="${LIB_DIR}/${LibName}"\r
-        outtype="static"\r
-        libtool="${haveLibtool}"\r
-        optimize="speed">\r
-\r
-      <fileset dir="${basedir}/${ToolName}" \r
-        includes="${LibFileSet}" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
-\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${PACKAGE_DIR}/Common"/>\r
-               </cc>\r
-      <if>\r
-        <os family="dos"/>\r
-        <then>\r
-          <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">\r
-            <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/${LibName}${ext_static}"/>\r
-          </exec>\r
-        </then>\r
-      </if>\r
-  </target>\r
-       \r
   <target name="clean" depends="init">\r
     <echo message="Removing Intermediate Files Only"/>  \r
     <delete>\r
index 352ea0f..00a1266 100644 (file)
@@ -96,9 +96,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-                       <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
   </target>\r
 \r
index 3ea273b..58cdb61 100644 (file)
@@ -85,11 +85,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   <target name="Tool" depends="init, GenFvImage, GenFvImage_Ia32, GenFvImage_X64, GenFvImage_Ipf"/>\r
 \r
-  <target name="GenFvImage">\r
+  <target name="GenFvImage" >\r
     <cc name="${ToolChain}" objdir="${BUILD_DIR_IA32}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <defineset>\r
@@ -98,9 +97,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       </defineset>\r
     \r
       <fileset dir="${basedir}/${ToolName}" \r
-        includes="${FileSet} Ia32/PeCoffLoaderEx.c" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
+        includes="${FileSet} Ia32/PeCoffLoaderEx.c" />\r
 \r
       <includepath path="${PACKAGE_DIR}/${ToolName}"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
@@ -111,12 +108,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-\r
-      <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-      <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-      <linkerarg value="/nodefaultlib:libc.lib"/>\r
-      <linkerarg value="RpcRT4.Lib"/>\r
-\r
+      <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
+      <linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>\r
+      <syslibset dir="${env.CYGWIN_HOME}/lib/e2fsprogs" libs="uuid" if="gcc"/>\r
+      <syslibset libs="RpcRT4" unless="gcc"/>\r
     </cc>\r
   </target>\r
 \r
@@ -124,7 +119,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR_IA32}" \r
         outfile="${BIN_DIR}/${ToolName}_Ia32"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <defineset>\r
@@ -146,12 +140,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-\r
-      <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-      <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-      <linkerarg value="/nodefaultlib:libc.lib"/>\r
-      <linkerarg value="RpcRT4.Lib"/>\r
-\r
+      <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
+      <linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>\r
+      <syslibset dir="${env.CYGWIN_HOME}/lib/e2fsprogs" libs="uuid" if="gcc"/>\r
+      <syslibset libs="RpcRT4" unless="gcc"/>\r
     </cc>\r
   </target>\r
 \r
@@ -180,12 +172,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-\r
-      <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-      <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-      <linkerarg value="/nodefaultlib:libc.lib"/>\r
-      <linkerarg value="RpcRT4.Lib"/>\r
-\r
+      <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
+      <linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>\r
+      <syslibset dir="${env.CYGWIN_HOME}/lib/e2fsprogs" libs="uuid" if="gcc"/>\r
+      <syslibset libs="RpcRT4" unless="gcc"/>\r
     </cc>\r
   </target>\r
 \r
@@ -214,12 +204,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-\r
-      <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-      <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-      <linkerarg value="/nodefaultlib:libc.lib"/>\r
-      <linkerarg value="RpcRT4.Lib"/>\r
-\r
+      <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
+      <linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>\r
+      <syslibset dir="${env.CYGWIN_HOME}/lib/e2fsprogs" libs="uuid" if="gcc"/>\r
+      <syslibset libs="RpcRT4" unless="gcc"/>\r
     </cc>\r
   </target>\r
 \r
index 744bff8..34be36e 100644 (file)
@@ -96,9 +96,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-                       <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
   </target>\r
 \r
index f131f79..d7b7fba 100644 (file)
@@ -79,7 +79,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                </if>\r
   </target>\r
 \r
-  <target name="Tool" depends="init">\r
+  <target name="Tool" depends="init" unless="gcc">\r
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
index 95cb4a0..6e4aecb 100644 (file)
@@ -95,7 +95,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
 \r
     </cc>\r
   </target>\r
index e7a47dc..0864961 100644 (file)
@@ -79,7 +79,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                </if>\r
   </target>\r
 \r
-  <target name="Tool" depends="init">\r
+  <target name="Tool" depends="init" unless="gcc">\r
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
@@ -96,9 +96,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-                       <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-                       <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
-\r
+                       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
   </target>\r
 \r
index 217c407..f6a08c8 100644 (file)
@@ -79,19 +79,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </if>\r
                <condition property="CheckDepends">\r
                  <uptodate targetfile="${WORKSPACE}/Tools/bin/VfrCompile${ext_exe}">\r
-                         <srcfiles dir="${WORKSPACE}/Tools/Source/TianoTools/VfrCompile" includes="EfiVfrParser.cpp DLGLexer.cpp VfrCompile.cpp VfrCompile.g VfrServices.cpp parser.dlg"/>\r
+                         <srcfiles dir="${WORKSPACE}/Tools/Source/TianoTools/VfrCompile" \r
+        includes="EfiVfrParser.cpp DLGLexer.cpp VfrCompile.cpp VfrCompile.g VfrServices.cpp parser.dlg"/>\r
                        </uptodate>\r
                </condition>\r
   </target>\r
 \r
   <target name="Antlr" depends="init" unless="CheckDepends">\r
-    <exec dir="${basedir}/${ToolName}" executable="antlr.exe" failonerror="TRUE">\r
+    <exec dir="${basedir}/${ToolName}" executable="antlr" failonerror="TRUE">\r
       <arg line="-CC -e3 -ck 3 -o . VfrCompile.g"/>\r
     </exec>\r
   </target>\r
 \r
   <target name="Dlg" depends="Antlr" unless="CheckDepends">\r
-    <exec dir="${basedir}/${ToolName}" executable="dlg.exe" failonerror="TRUE">\r
+    <exec dir="${basedir}/${ToolName}" executable="dlg" failonerror="TRUE">\r
       <arg line="-C2 -i -CC -o . Parser.dlg"/>\r
     </exec>\r
   </target>\r
@@ -100,18 +101,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
-        libtool="${haveLibtool}"\r
         optimize="speed">\r
 \r
       <fileset dir="${basedir}/${ToolName}" \r
-        includes="${FileSet}" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
+        includes="${FileSet}" />\r
 \r
       <fileset dir="${basedir}/Pccts/h" \r
-        includes="${FileSetPccts}" \r
-        defaultexcludes="TRUE" \r
-        excludes="*.xml *.inf"/>\r
+        includes="${FileSetPccts}" />\r
 \r
       <includepath path="${env.WORKSPACE}/Tools/Source/TianoTools/Pccts/h"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
@@ -119,21 +115,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
       <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
-\r
-      <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
-\r
+      <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
+      <syslibset libs="stdc++" if="gcc"/>\r
     </cc>\r
   </target>\r
 \r
   <target name="clean" depends="init">\r
-    <echo message="Removing Intermediate Files Only"/>  \r
+    <echo message="Removing Intermediate Files Only"/>\r
     <delete>\r
       <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r
     </delete>\r
   </target>\r
 \r
   <target name="cleanall" depends="init">\r
-    <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>  \r
+    <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>\r
     <delete dir="${BUILD_DIR}">\r
       <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>\r
     </delete>\r
index 0022802..6d4d75b 100644 (file)
@@ -63,8 +63,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       </else>\r
     </if>\r
 \r
-    <property name="HOST_ARCH" value="IA32"/>\r
     <ToolChainSetup confPath="${WORKSPACE_DIR}/Tools/Conf" />\r
+    \r
+    <if>\r
+        <isset property="env.TOOL_CHAIN" />\r
+      <then>\r
+        <property name="ToolChain" value="${env.TOOL_CHAIN}"/>\r
+        <condition property="gcc">\r
+          <equals arg1="${ToolChain}" arg2="gcc"/>\r
+        </condition>\r
+      </then>\r
+    </if>\r
+\r
   </target>\r
   \r
   <target name="Libraries">\r