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