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