]>
Commit | Line | Data |
---|---|---|
878ddf1f | 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=".">\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="cpptasks.tasks"/>\r | |
21 | <typedef resource="cpptasks.types"/>\r | |
22 | <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r | |
23 | \r | |
24 | <property environment="env"/>\r | |
25 | \r | |
26 | <property name="LINK_OUTPUT_TYPE" value="static"/>\r | |
27 | <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>\r | |
28 | \r | |
29 | <target name="GenTool" depends="init, Antlr, Dlg, Tool">\r | |
30 | <echo message="Building the EDK Tool: ${ToolName}"/>\r | |
31 | </target>\r | |
32 | \r | |
33 | <target name="init">\r | |
34 | <echo message="The EDK Tool: ${ToolName}"/>\r | |
35 | <mkdir dir="${BUILD_DIR}"/>\r | |
36 | <if>\r | |
37 | <equals arg1="${GCC}" arg2="cygwin"/>\r | |
38 | <then>\r | |
39 | <echo message="Cygwin Family"/>\r | |
40 | <property name="ToolChain" value="gcc"/>\r | |
41 | </then>\r | |
42 | <elseif>\r | |
43 | <os family="dos"/>\r | |
44 | <then>\r | |
45 | <echo message="Windows Family"/>\r | |
46 | <property name="ToolChain" value="msvc"/>\r | |
47 | </then>\r | |
48 | </elseif>\r | |
49 | <elseif>\r | |
50 | <os family="unix"/>\r | |
51 | <then>\r | |
52 | <echo message="UNIX Family"/>\r | |
53 | <property name="ToolChain" value="gcc"/>\r | |
54 | </then>\r | |
55 | </elseif>\r | |
56 | \r | |
57 | <else>\r | |
58 | <echo>\r | |
59 | Unsupported Operating System\r | |
60 | Please Contact Intel Corporation\r | |
61 | </echo>\r | |
62 | </else>\r | |
63 | </if>\r | |
64 | <if>\r | |
65 | <equals arg1="${ToolChain}" arg2="msvc"/>\r | |
66 | <then>\r | |
67 | <property name="ext_static" value=".lib"/>\r | |
68 | <property name="ext_dynamic" value=".dll"/>\r | |
69 | <property name="ext_exe" value=".exe"/>\r | |
70 | </then>\r | |
71 | <elseif>\r | |
72 | <equals arg1="${ToolChain}" arg2="gcc"/>\r | |
73 | <then>\r | |
74 | <property name="ext_static" value=".a"/>\r | |
75 | <property name="ext_dynamic" value=".so"/>\r | |
76 | <property name="ext_exe" value=""/>\r | |
77 | </then>\r | |
78 | </elseif>\r | |
79 | </if>\r | |
ce53a8c3 | 80 | <condition property="CheckDepends">\r |
81 | <uptodate targetfile="${WORKSPACE}/Tools/bin/VfrCompile${ext_exe}">\r | |
82 | <srcfiles dir="${WORKSPACE}/Tools/Source/TianoTools/VfrCompile" \r | |
dce914c0 | 83 | includes="EfiVfrParser.cpp DLGLexer.cpp VfrCompile.cpp VfrCompile.g VfrServices.cpp parser.dlg"/>\r |
ce53a8c3 | 84 | </uptodate>\r |
85 | </condition>\r | |
96c0505b | 86 | \r |
87 | <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">\r | |
88 | <os family="mac"/>\r | |
ce53a8c3 | 89 | </condition>\r |
90 | \r | |
96c0505b | 91 | <condition property="gxx_extra_libs" value="stdc++">\r |
92 | <os name="linux"/>\r | |
ce53a8c3 | 93 | </condition>\r |
94 | \r | |
96c0505b | 95 | <condition property="gxx_extra_libs" value="stdc++">\r |
96 | <os family="windows"/>\r | |
ce53a8c3 | 97 | </condition>\r |
98 | \r | |
878ddf1f | 99 | </target>\r |
100 | \r | |
101 | <target name="Antlr" depends="init" unless="CheckDepends">\r | |
dce914c0 | 102 | <exec dir="${basedir}/${ToolName}" executable="antlr" failonerror="TRUE">\r |
878ddf1f | 103 | <arg line="-CC -e3 -ck 3 -o . VfrCompile.g"/>\r |
104 | </exec>\r | |
105 | </target>\r | |
106 | \r | |
107 | <target name="Dlg" depends="Antlr" unless="CheckDepends">\r | |
dce914c0 | 108 | <exec dir="${basedir}/${ToolName}" executable="dlg" failonerror="TRUE">\r |
621406c5 | 109 | <arg line="-C2 -i -CC -o . parser.dlg"/>\r |
878ddf1f | 110 | </exec>\r |
111 | </target>\r | |
112 | \r | |
113 | <target name="Tool" depends="init, Dlg">\r | |
0a022784 | 114 | <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r |
878ddf1f | 115 | outfile="${BIN_DIR}/${ToolName}"\r |
116 | outtype="executable"\r | |
878ddf1f | 117 | optimize="speed">\r |
118 | \r | |
119 | <fileset dir="${basedir}/${ToolName}" \r | |
dce914c0 | 120 | includes="${FileSet}" />\r |
878ddf1f | 121 | \r |
122 | <fileset dir="${basedir}/Pccts/h" \r | |
dce914c0 | 123 | includes="${FileSetPccts}" />\r |
878ddf1f | 124 | \r |
ce53a8c3 | 125 | <includepath path="${PACKAGE_DIR}/Pccts/h"/>\r |
21b50a27 | 126 | <includepath path="${PACKAGE_DIR}/Include"/>\r |
127 | <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r | |
878ddf1f | 128 | <includepath path="${PACKAGE_DIR}/Common"/>\r |
dce914c0 | 129 | <libset dir="${LIB_DIR}" libs="CommonTools"/>\r |
f3bf0db3 | 130 | <syslibset libs="${gxx_extra_libs}" if="gcc"/>\r |
878ddf1f | 131 | </cc>\r |
132 | </target>\r | |
133 | \r | |
134 | <target name="clean" depends="init">\r | |
dce914c0 | 135 | <echo message="Removing Intermediate Files Only"/>\r |
878ddf1f | 136 | <delete>\r |
137 | <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r | |
138 | </delete>\r | |
139 | </target>\r | |
140 | \r | |
141 | <target name="cleanall" depends="init">\r | |
dce914c0 | 142 | <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>\r |
878ddf1f | 143 | <delete dir="${BUILD_DIR}">\r |
144 | <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>\r | |
145 | </delete>\r | |
146 | </target>\r | |
147 | \r | |
148 | </project>\r |