]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/VfrCompile/build.xml
Handle g++ libs correctly, since ant incorrectly does not use g++ as the linker,...
[mirror_edk2.git] / Tools / Source / TianoTools / VfrCompile / build.xml
index 217c4075cc22dc21699756838d8e1bc639864fcb..690d10ab8ea737a8855ec275de9cd1c6c4e5b9fa 100644 (file)
@@ -79,39 +79,48 @@ 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
+\r
+    <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">\r
+      <os family="mac"/>\r
+       </condition>\r
+               \r
+    <condition property="gxx_extra_libs" value="stdc++">\r
+      <os name="linux"/>\r
+       </condition>\r
+               \r
+    <condition property="gxx_extra_libs" value="stdc++">\r
+      <os family="windows"/>\r
+       </condition>\r
+               \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
-      <arg line="-C2 -i -CC -o . Parser.dlg"/>\r
+    <exec dir="${basedir}/${ToolName}" executable="dlg" failonerror="TRUE">\r
+      <arg line="-C2 -i -CC -o . parser.dlg"/>\r
     </exec>\r
   </target>\r
 \r
   <target name="Tool" depends="init, Dlg">\r
-    <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
+    <cc name="g++" 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 +128,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="${gxx_extra_libs}" 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