]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/VfrCompile/build.xml
Enable source level debug of all tools
[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 debug="true"
84 optimize="speed">
85
86 <fileset dir="${basedir}/${ToolName}"
87 includes="${FileSet}" />
88
89 <fileset dir="${basedir}/Pccts/h"
90 includes="${FileSetPccts}" />
91
92 <includepath path="${PACKAGE_DIR}/Pccts/h"/>
93 <includepath path="${PACKAGE_DIR}/Include"/>
94 <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
95 <includepath path="${PACKAGE_DIR}/Common"/>
96 <libset dir="${LIB_DIR}" libs="CommonTools"/>
97 <syslibset libs="${gxx_extra_libs}" if="gcc"/>
98 </cc>
99 </target>
100
101 <target name="clean">
102 <echo message="Removing Intermediate Files Only"/>
103 <delete>
104 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
105 </delete>
106 </target>
107
108 <target name="cleanall">
109 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
110 <delete failonerror="false" quiet="true" includeEmptyDirs="true">
111 <fileset dir="${BUILD_DIR}"/>
112 <fileset file="${basedir}/${ToolName}/DLGLexer.cpp"/>
113 <fileset file="${basedir}/${ToolName}/DLGLexer.h"/>
114 <fileset file="${basedir}/${ToolName}/EfiVfrParser.cpp"/>
115 <fileset file="${basedir}/${ToolName}/EfiVfrParser.h"/>
116 <fileset file="${basedir}/${ToolName}/parser.dlg"/>
117 <fileset file="${basedir}/${ToolName}/tokens.h"/>
118 <fileset file="${basedir}/${ToolName}/VfrCompile.cpp"/>
119 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>
120 </delete>
121 </target>
122
123 </project>