Downgrade the checking for 'extra qualification' introduced by latest gcc version
[mirror_edk2.git] / Tools / CCode / Source / VfrCompile / build.xml
CommitLineData
878ddf1f 1<?xml version="1.0" ?>\r
2<!--\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11-->\r
af1dd46d 12<project default="GenTool" basedir="." name="VfrCompile">\r
878ddf1f 13<!--\r
14 EDK VfrCompile Tool\r
15 Copyright (c) 2006, Intel Corporation\r
16-->\r
17 <property name="ToolName" value="VfrCompile"/>\r
18 <property name="FileSet" value="*.cpp"/>\r
19 <property name="FileSetPccts" value="ATokenBuffer.cpp DLexerBase.cpp AParser.cpp"/>\r
878ddf1f 20 <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
21\r
878ddf1f 22 <property name="LINK_OUTPUT_TYPE" value="static"/>\r
23 <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>\r
24\r
25 <target name="GenTool" depends="init, Antlr, Dlg, Tool">\r
af1dd46d 26 <echo message="The EDK Tool: ${ToolName} build has completed"/>\r
878ddf1f 27 </target>\r
28\r
29 <target name="init">\r
af1dd46d 30\r
31 <echo message="Building the EDK Tool: ${ToolName}"/>\r
878ddf1f 32 <mkdir dir="${BUILD_DIR}"/>\r
af1dd46d 33\r
34 <condition property="AntlrDepends">\r
35 <uptodate targetfile="${PACKAGE_DIR}/VfrCompile/parser.dlg" srcfile="${PACKAGE_DIR}/VfrCompile/VfrCompile.g" value="true"/>\r
36 </condition>\r
37\r
38 <condition property="DlgDepends">\r
39 <uptodate targetfile="${PACKAGE_DIR}/VfrCompile/DLGLexer.cpp" srcfile="${PACKAGE_DIR}/VfrCompile/parser.dlg" value="true"/>\r
40 </condition>\r
41\r
ce53a8c3 42 <condition property="CheckDepends">\r
af1dd46d 43 <or>\r
44 <isset property="AntlrDepends"/>\r
45 <isset property="DlgDepends"/>\r
46 </or>\r
ce53a8c3 47 </condition>\r
96c0505b 48\r
49 <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">\r
50 <os family="mac"/>\r
af1dd46d 51 </condition>\r
ce53a8c3 52 \r
96c0505b 53 <condition property="gxx_extra_libs" value="stdc++">\r
54 <os name="linux"/>\r
af1dd46d 55 </condition>\r
ce53a8c3 56 \r
96c0505b 57 <condition property="gxx_extra_libs" value="stdc++">\r
58 <os family="windows"/>\r
af1dd46d 59 </condition>\r
ce53a8c3 60 \r
878ddf1f 61 </target>\r
62\r
af1dd46d 63 <target name="Antlr" depends="init" unless="AntlrDepends">\r
64 <echo message="Executing ANTLR"/>\r
5179dda3 65 <exec dir="${basedir}/${ToolName}" executable="${env.FRAMEWORK_TOOLS_PATH}/antlr" failonerror="TRUE">\r
878ddf1f 66 <arg line="-CC -e3 -ck 3 -o . VfrCompile.g"/>\r
67 </exec>\r
68 </target>\r
69\r
af1dd46d 70 <target name="Dlg" depends="Antlr" unless="DlgDepends">\r
71 <echo message="Executing DLG"/>\r
5179dda3 72 <exec dir="${basedir}/${ToolName}" executable="${env.FRAMEWORK_TOOLS_PATH}/dlg" failonerror="TRUE">\r
621406c5 73 <arg line="-C2 -i -CC -o . parser.dlg"/>\r
878ddf1f 74 </exec>\r
75 </target>\r
76\r
af1dd46d 77 <target name="Tool" depends="init">\r
0a022784 78 <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
878ddf1f 79 outfile="${BIN_DIR}/${ToolName}"\r
80 outtype="executable"\r
b7b99c76 81 debug="true"\r
878ddf1f 82 optimize="speed">\r
83\r
242c77a0 84 <compilerarg value="-fpermissive" if="gcc"/>\r
878ddf1f 85 <fileset dir="${basedir}/${ToolName}" \r
dce914c0 86 includes="${FileSet}" />\r
878ddf1f 87\r
88 <fileset dir="${basedir}/Pccts/h" \r
dce914c0 89 includes="${FileSetPccts}" />\r
878ddf1f 90\r
ce53a8c3 91 <includepath path="${PACKAGE_DIR}/Pccts/h"/>\r
21b50a27 92 <includepath path="${PACKAGE_DIR}/Include"/>\r
c7c42e40 93 <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
878ddf1f 94 <includepath path="${PACKAGE_DIR}/Common"/>\r
dce914c0 95 <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
f3bf0db3 96 <syslibset libs="${gxx_extra_libs}" if="gcc"/>\r
878ddf1f 97 </cc>\r
98 </target>\r
99\r
af1dd46d 100 <target name="clean">\r
dce914c0 101 <echo message="Removing Intermediate Files Only"/>\r
878ddf1f 102 <delete>\r
103 <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r
104 </delete>\r
105 </target>\r
106\r
af1dd46d 107 <target name="cleanall">\r
dce914c0 108 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>\r
af1dd46d 109 <delete failonerror="false" quiet="true" includeEmptyDirs="true">\r
110 <fileset dir="${BUILD_DIR}"/>\r
111 <fileset file="${basedir}/${ToolName}/DLGLexer.cpp"/>\r
112 <fileset file="${basedir}/${ToolName}/DLGLexer.h"/>\r
113 <fileset file="${basedir}/${ToolName}/EfiVfrParser.cpp"/>\r
114 <fileset file="${basedir}/${ToolName}/EfiVfrParser.h"/>\r
115 <fileset file="${basedir}/${ToolName}/parser.dlg"/>\r
116 <fileset file="${basedir}/${ToolName}/tokens.h"/>\r
117 <fileset file="${basedir}/${ToolName}/VfrCompile.cpp"/>\r
118 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>\r
8973d176 119 <fileset file="${BIN_DIR}/${ToolName}.pdb"/>\r
878ddf1f 120 </delete>\r
121 </target>\r
122\r
123</project>\r