]>
Commit | Line | Data |
---|---|---|
1 | <?xml version="1.0" ?>\r | |
2 | <!--\r | |
3 | Copyright (c) 2006, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | -->\r | |
12 | <project default="GenTool" basedir="." name="VfrCompile">\r | |
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 | |
20 | <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r | |
21 | \r | |
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 | |
26 | <echo message="The EDK Tool: ${ToolName} build has completed"/>\r | |
27 | </target>\r | |
28 | \r | |
29 | <target name="init">\r | |
30 | \r | |
31 | <echo message="Building the EDK Tool: ${ToolName}"/>\r | |
32 | <mkdir dir="${BUILD_DIR}"/>\r | |
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 | |
42 | <condition property="CheckDepends">\r | |
43 | <or>\r | |
44 | <isset property="AntlrDepends"/>\r | |
45 | <isset property="DlgDepends"/>\r | |
46 | </or>\r | |
47 | </condition>\r | |
48 | \r | |
49 | <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">\r | |
50 | <os family="mac"/>\r | |
51 | </condition>\r | |
52 | \r | |
53 | <condition property="gxx_extra_libs" value="stdc++">\r | |
54 | <os name="linux"/>\r | |
55 | </condition>\r | |
56 | \r | |
57 | <condition property="gxx_extra_libs" value="stdc++">\r | |
58 | <os family="windows"/>\r | |
59 | </condition>\r | |
60 | \r | |
61 | </target>\r | |
62 | \r | |
63 | <target name="Antlr" depends="init" unless="AntlrDepends">\r | |
64 | <echo message="Executing ANTLR"/>\r | |
65 | <exec dir="${basedir}/${ToolName}" executable="${env.FRAMEWORK_TOOLS_PATH}/antlr" failonerror="TRUE">\r | |
66 | <arg line="-CC -e3 -ck 3 -o . VfrCompile.g"/>\r | |
67 | </exec>\r | |
68 | </target>\r | |
69 | \r | |
70 | <target name="Dlg" depends="Antlr" unless="DlgDepends">\r | |
71 | <echo message="Executing DLG"/>\r | |
72 | <exec dir="${basedir}/${ToolName}" executable="${env.FRAMEWORK_TOOLS_PATH}/dlg" failonerror="TRUE">\r | |
73 | <arg line="-C2 -i -CC -o . parser.dlg"/>\r | |
74 | </exec>\r | |
75 | </target>\r | |
76 | \r | |
77 | <target name="Tool" depends="init">\r | |
78 | <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r | |
79 | outfile="${BIN_DIR}/${ToolName}"\r | |
80 | outtype="executable"\r | |
81 | debug="true"\r | |
82 | optimize="speed">\r | |
83 | \r | |
84 | <compilerarg value="-fpermissive" if="gcc"/>\r | |
85 | <fileset dir="${basedir}/${ToolName}" \r | |
86 | includes="${FileSet}" />\r | |
87 | \r | |
88 | <fileset dir="${basedir}/Pccts/h" \r | |
89 | includes="${FileSetPccts}" />\r | |
90 | \r | |
91 | <includepath path="${PACKAGE_DIR}/Pccts/h"/>\r | |
92 | <includepath path="${PACKAGE_DIR}/Include"/>\r | |
93 | <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r | |
94 | <includepath path="${PACKAGE_DIR}/Common"/>\r | |
95 | <libset dir="${LIB_DIR}" libs="CommonTools"/>\r | |
96 | <syslibset libs="${gxx_extra_libs}" if="gcc"/>\r | |
97 | </cc>\r | |
98 | </target>\r | |
99 | \r | |
100 | <target name="clean">\r | |
101 | <echo message="Removing Intermediate Files Only"/>\r | |
102 | <delete>\r | |
103 | <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r | |
104 | </delete>\r | |
105 | </target>\r | |
106 | \r | |
107 | <target name="cleanall">\r | |
108 | <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>\r | |
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 | |
119 | <fileset file="${BIN_DIR}/${ToolName}.pdb"/>\r | |
120 | </delete>\r | |
121 | </target>\r | |
122 | \r | |
123 | </project>\r |