]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/PeiRebase/build.xml
af30cfe745769c1f73e2393068a4f36e39f29dd5
[mirror_edk2.git] / Tools / Source / TianoTools / PeiRebase / 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=".">
13 <!--
14 EDK PeiRebase Tool
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <property name="ToolName" value="PeiRebase"/>
18 <property name="FileSet" value="*.c"/>
19
20 <taskdef resource="cpptasks.tasks"/>
21 <typedef resource="cpptasks.types"/>
22 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
23
24 <property environment="env"/>
25
26 <property name="LINK_OUTPUT_TYPE" value="static"/>
27 <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>
28
29 <target name="GenTool" depends="init, Tool">
30 <echo message="Building the EDK Tool: ${ToolName}"/>
31 </target>
32
33 <target name="Tool" depends="init, PeiRebase_Ia32, PeiRebase_Ipf, PeiRebase_X64"/>
34
35 <target name="init">
36 <echo message="The EDK Tool: ${ToolName}"/>
37 <mkdir dir="${BUILD_DIR}"/>
38 <if>
39 <equals arg1="${GCC}" arg2="cygwin"/>
40 <then>
41 <echo message="Cygwin Family"/>
42 <property name="ToolChain" value="gcc"/>
43 </then>
44 <elseif>
45 <os family="dos"/>
46 <then>
47 <echo message="Windows Family"/>
48 <property name="ToolChain" value="msvc"/>
49 </then>
50 </elseif>
51 <elseif>
52 <os family="unix"/>
53 <then>
54 <echo message="UNIX Family"/>
55 <property name="ToolChain" value="gcc"/>
56 </then>
57 </elseif>
58
59 <else>
60 <echo>
61 Unsupported Operating System
62 Please Contact Intel Corporation
63 </echo>
64 </else>
65 </if>
66 <if>
67 <equals arg1="${ToolChain}" arg2="msvc"/>
68 <then>
69 <property name="ext_static" value=".lib"/>
70 <property name="ext_dynamic" value=".dll"/>
71 <property name="ext_exe" value=".exe"/>
72 </then>
73 <elseif>
74 <equals arg1="${ToolChain}" arg2="gcc"/>
75 <then>
76 <property name="ext_static" value=".a"/>
77 <property name="ext_dynamic" value=".so"/>
78 <property name="ext_exe" value=""/>
79 </then>
80 </elseif>
81 </if>
82 </target>
83
84 <target name="PeiRebase_Ia32" depends="init">
85 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
86 outfile="${BIN_DIR}/${ToolName}_Ia32"
87 outtype="executable"
88 optimize="speed">
89
90 <fileset dir="${basedir}/${ToolName}"
91 includes="${FileSet}"/>
92
93 <includepath path="${PACKAGE_DIR}/Include"/>
94 <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
95 <includepath path="${PACKAGE_DIR}/Common"/>
96 <libset dir="${LIB_DIR}" libs="CommonTools PeCoffLoader_Ia32"/>
97 </cc>
98 </target>
99
100 <target name="PeiRebase_Ipf" depends="init">
101 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
102 outfile="${BIN_DIR}/${ToolName}_Ipf"
103 outtype="executable"
104 optimize="speed">
105
106 <fileset dir="${basedir}/${ToolName}"
107 includes="${FileSet}"/>
108
109 <includepath path="${PACKAGE_DIR}/Include"/>
110 <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
111 <includepath path="${PACKAGE_DIR}/Common"/>
112 <libset dir="${LIB_DIR}" libs="CommonTools PeCoffLoader_Ipf"/>
113 </cc>
114 </target>
115
116 <target name="PeiRebase_X64" depends="init">
117 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
118 outfile="${BIN_DIR}/${ToolName}_X64"
119 outtype="executable"
120 optimize="speed">
121
122 <fileset dir="${basedir}/${ToolName}"
123 includes="${FileSet}" />
124
125 <includepath path="${PACKAGE_DIR}/Include"/>
126 <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
127 <includepath path="${PACKAGE_DIR}/Common"/>
128 <libset dir="${LIB_DIR}" libs="CommonTools PeCoffLoader_X64"/>
129 </cc>
130 </target>
131
132 <target name="clean" depends="init">
133 <echo message="Removing Intermediate Files Only"/>
134 <delete>
135 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
136 </delete>
137 </target>
138
139 <target name="cleanall" depends="init">
140 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
141 <delete dir="${BUILD_DIR}">
142 <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>
143 </delete>
144 </target>
145
146 </project>