]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/build.xml
Remove warning message in MAC GCC tool build
[mirror_edk2.git] / Tools / Source / TianoTools / build.xml
1 <?xml version="1.0" encoding="utf-8" ?>
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="all" basedir="." name="C_Code">
13 <!-- Copyright (c) 2006, Intel Corporation -->
14 <!-- Filename: Tools/Source/build.xml -->
15
16 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
17
18 <property name="ReallyVerbose" value="false"/>
19 <property environment="env" />
20
21 <property name="WORKSPACE" value="${env.WORKSPACE}" />
22 <property name="WORKSPACE_DIR" value="${WORKSPACE}" />
23 <property name="PACKAGE" value="Tools" />
24 <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools/Source/TianoTools" />
25 <property name="LIB_DIR" value="${PACKAGE_DIR}/Library" />
26 <property name="BIN_DIR" value="${WORKSPACE}/Tools/bin" />
27 <property name="BUILD_MODE" value="PACKAGE" />
28 <property name="Libs"
29 value="Common/build.xml CustomizedCompress/build.xml PeCoffLoader/build.xml String/build.xml"/>
30
31 <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml" />
32
33 <path id="classpath">
34 <fileset dir="${WORKSPACE}/Tools/Jars" includes="*.jar"/>
35 <fileset dir="${env.XMLBEANS_HOME}/lib" includes="*.jar"/>
36 </path>
37
38 <taskdef classpathref="classpath" resource="GenBuild.tasks" />
39 <taskdef classpathref="classpath" resource="net/sf/antcontrib/antlib.xml" />
40
41 <taskdef classpathref="classpath" resource="cpptasks.tasks"/>
42 <typedef classpathref="classpath" resource="cpptasks.types"/>
43
44 <target name="all" depends="init, Tools">
45 <echo message="The EDK II C Tools build complete!"/>
46 </target>
47
48 <target name="init">
49 <echo message="EDK C Code Tools, build initialization"/>
50 <mkdir dir="${BIN_DIR}" />
51 <mkdir dir="${LIB_DIR}" />
52
53 <condition property="HostArch" value="X64">
54 <os arch="amd64"/>
55 </condition>
56 <condition property="HostArch" value="Ia32">
57 <or>
58 <os arch="x86"/>
59 <os arch="i386"/>
60 </or>
61 </condition>
62 <condition property="HostArch" value="Ia32">
63 <os arch="i386"/>
64 </condition>
65
66 <if>
67 <os family="unix" />
68 <then>
69 <echo message="OS Family UNIX, ${HostArch}" />
70 </then>
71 <elseif>
72 <os family="dos" />
73 <then>
74 <echo message="OS Family DOS, ${HostArch}" />
75 </then>
76 </elseif>
77 <elseif>
78 <os family="mac" />
79 <then>
80 <echo message="OS Family OS X, ${HostArch}" />
81 </then>
82 </elseif>
83 <else>
84 <fail message="OS Family Unsupported, ${HostArch}" />
85 </else>
86 </if>
87
88 <if>
89 <not>
90 <isset property="ToolChain" />
91 </not>
92 <then>
93 <if>
94 <isset property="env.TOOL_CHAIN" />
95 <then>
96 <property name="ToolChain" value="${env.TOOL_CHAIN}"/>
97 <property name="ExtraArgus" value="-Wno-pointer-sign" />
98 </then>
99 <else>
100 <!-- Default Tool Chain is Microsoft Visual Studio -->
101 <property name="ToolChain" value="msvc"/>
102 <property name="ExtraArgus" value="" />
103 </else>
104 </if>
105 </then>
106 </if>
107
108 <condition property="linux" value="true">
109 <os name="Linux"/>
110 </condition>
111
112 <condition property="intel_win">
113 <and>
114 <os family="dos"/>
115 <equals arg1="${ToolChain}" arg2="intel"/>
116 </and>
117 </condition>
118
119 <condition property="intel_linux">
120 <and>
121 <os name="Linux"/>
122 <equals arg1="${ToolChain}" arg2="intel"/>
123 </and>
124 </condition>
125
126 <condition property="intel_mac">
127 <and>
128 <os family="mac"/>
129 <equals arg1="${ToolChain}" arg2="intel"/>
130 </and>
131 </condition>
132
133 <condition property="gcc">
134 <and>
135 <equals arg1="${ToolChain}" arg2="gcc"/>
136 </and>
137 </condition>
138
139 <condition property="cygwin">
140 <and>
141 <os family="dos"/>
142 <equals arg1="${ToolChain}" arg2="gcc"/>
143 </and>
144 </condition>
145
146 <condition property="x86_64_linux">
147 <and>
148 <os name="Linux"/>
149 <equals arg1="${HostArch}" arg2="x64"/>
150 </and>
151 </condition>
152
153 <condition property="windows" value="true">
154 <os family="Windows"/>
155 </condition>
156
157 <condition property="OSX" value="true">
158 <os family="Mac"/>
159 </condition>
160
161 <condition property="cyglinux">
162 <or>
163 <istrue value="${linux}"/>
164 <istrue value="${cygwin}"/>
165 </or>
166 </condition>
167
168 <!-- msft is a family, used by both Microsoft and Intel Windows compiler tool chains -->
169 <condition property="msft">
170 <isfalse value="${gcc}"/>
171 </condition>
172
173 <if>
174 <istrue value="${ReallyVerbose}"/>
175 <then>
176 <echo message="Test property msvc: ${msvc}"/>
177 <echo message="Test property gcc: ${gcc}"/>
178 <echo message="Test property intel_win: ${intel_win}"/>
179 <echo message="Test property intel_linux: ${intel_linux}"/>
180 <echo message="Test property intel_mac: ${intel_mac}"/>
181 <echo message="Test property msft: ${msft}"/>
182 <echo message="Test property cygwin: ${cygwin}"/>
183 <echo message="Test property cyglinux: ${cyglinux}"/>
184 <echo message="Test property windows: ${windows}"/>
185 <echo message="Test property linux: ${linux}"/>
186 <echo message="Test property OSX: ${OSX}"/>
187 <echo message="Test property x86_64_linux: ${x86_64_linux}"/>
188 </then>
189 </if>
190
191 <property name="haveLibtool" value="false"/>
192 <if>
193 <and>
194 <not>
195 <isset property="env.CYGWIN_HOME"/>
196 </not>
197 <isset property="cygwin"/>
198 </and>
199 <then>
200 <fail message="You must set the environment variable: CYGWIN_HOME"/>
201 </then>
202 </if>
203
204 <if>
205 <istrue value="${gcc}"/>
206 <then>
207 <property name="ext_static" value=".a"/>
208 <property name="ext_dynamic" value=".so"/>
209 <if>
210 <istrue value="${cygwin}"/>
211 <then>
212 <property name="ext_exe" value=".exe"/>
213 </then>
214 <else>
215 <property name="ext_exe" value=""/>
216 </else>
217 </if>
218 </then>
219 <else>
220 <property name="ext_static" value=".lib"/>
221 <property name="ext_dynamic" value=".dll"/>
222 <property name="ext_exe" value=".exe"/>
223 </else>
224 </if>
225 </target>
226
227 <target name="Libraries" depends="init">
228 <subant target="" inheritall="true">
229 <fileset dir="${PACKAGE_DIR}"
230 includes="${Libs}"/>
231 </subant>
232 </target>
233
234 <target name="Tools" depends="Libraries">
235 <subant target="" inheritall="true">
236 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"
237 excludes="${Libs}"/>
238 </subant>
239 </target>
240
241 <target name="clean" depends="init">
242 <subant target="clean" inheritall="true">
243 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
244 </subant>
245 </target>
246
247 <target name="cleanall" depends="init">
248 <subant target="cleanall" inheritall="true">
249 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
250 </subant>
251 <delete dir="${LIB_DIR}"/>
252 </target>
253 </project>