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