Let specify GUID value for GUID-defined FV region, and remove potential dead loop...
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
CommitLineData
62f022cc 1<?xml version="1.0" encoding="UTF-8"?>\r
878ddf1f 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
12<project name="common">\r
88f858a1 13 <!--\r
14 Macro for intialize some properties. This Macro build will be called before source file build. \r
15 -->\r
16 <macrodef name="Build_Init">\r
1549f516 17 <element name="EXTRA.INC" optional="yes"/>\r
18 <element name="EXTRA.ARG" optional="yes"/>\r
19 \r
88f858a1 20 <sequential>\r
21 <var name="OBJECTS" value="" />\r
22 <var name="SDB_FILES" value="" />\r
1549f516 23\r
24 <if>\r
fd6c41f5 25 <and>\r
26 <isset property="PCH"/>\r
27 <not>\r
28 <equals arg1="${PCH}" arg2=""/>\r
29 </not>\r
30 </and>\r
1549f516 31 <then>\r
32 <if>\r
33 <available type="file" file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
34 <then>\r
35 <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep">\r
36 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
37 <EXTRA.INC/>\r
38 </makedeps>\r
39 </then>\r
40 </if>\r
41 \r
42 <OnDependency>\r
43 <sourcefiles>\r
44 <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
45 </sourcefiles>\r
46 <targetfiles>\r
47 <file Name="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
48 </targetfiles>\r
49 \r
50 <sequential>\r
51 <!-- Generate pre-compiled header -->\r
52 <cc userdefine="on">\r
53 <command type="CC" cmd="${PCH}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
877de749 54 outputFile="${DEST_DIR_OUTPUT}/AutoGen.h.obj" dpath="${CC_DPATH}" libpath="${CC_LIBPATH}" \r
55 include="${CC_INCLUDEPATH}">\r
1549f516 56 <EXTRA.INC/>\r
57 <argument value="${PCH_FLAGS}"/>\r
58 <EXTRA.ARG/>\r
59 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
60 </command>\r
61 </cc>\r
62\r
63 <if>\r
64 <equals arg1="${CC_FAMILY}" arg2="GCC"/>\r
65 <then>\r
aba23ad9 66 <move file="${DEST_DIR_OUTPUT}/AutoGen.h.obj" tofile="${DEST_DIR_DEBUG}/AutoGen.h.gch" overwrite="true"/>\r
1549f516 67 </then>\r
1549f516 68 </if>\r
69 </sequential>\r
70 </OnDependency>\r
aba23ad9 71\r
72 <if>\r
73 <not>\r
74 <equals arg1="${CC_FAMILY}" arg2="GCC"/>\r
75 </not>\r
76 <then>\r
77 <var name="OBJECTS" value="${OBJECTS} AutoGen.h.obj"/>\r
78 </then>\r
79 </if>\r
1549f516 80 </then>\r
81 </if>\r
88f858a1 82 </sequential>\r
83 </macrodef>\r
84\r
85\r
878ddf1f 86 <!--\r
87 macro definitions for building files with different types\r
88 -->\r
89 <!--\r
90 C Code\r
91 -->\r
5fc17c92 92 <macrodef name="Build_CCode">\r
878ddf1f 93 <attribute name="FILEPATH"/>\r
94 <attribute name="FILENAME"/>\r
95 <attribute name="FILEEXT" default="c"/>\r
5fc17c92 96 \r
878ddf1f 97 <element name="EXTRA.INC" optional="yes"/>\r
98 <element name="EXTRA.ARG" optional="yes"/>\r
5fc17c92 99 \r
878ddf1f 100 <sequential>\r
5fc17c92 101 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
102 <var name="FILE_PATH" value="@{FILEPATH}" />\r
22e0585c 103 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 104\r
105 <if>\r
22e0585c 106 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 107 <then>\r
22e0585c 108 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
109 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
110 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
878ddf1f 111 <EXTRA.INC/>\r
112 </makedeps>\r
113 </then>\r
114 </if>\r
115\r
116 <OnDependency>\r
117 <sourcefiles>\r
22e0585c 118 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 119 </sourcefiles>\r
120 <targetfiles>\r
22e0585c 121 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 122 </targetfiles>\r
123\r
124 <sequential>\r
125 <cc userdefine="on">\r
5fc17c92 126 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
877de749 127 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${CC_DPATH}" \r
128 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}">\r
878ddf1f 129 <EXTRA.INC/>\r
1549f516 130 <argument value="${CC_FLAGS}"/>\r
878ddf1f 131 <EXTRA.ARG/>\r
3fc9d866 132 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 133 </command>\r
134 </cc>\r
135 </sequential>\r
136 </OnDependency>\r
32a47954 137 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
138 <if>\r
139 <equals arg1="@{FILEPATH}" arg2="." />\r
140 <then>\r
141 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
142 </then>\r
143 <else>\r
144 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
145 </else>\r
146 </if>\r
878ddf1f 147 </sequential>\r
148 </macrodef>\r
149\r
150\r
151 <macrodef name="Build_AUTOGEN">\r
152 <attribute name="FILEPATH"/>\r
153 <attribute name="FILENAME"/>\r
154 <attribute name="FILEEXT" default="c"/>\r
155\r
156 <element name="EXTRA.INC" optional="yes"/>\r
157 <element name="EXTRA.ARG" optional="yes"/>\r
158\r
159 <sequential>\r
5fc17c92 160 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
161 <var name="FILE_PATH" value="@{FILEPATH}" />\r
22e0585c 162 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 163\r
164 <if>\r
22e0585c 165 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 166 <then>\r
22e0585c 167 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
168 <input file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
169 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
878ddf1f 170 <EXTRA.INC/>\r
171 </makedeps>\r
172 </then>\r
173 </if>\r
174\r
175 <OnDependency>\r
176 <sourcefiles>\r
22e0585c 177 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 178 </sourcefiles>\r
179 <targetfiles>\r
22e0585c 180 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 181 </targetfiles>\r
182\r
183 <sequential>\r
184 <cc userdefine="on">\r
5fc17c92 185 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
877de749 186 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${CC_DPATH}"\r
187 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}">\r
878ddf1f 188 <EXTRA.INC/>\r
1549f516 189 <argument value="${CC_FLAGS}"/>\r
878ddf1f 190 <EXTRA.ARG/>\r
3fc9d866 191 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 192 </command>\r
193 </cc>\r
194 </sequential>\r
195 </OnDependency>\r
32a47954 196 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
197 <if>\r
198 <equals arg1="@{FILEPATH}" arg2="." />\r
199 <then>\r
200 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
201 </then>\r
202 <else>\r
203 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
204 </else>\r
205 </if>\r
878ddf1f 206 </sequential>\r
207 </macrodef>\r
208\r
5fc17c92 209 <macrodef name="Build_DPX">\r
878ddf1f 210 <attribute name="FILEPATH"/>\r
211 <attribute name="FILENAME"/>\r
212 <attribute name="FILEEXT" default="dxs"/>\r
213\r
214 <element name="EXTRA.INC" optional="yes"/>\r
215 <element name="EXTRA.ARG" optional="yes"/>\r
5fc17c92 216 \r
878ddf1f 217\r
218 <sequential>\r
5fc17c92 219 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
220 <var name="FILE_PATH" value="@{FILEPATH}" />\r
22e0585c 221 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 222\r
223 <OnDependency>\r
224 <sourcefiles>\r
22e0585c 225 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 226 </sourcefiles>\r
227 <targetfiles>\r
5fc17c92 228 <file name="${DEST_DIR_OUTPUT}/${BASE_NAME}.depex"/>\r
878ddf1f 229 </targetfiles>\r
230\r
231 <sequential>\r
878ddf1f 232 <cc userdefine="on">\r
df569f61 233 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${CC_FAMILY}"\r
877de749 234 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i" dpath="${CC_DPATH}"\r
235 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}">\r
878ddf1f 236 <EXTRA.INC/>\r
237 <argument value="${PP_FLAGS}"/>\r
3fc9d866 238 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 239 </command>\r
240 </cc>\r
5fc17c92 241 \r
df569f61 242 <gendepex inputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i" outputFile="${DEST_DIR_OUTPUT}/${BASE_NAME}.depex"/>\r
878ddf1f 243 </sequential>\r
244 </OnDependency>\r
245 </sequential>\r
246 </macrodef>\r
5fc17c92 247 \r
248 <macrodef name="Build_ASM">\r
878ddf1f 249 <attribute name="FILEPATH"/>\r
250 <attribute name="FILENAME"/>\r
251 <attribute name="FILEEXT" default="asm"/>\r
252\r
253 <element name="EXTRA.INC" optional="yes"/>\r
254 <element name="EXTRA.ARG" optional="yes"/>\r
5fc17c92 255 \r
256 <!-- Dispath ASM file, there are three type. \r
df569f61 257 asm - Build_Assembly\r
258 S - Build_Gcc_Assembly\r
259 s - Build_Ipf_Assembly -->\r
878ddf1f 260 <sequential>\r
5fc17c92 261 <if>\r
df569f61 262 <equals arg1="@{FILEEXT}" arg2="asm" />\r
5fc17c92 263 <then>\r
264 <Build_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
265 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>\r
266 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>\r
267 </Build_Assembly>\r
268 </then>\r
df569f61 269 <elseif>\r
270 <equals arg1="@{FILEEXT}" arg2="S" />\r
271 <then>\r
272 <Build_Gcc_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
273 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>\r
274 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>\r
275 </Build_Gcc_Assembly>\r
276 </then>\r
277 </elseif>\r
5fc17c92 278 <elseif>\r
25832ed3 279 <equals arg1="@{FILEEXT}" arg2="s" />\r
5fc17c92 280 <then>\r
281 <Build_IPF_Assembly_Code FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
282 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>\r
283 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>\r
284 </Build_IPF_Assembly_Code>\r
285 </then>\r
286 </elseif>\r
287 </if>\r
878ddf1f 288 </sequential>\r
289 </macrodef>\r
5fc17c92 290 \r
0fd9e137 291 <!--\r
5fc17c92 292 IA32/x64 Assembly\r
0fd9e137 293 -->\r
5fc17c92 294 <macrodef name="Build_Assembly">\r
0fd9e137 295 <attribute name="FILEPATH"/>\r
296 <attribute name="FILENAME"/>\r
297 <attribute name="FILEEXT" default="asm"/>\r
298\r
5fc17c92 299 <element name="EXTRA.INC.1" optional="yes"/>\r
300 <element name="EXTRA.ARG.1" optional="yes"/>\r
0fd9e137 301\r
302 <sequential>\r
5fc17c92 303 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
304 <var name="FILE_PATH" value="@{FILEPATH}" />\r
0fd9e137 305 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
306\r
0fd9e137 307 <OnDependency>\r
308 <sourcefiles>\r
5fc17c92 309 <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
0fd9e137 310 </sourcefiles>\r
311 <targetfiles>\r
312 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
313 </targetfiles>\r
314\r
315 <sequential>\r
c44794ef 316 <cc userdefine="on">\r
877de749 317 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${PP_FAMILY}" \r
318 dpath="${PP_DPATH}" libpath="${PP_LIBPATH}" include="${PP_INCLUDEPATH}">\r
c44794ef 319 <EXTRA.INC.1/>\r
320 <argument value="${PP_FLAGS}"/>\r
3fc9d866 321 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
c44794ef 322 </command>\r
323 </cc>\r
324\r
325 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"\r
326 match="^(#line +1 +.*@{FILEPATH}/@{FILENAME}\.@{FILEEXT}&quot;).+\1"\r
327 replace=";"\r
328 flags="gs"/>\r
329 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"\r
330 match="^(#line .*)$"\r
331 replace="; \1"\r
332 byline="true"/>\r
333 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"\r
334 match="([^_a-zA-Z])0x([0-9a-fA-F]+)"\r
335 replace="\10\2h"\r
336 flags="g"\r
337 byline="true"/>\r
0d2001d3 338\r
0fd9e137 339 <cc userdefine="on">\r
5fc17c92 340 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"\r
877de749 341 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${ASM_DPATH}"\r
342 libpath="${ASM_LIBPATH}" include="${ASM_INCLUDEPATH}">\r
5fc17c92 343 <EXTRA.INC.1/>\r
344 \r
0fd9e137 345 <argument value="${ASM_FLAGS}"/>\r
5fc17c92 346 <EXTRA.ARG.1/>\r
347 \r
3fc9d866 348 <fileset casesensitive="on" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>\r
75d0c5b1 349 </command>\r
350 </cc>\r
351 </sequential>\r
352 </OnDependency>\r
32a47954 353 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
354 <if>\r
355 <equals arg1="@{FILEPATH}" arg2="." />\r
356 <then>\r
357 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
358 </then>\r
359 <else>\r
360 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
361 </else>\r
362 </if>\r
75d0c5b1 363 </sequential>\r
df569f61 364 </macrodef>\r
365\r
366 <!--\r
367 Build GCC assembly code\r
368 -->\r
369 <macrodef name="Build_Gcc_Assembly">\r
370 <attribute name="FILEPATH"/>\r
371 <attribute name="FILENAME"/>\r
372 <attribute name="FILEEXT" default="asm"/>\r
373\r
374 <element name="EXTRA.INC.1" optional="yes"/>\r
375 <element name="EXTRA.ARG.1" optional="yes"/>\r
376\r
377 <sequential>\r
378 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
379 <var name="FILE_PATH" value="@{FILEPATH}" />\r
380 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
381\r
382 <OnDependency>\r
383 <sourcefiles>\r
384 <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
385 </sourcefiles>\r
386 <targetfiles>\r
387 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
388 </targetfiles>\r
389\r
390 <sequential>\r
df569f61 391 <cc userdefine="on">\r
392 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"\r
877de749 393 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" dpath="${ASM_DPATH}"\r
394 libpath="${ASM_LIBPATH}" include="${ASM_INCLUDEPATH}">\r
df569f61 395 <EXTRA.INC.1/>\r
396 \r
397 <argument value="${ASM_FLAGS}"/>\r
398 <EXTRA.ARG.1/>\r
399 \r
3fc9d866 400 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
df569f61 401 </command>\r
402 </cc>\r
403 </sequential>\r
404 </OnDependency>\r
32a47954 405 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
406 <if>\r
407 <equals arg1="@{FILEPATH}" arg2="." />\r
408 <then>\r
409 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
410 </then>\r
411 <else>\r
412 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
413 </else>\r
414 </if>\r
df569f61 415 </sequential>\r
75d0c5b1 416 </macrodef>\r
417\r
878ddf1f 418 <!--\r
419 IPF Assembly\r
420 -->\r
421 <macrodef name="Build_IPF_Assembly_Code">\r
422 <attribute name="FILEPATH"/>\r
423 <attribute name="FILENAME"/>\r
424 <attribute name="FILEEXT" default="s"/>\r
425\r
5fc17c92 426 <element name="EXTRA.INC.1" optional="yes"/>\r
427 <element name="EXTRA.ARG.1" optional="yes"/>\r
878ddf1f 428\r
429 <sequential>\r
22e0585c 430 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 431\r
432 <if>\r
22e0585c 433 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 434 <then>\r
22e0585c 435 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
436 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
adb6105a 437 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
5fc17c92 438 <EXTRA.INC.1/>\r
878ddf1f 439 </makedeps>\r
440 </then>\r
441 </if>\r
442\r
443 <OnDependency>\r
444 <sourcefiles>\r
22e0585c 445 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 446 </sourcefiles>\r
447 <targetfiles>\r
22e0585c 448 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 449 </targetfiles>\r
450\r
451 <sequential>\r
878ddf1f 452 <cc userdefine="on">\r
877de749 453 <command type="PP" cmd="${APP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${APP_FAMILY}" \r
454 dpath="${APP_DPATH}" libpath="${APP_LIBPATH}" include="${APP_INCLUDEPATH}">\r
5fc17c92 455 <EXTRA.INC.1/>\r
0b8fc154 456 <argument value="${APP_FLAGS}"/>\r
3fc9d866 457 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 458 </command>\r
459 </cc>\r
5fc17c92 460 \r
878ddf1f 461 <cc userdefine="on">\r
5fc17c92 462 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"\r
32c8b5a9 463 includepathDelimiter="-I" outputDelimiter="-o" dpath="${ASM_DPATH}"\r
877de749 464 libpath="${ASM_LIBPATH}" include="${ASM_INCLUDEPATH}"\r
5fc17c92 465 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
466 <EXTRA.INC.1/>\r
878ddf1f 467 <argument value="${ASM_FLAGS}"/>\r
5fc17c92 468 <EXTRA.ARG.1/>\r
3fc9d866 469 <fileset casesensitive="on" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>\r
878ddf1f 470 </command>\r
471 </cc>\r
472 </sequential>\r
473 </OnDependency>\r
32a47954 474 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
475 <if>\r
476 <equals arg1="@{FILEPATH}" arg2="." />\r
477 <then>\r
478 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
479 </then>\r
480 <else>\r
481 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
482 </else>\r
483 </if>\r
878ddf1f 484 </sequential>\r
485 </macrodef>\r
486\r
487\r
488 <macrodef name="Build_IPF_PP_Code">\r
489 <attribute name="FILEPATH"/>\r
490 <attribute name="FILENAME"/>\r
491 <attribute name="FILEEXT" default="i"/>\r
492\r
493 <element name="EXTRA.INC" optional="yes"/>\r
494 <element name="EXTRA.ARG" optional="yes"/>\r
495\r
496 <sequential>\r
22e0585c 497 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
5fc17c92 498 \r
878ddf1f 499 <cc userdefine="on">\r
877de749 500 <command type="ASM" includepathDelimiter="-I" dpath="${ASM_DPATH}"\r
501 libpath="${ASM_LIBPATH}" include="${ASM_INCLUDEPATH}">\r
878ddf1f 502 <includepath path="${WORKSPACE_DIR}"/>\r
503 <includepath path="${MODULE_DIR}"/>\r
22e0585c 504 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 505 <EXTRA.INC/>\r
5fc17c92 506 \r
878ddf1f 507 <argument value="${ASM_FLAGS}"/>\r
508 <EXTRA.ARG/>\r
22e0585c 509 <OutputFile File="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
5fc17c92 510 \r
3fc9d866 511 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 512 </command>\r
513 </cc>\r
878ddf1f 514 </sequential>\r
515 </macrodef>\r
5fc17c92 516 \r
517 \r
518 <!--\r
519 Library private HashMap map = new HashMap();\r
878ddf1f 520 -->\r
5fc17c92 521 <macrodef name="Build_Library">\r
522 <attribute name="FILENAME" />\r
523 <attribute name="FILEEXT" default="obj"/>\r
524 \r
525 <sequential>\r
526 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
527 <var name="FILE_PATH" value="." />\r
528 <mkdir dir="${BIN_DIR}"/>\r
878ddf1f 529\r
5fc17c92 530 <OnDependency>\r
531 <sourcefiles>\r
32a47954 532 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r
5fc17c92 533 </sourcefiles>\r
534 <targetfiles>\r
535 <file name="${BIN_DIR}/@{FILENAME}.lib"/>\r
536 </targetfiles>\r
878ddf1f 537\r
5fc17c92 538 <sequential>\r
539 <cc userdefine="on">\r
540 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"\r
877de749 541 outputFile="${BIN_DIR}/@{FILENAME}.lib" dpath="${SLINK_DPATH}"\r
542 libpath="${SLINK_LIBPATH}" include="${SLINK_INCLUDEPATH}">\r
5fc17c92 543 <argument value="${SLINK_FLAGS}"/>\r
878ddf1f 544\r
32a47954 545 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>\r
5fc17c92 546 </command>\r
547 </cc>\r
548 </sequential>\r
549 </OnDependency>\r
878ddf1f 550 </sequential>\r
551 </macrodef>\r
552\r
553 <!--\r
554 Unicode -> .sdb\r
555 -->\r
5fc17c92 556 <macrodef name="Build_UNI">\r
878ddf1f 557 <attribute name="FILEPATH"/>\r
558 <attribute name="FILENAME"/>\r
559 <attribute name="FILEEXT" default="uni"/>\r
560\r
561 <element name="EXTRA.INC" optional="yes"/>\r
562 <element name="EXTRA.ARG" optional="yes"/>\r
563\r
564 <sequential>\r
22e0585c 565 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 566\r
567 <OnDependency>\r
568 <sourcefiles>\r
22e0585c 569 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 570 </sourcefiles>\r
571 <targetfiles>\r
22e0585c 572 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 573 </targetfiles>\r
574\r
575 <sequential>\r
576 <strgather commandtype="parse" newdatabase="true">\r
22e0585c 577 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 578 <EXTRA.INC/>\r
579 <EXTRA.ARG/>\r
22e0585c 580 <inputfile name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 581 </strgather>\r
582 </sequential>\r
583 </OnDependency>\r
584\r
5fc17c92 585 <var name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 586 </sequential>\r
587 </macrodef>\r
588\r
589 <!--\r
590 .sdb(s) -> .c, .h -> .obj\r
591 -->\r
592 <macrodef name="Build_Unicode_Database">\r
593 <attribute name="FILEPATH"/>\r
594 <attribute name="FILENAME"/>\r
595 <attribute name="FILEEXT" default="sdb"/>\r
596\r
597 <element name="EXTRA.INC" optional="yes"/>\r
598 <element name="EXTRA.ARG" optional="yes"/>\r
599\r
600 <sequential>\r
5fc17c92 601 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
602 <var name="FILE_PATH" value="@{FILEPATH}" />\r
878ddf1f 603 <OnDependency>\r
604 <sourcefiles>\r
605 <file list="${SDB_FILES}"/>\r
606 <file list="${SOURCE_FILES}"/>\r
607 </sourcefiles>\r
608 <targetfiles>\r
22e0585c 609 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 610 </targetfiles>\r
5fc17c92 611 \r
878ddf1f 612 <sequential>\r
22e0585c 613 <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb" verbose="read">\r
878ddf1f 614 <skipext name=".uni"/>\r
615 <skipext name=".h"/>\r
616 <database list="${SDB_FILES}"/>\r
617 <inputfile name="${SOURCE_FILES}"/>\r
618 </strgather>\r
619 </sequential>\r
620 </OnDependency>\r
621\r
622 <OnDependency>\r
623 <sourcefiles>\r
22e0585c 624 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 625 </sourcefiles>\r
626 <targetfiles>\r
22e0585c 627 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"/>\r
628 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"/>\r
629 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 630 </targetfiles>\r
5fc17c92 631 \r
878ddf1f 632 <sequential>\r
633 <strgather basename="@{FILENAME}Strings" commandtype="dump"\r
22e0585c 634 outputdefines="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"\r
635 outputhpk="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"\r
636 outputstring="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c">\r
637 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 638 </strgather>\r
639 </sequential>\r
640 </OnDependency>\r
641\r
642 <OnDependency>\r
643 <sourcefiles>\r
22e0585c 644 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
20480ea1 645 <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
878ddf1f 646 </sourcefiles>\r
647 <targetfiles>\r
22e0585c 648 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 649 </targetfiles>\r
5fc17c92 650 \r
878ddf1f 651 <sequential>\r
652 <cc userdefine="on">\r
5fc17c92 653 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
32c8b5a9 654 includepathDelimiter="-I" dpath="${CC_DPATH}"\r
877de749 655 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}"\r
5fc17c92 656 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj">\r
1549f516 657 <argument value="${CC_FLAGS}"/>\r
5fc17c92 658 <EXTRA.INC />\r
3fc9d866 659 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 660 </command>\r
661 </cc>\r
662 </sequential>\r
663 </OnDependency>\r
4436ffdc 664\r
32a47954 665 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
666 <if>\r
667 <equals arg1="@{FILEPATH}" arg2="." />\r
668 <then>\r
669 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}Strings.obj" />\r
670 </then>\r
671 <else>\r
672 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}Strings.obj" />\r
673 </else>\r
674 </if>\r
878ddf1f 675 </sequential>\r
676 </macrodef>\r
677\r
678 <!--\r
679 Vfr\r
680 -->\r
5fc17c92 681 <macrodef name="Build_VFR">\r
878ddf1f 682 <attribute name="FILEPATH"/>\r
683 <attribute name="FILENAME"/>\r
684 <attribute name="FILEEXT" default="vfr"/>\r
685\r
686 <element name="EXTRA.INC" optional="yes"/>\r
687 <element name="EXTRA.ARG" optional="yes"/>\r
688\r
689 <sequential>\r
690 <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>\r
691\r
692 <if>\r
22e0585c 693 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 694 <then>\r
22e0585c 695 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
696 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
adb6105a 697 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
878ddf1f 698 <EXTRA.INC/>\r
699 </makedeps>\r
700 </then>\r
701 </if>\r
702\r
703 <OnDependency>\r
704 <sourcefiles>\r
22e0585c 705 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 706 </sourcefiles>\r
707 <targetfiles>\r
22e0585c 708 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 709 </targetfiles>\r
710\r
711 <sequential>\r
62f022cc 712 <!-- if "TOOLCHIAN FAMILY" is "GCC", it should point the ouput file for preprocess compiler --> \r
713 <if>\r
714 <equals arg1="${CC_FAMILY}" arg2="GCC"/>\r
715 <then>\r
716 <cc userdefine="on">\r
717 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${PP_FAMILY}" \r
718 dpath="${PP_DPATH}" libpath="${PP_LIBPATH}" include="${PP_INCLUDEPATH}">\r
719 <argument value="${VFRPP_FLAGS} -o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>\r
720 <!-- Output file of the preprocess --> \r
721 <EXTRA.INC/> \r
722 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/> \r
723 </command>\r
724 </cc>\r
725 </then>\r
726 </if>\r
727 \r
728 <if>\r
729 <not>\r
730 <equals arg1="${CC_FAMILY}" arg2="GCC"/>\r
731 </not>\r
732 <then>\r
733 <cc userdefine="on">\r
734 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${PP_FAMILY}" \r
735 dpath="${PP_DPATH}" libpath="${PP_LIBPATH}" include="${PP_INCLUDEPATH}">\r
55cc5329 736 <argument value="${VFRPP_FLAGS} ${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
62f022cc 737 <!-- Output file of the preprocess --> \r
738 <EXTRA.INC/> \r
739 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/> \r
740 </command>\r
741 </cc>\r
742 </then>\r
743 </if>\r
744 \r
b609c89b 745 \r
746 <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}/@{FILEPATH}" vfrFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i">\r
878ddf1f 747 <EXTRA.INC/>\r
748 </vfrcompile>\r
5fc17c92 749 \r
878ddf1f 750 <cc userdefine="on">\r
5fc17c92 751 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" \r
32c8b5a9 752 includepathDelimiter="-I" family="${CC_FAMILY}" dpath="${CC_DPATH}"\r
877de749 753 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}"\r
5fc17c92 754 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" >\r
1549f516 755 <argument value="${CC_FLAGS}"/>\r
5fc17c92 756 <EXTRA.INC/>\r
878ddf1f 757 <EXTRA.ARG/>\r
3fc9d866 758 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
878ddf1f 759 </command>\r
760 </cc>\r
878ddf1f 761 </sequential>\r
762 </OnDependency>\r
32a47954 763 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
764 <if>\r
765 <equals arg1="@{FILEPATH}" arg2="." />\r
766 <then>\r
767 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
768 </then>\r
769 <else>\r
770 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
771 </else>\r
772 </if>\r
878ddf1f 773 </sequential>\r
774 </macrodef>\r
775\r
706c2ad4 776 <!--\r
777 Build the real mode ASM file\r
778 -->\r
779 <macrodef name="Build_RealAsm">\r
780 <attribute name="FILEPATH"/>\r
781 <attribute name="FILENAME"/>\r
782 <attribute name="FILEEXT" default="asm"/>\r
783\r
784 <element name="EXTRA.INC" optional="yes"/>\r
785 <element name="EXTRA.ARG" optional="yes"/>\r
786 \r
787 <sequential>\r
788 <!-- Lack Dependency Check -->\r
789 <exec dir="${DEST_DIR_OUTPUT}" executable="${ASM}" failonerror="true">\r
790 <arg line="/nologo /omf ${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT} /Bl${ASMLINK} ${ASMLINK_FLAGS}"/>\r
791 </exec>\r
792 <concat destfile="${DEST_DIR_OUTPUT}/@{FILENAME}.cat" binary="yes">\r
793 <filelist dir="${MODULE_DIR}" files="Blank2.pad"/>\r
794 <filelist dir="${DEST_DIR_OUTPUT}" files="@{FILENAME}.com"/>\r
795 </concat>\r
796 </sequential>\r
797 </macrodef>\r
d8022b36
LG
798\r
799 <!--\r
800 Build Asl table file\r
801 -->\r
802 <macrodef name="Build_ASL">\r
803 <attribute name="FILEPATH"/>\r
804 <attribute name="FILENAME"/>\r
805 <attribute name="FILEEXT" default="asl"/>\r
806\r
807 <element name="EXTRA.INC" optional="yes"/>\r
808 <element name="EXTRA.ARG" optional="yes"/>\r
809 \r
810 <sequential>\r
811 <mkdir dir="${DEST_DIR_OUTPUT}"/>\r
812\r
813 <OnDependency>\r
814 <sourcefiles>\r
815 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
816 </sourcefiles>\r
817 <targetfiles>\r
818 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
819 </targetfiles>\r
820\r
821 <sequential>\r
822 <cc userdefine="on">\r
823 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}" family="${PP_FAMILY}" \r
824 dpath="${PP_DPATH}" libpath="${PP_LIBPATH}" include="${PP_INCLUDEPATH}">\r
825 <argument value="${APP_FLAGS}"/>\r
826 <EXTRA.INC/> \r
827 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
828 </command>\r
829 </cc>\r
830\r
831 <exec dir="${DEST_DIR_OUTPUT}" executable="${ASL}" failonerror="true" outputproperty="ASL_OUTPUT">\r
832 <arg line="${DEST_DIR_OUTPUT}/@{FILENAME}.i"/>\r
833 </exec>\r
834\r
835 <if>\r
836 <or>\r
837 <contains string="${ASL_OUTPUT}" substring="Supports ACPI Specification Revision 2.0"/>\r
838 <contains string="${ASL_OUTPUT}" substring="Supports ACPI Specification Revision 1.0"/>\r
839 </or>\r
840 <then>\r
841 <fail message="Current Asl tool not support Acpi Spec 3.0. Pls update your Asl compiler."/>\r
842 </then>\r
843 </if>\r
844\r
845 <EFI_SECTION_RAW FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="aml"/>\r
846 \r
847 </sequential>\r
848 </OnDependency>\r
849 </sequential>\r
850 </macrodef> \r
851\r
852 <!--\r
853 Build Asl table c file\r
854 -->\r
855 <macrodef name="Build_CCASL">\r
856 <attribute name="FILEPATH"/>\r
857 <attribute name="FILENAME"/>\r
858 <attribute name="FILEEXT" default="c"/>\r
859\r
860 <element name="EXTRA.INC" optional="yes"/>\r
861 <element name="EXTRA.ARG" optional="yes"/>\r
862 \r
863 <sequential>\r
864 <mkdir dir="${DEST_DIR_OUTPUT}"/>\r
865\r
866 <OnDependency>\r
867 <sourcefiles>\r
868 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
869 </sourcefiles>\r
870 <targetfiles>\r
871 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
872 </targetfiles>\r
873\r
874 <sequential>\r
875\r
876 <cc userdefine="on">\r
877 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
878 outputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.obj" dpath="${CC_DPATH}" \r
879 libpath="${CC_LIBPATH}" include="${CC_INCLUDEPATH}">\r
880 <EXTRA.INC/>\r
881 <argument value="${CC_FLAGS}"/>\r
882 <EXTRA.ARG/>\r
883 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
884 </command>\r
885 </cc>\r
886\r
887 <cc userdefine="on">\r
888 <command type="DLINK" cmd="${DLINK}" family="${DLINK_FAMILY}" \r
889 outputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.exe" dpath="${DLINK_DPATH}" >\r
890 <argument value="${SLINK_FLAGS}"/>\r
891 <fileset casesensitive="on" file="${DEST_DIR_OUTPUT}/@{FILENAME}.obj"/>\r
892 </command>\r
893 </cc>\r
894 \r
895 <genacpitable inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.exe" outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.acpi" /> \r
896 \r
897 <EFI_SECTION_RAW FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="acpi"/>\r
898 </sequential>\r
899 </OnDependency>\r
900 </sequential>\r
901 </macrodef> \r
902\r
a99a79e4 903 <!--\r
904 DUMMY\r
905 -->\r
906 <macrodef name="Build_DUMMY">\r
907 <attribute name="FILEPATH"/>\r
908 <attribute name="FILENAME"/>\r
909 <attribute name="FILEEXT"/>\r
910\r
911 <element name="EXTRA.INC" optional="yes"/>\r
912 <element name="EXTRA.ARG" optional="yes"/>\r
913\r
914 <sequential>\r
7446fb2d 915 <!--echo message="Ignoring ${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" level="info" /-->\r
a99a79e4 916 </sequential>\r
917 </macrodef>\r
918\r
878ddf1f 919<!--############################################################################\r
920 Build Sections\r
921#############################################################################-->\r
922 <!--\r
923 DLL\r
924 -->\r
925 <macrodef name="GenDll">\r
926 <attribute name="FILEPATH"/>\r
927 <attribute name="FILENAME"/>\r
928 <attribute name="FILEEXT"/>\r
929\r
930 <element name="LIB.ARG" optional="yes"/>\r
931 <element name="LINK.ARG" optional="yes"/>\r
932\r
933 <sequential>\r
5fc17c92 934 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
935 <var name="FILE_PATH" value="@{FILEPATH}" />\r
878ddf1f 936 <OnDependency>\r
937 <sourcefiles>\r
878ddf1f 938 <file list="${LIBS}"/>\r
32a47954 939 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r
878ddf1f 940 </sourcefiles>\r
941 <targetfiles>\r
22e0585c 942 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
878ddf1f 943 </targetfiles>\r
944\r
945 <sequential>\r
8b41e66e 946 <cc userdefine="on">\r
32c8b5a9 947 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}" dpath="${SLINK_DPATH}"\r
877de749 948 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib"\r
949 libpath="${SLINKLIBPATH}" include="${SLINK_INCLUDEPATH}">\r
5fc17c92 950 <argument value="${SLINK_FLAGS}"/>\r
951\r
32a47954 952 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>\r
8b41e66e 953 </command>\r
954 </cc>\r
878ddf1f 955 <cc userdefine="on">\r
5fc17c92 956 <command type="DLINK" cmd="${DLINK}" family="${DLINK_FAMILY}"\r
877de749 957 outputFile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll" dpath="${DLINK_DPATH}" \r
958 libpath="${DLINK_LIBPATH}" include="${DLINK_INCLUDEPATH}">\r
5fc17c92 959 <argument value="${DLINK_FLAGS}"/>\r
63062e1e 960 <libset libs="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib ${LIBS} ${DLINK_SPATH}"/>\r
878ddf1f 961 <LINK.ARG/>\r
878ddf1f 962 </command>\r
963 </cc>\r
964 </sequential>\r
965 </OnDependency>\r
966 </sequential>\r
967 </macrodef>\r
968\r
969 <!--\r
970 EFI\r
971 -->\r
972 <macrodef name="GenEfi">\r
973 <attribute name="FILEPATH"/>\r
974 <attribute name="FILENAME"/>\r
975 <attribute name="FILEEXT" default="dll"/>\r
976\r
977 <sequential>\r
978 <OnDependency>\r
979 <sourcefiles>\r
22e0585c 980 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 981 </sourcefiles>\r
982 <targetfiles>\r
22e0585c 983 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 984 </targetfiles>\r
985\r
986 <sequential>\r
5fc17c92 987 <fwimage componentType="${MODULE_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
22e0585c 988 peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>\r
878ddf1f 989 </sequential>\r
990 </OnDependency>\r
991 </sequential>\r
992 </macrodef>\r
993\r
994<!--\r
995 EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
996 EFI_SECTION_VERSION\r
997 EFI_SECTION_USER_INTERFACE\r
998 EFI_SECTION_DXE_DEPEX\r
999 EFI_SECTION_PEI_DEPEX\r
1000 EFI_SECTION_PE32\r
1001 EFI_SECTION_PIC\r
1002 EFI_SECTION_TE\r
1003 EFI_SECTION_RAW\r
1004 EFI_SECTION_COMPRESSION\r
1005 EFI_SECTION_GUID_DEFINED\r
1006 EFI_SECTION_COMPATIBILITY16\r
1007 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
1008 -->\r
1009 <!--\r
1010 EFI_SECTION_PE32\r
1011 -->\r
46dde08c
LG
1012\r
1013 <macrodef name="EFI_SECTION_TE">\r
1014 <attribute name="FILEPATH"/>\r
1015 <attribute name="FILENAME"/>\r
1016 <attribute name="FILEEXT" default="" />\r
1017\r
1018 <element name="PRE.PROCESS" optional="yes"/>\r
1019 <element name="POST.PROCESS" optional="yes"/>\r
1020\r
1021 <sequential>\r
1022 <PRE.PROCESS/>\r
1023 <if>\r
1024 <not>\r
1025 <equals arg1="${LIBS}" arg2=""/>\r
1026 </not>\r
1027\r
1028 <then>\r
1029 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
1030 <LIB.ARG></LIB.ARG>\r
1031 <LINK.ARG></LINK.ARG>\r
1032 </GenDll>\r
1033\r
1034 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
1035 </then>\r
1036 </if>\r
1037\r
1038 <OnDependency>\r
1039 <sourcefiles>\r
1040 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
1041 </sourcefiles>\r
1042 <targetfiles>\r
1043 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.tes"/>\r
1044 </targetfiles>\r
1045\r
1046 <sequential>\r
1047 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />\r
1048 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" /> \r
1049 <genteimage Dump="false" Verbose="false" OutputDir="" OutputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.te" InputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
46dde08c
LG
1050 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.te" \r
1051 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.tes" \r
1052 sectiontype="EFI_SECTION_TE"/>\r
1053 <POST.PROCESS/>\r
1054 </sequential>\r
1055 </OnDependency>\r
1056 </sequential>\r
1057 </macrodef>\r
1058\r
878ddf1f 1059 <macrodef name="EFI_SECTION_PE32">\r
1060 <attribute name="FILEPATH"/>\r
1061 <attribute name="FILENAME"/>\r
1062 <attribute name="FILEEXT" default="" />\r
1063\r
1064 <element name="PRE.PROCESS" optional="yes"/>\r
1065 <element name="POST.PROCESS" optional="yes"/>\r
1066\r
1067 <sequential>\r
1068 <PRE.PROCESS/>\r
878ddf1f 1069 <if>\r
1070 <not>\r
5fc17c92 1071 <!-- TBD ${OBJECTS} -->\r
1072 <equals arg1="${LIBS}" arg2=""/>\r
878ddf1f 1073 </not>\r
1074\r
1075 <then>\r
1076 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
1077 <LIB.ARG></LIB.ARG>\r
1078 <LINK.ARG></LINK.ARG>\r
1079 </GenDll>\r
0fd9e137 1080\r
878ddf1f 1081 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
1082 </then>\r
1083 </if>\r
5fc17c92 1084 \r
878ddf1f 1085 <OnDependency>\r
1086 <sourcefiles>\r
22e0585c 1087 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 1088 </sourcefiles>\r
1089 <targetfiles>\r
22e0585c 1090 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"/>\r
878ddf1f 1091 </targetfiles>\r
1092\r
1093 <sequential>\r
22e0585c 1094 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />\r
c084fb6e 1095 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />\r
5fc17c92 1096 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
1097 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32" \r
878ddf1f 1098 sectiontype="EFI_SECTION_PE32"/>\r
5fc17c92 1099 \r
878ddf1f 1100 <POST.PROCESS/>\r
1101 </sequential>\r
1102 </OnDependency>\r
1103 </sequential>\r
1104 </macrodef>\r
1105\r
1106 <!--\r
1107 EFI_SECTION_VERSION\r
1108 -->\r
1109 <macrodef name="EFI_SECTION_VERSION">\r
1110 <attribute name="FILEPATH"/>\r
1111 <attribute name="FILENAME"/>\r
1112 <attribute name="FILEEXT" default="" />\r
1113 <attribute name="VERSION" default="0000"/>\r
1114\r
1115 <element name="PRE.PROCESS" optional="yes"/>\r
1116 <element name="POST.PROCESS" optional="yes"/>\r
1117\r
1118 <sequential>\r
1119 <if>\r
1120 <not>\r
22e0585c 1121 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"/>\r
878ddf1f 1122 </not>\r
1123\r
1124 <then>\r
1125 <PRE.PROCESS/>\r
5fc17c92 1126 <gensection outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver" \r
878ddf1f 1127 versionnum="@{VERSION}"\r
1128 sectiontype="EFI_SECTION_VERSION"/>\r
1129 <POST.PROCESS/>\r
1130 </then>\r
1131 </if>\r
1132 </sequential>\r
1133 </macrodef>\r
1134\r
1135 <!--\r
1136 EFI_SECTION_USER_INTERFACE\r
1137 -->\r
1138 <macrodef name="EFI_SECTION_USER_INTERFACE">\r
1139 <attribute name="FILEPATH"/>\r
1140 <attribute name="FILENAME"/>\r
1141 <attribute name="FILEEXT" default="" />\r
1142 <attribute name="UI" default="${BASE_NAME}"/>\r
1143\r
1144 <element name="PRE.PROCESS" optional="yes"/>\r
1145 <element name="POST.PROCESS" optional="yes"/>\r
1146\r
1147 <sequential>\r
1148 <if>\r
1149 <not>\r
22e0585c 1150 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"/>\r
878ddf1f 1151 </not>\r
1152\r
1153 <then>\r
1154 <PRE.PROCESS/>\r
1155 <gensection interfacestring="@{UI}"\r
5fc17c92 1156 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui" \r
878ddf1f 1157 sectiontype="EFI_SECTION_USER_INTERFACE"/>\r
1158 <POST.PROCESS/>\r
1159 </then>\r
1160 </if>\r
1161 </sequential>\r
1162 </macrodef>\r
1163\r
878ddf1f 1164 <!--\r
1165 EFI_SECTION_DXE_DEPEX\r
1166 -->\r
1167 <macrodef name="EFI_SECTION_DXE_DEPEX">\r
1168 <attribute name="FILEPATH"/>\r
1169 <attribute name="FILENAME"/>\r
1170 <attribute name="FILEEXT" default="dxs"/>\r
1171\r
1172 <element name="PRE.PROCESS" optional="yes"/>\r
1173 <element name="POST.PROCESS" optional="yes"/>\r
1174\r
1175 <sequential>\r
1176 <PRE.PROCESS/>\r
1177\r
1178 <if>\r
5fc17c92 1179 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 1180 <then>\r
1181 <OnDependency>\r
1182 <sourcefiles>\r
5fc17c92 1183 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 1184 </sourcefiles>\r
1185 <targetfiles>\r
22e0585c 1186 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1187 </targetfiles>\r
1188 <sequential>\r
5fc17c92 1189 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex" \r
1190 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 1191 sectiontype="EFI_SECTION_DXE_DEPEX"/>\r
1192 </sequential>\r
1193 </OnDependency>\r
1194 </then>\r
1195 <else>\r
1196 <if>\r
1197 <not>\r
22e0585c 1198 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1199 </not>\r
1200 <then>\r
22e0585c 1201 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1202 </then>\r
1203 </if>\r
1204 </else>\r
1205 </if>\r
1206\r
1207 <POST.PROCESS/>\r
1208 </sequential>\r
1209 </macrodef>\r
1210\r
1211 <!--\r
1212 EFI_SECTION_PEI_DEPEX\r
1213 -->\r
1214 <macrodef name="EFI_SECTION_PEI_DEPEX">\r
1215 <attribute name="FILEPATH"/>\r
1216 <attribute name="FILENAME"/>\r
1217 <attribute name="FILEEXT" default="dxs"/>\r
1218\r
1219 <element name="PRE.PROCESS" optional="yes"/>\r
1220 <element name="POST.PROCESS" optional="yes"/>\r
1221 <sequential>\r
1222 <PRE.PROCESS/>\r
1223 <if>\r
5fc17c92 1224 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 1225 <then>\r
1226 <OnDependency>\r
1227 <sourcefiles>\r
5fc17c92 1228 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 1229 </sourcefiles>\r
1230 <targetfiles>\r
22e0585c 1231 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1232 </targetfiles>\r
1233\r
1234 <sequential>\r
5fc17c92 1235 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex" \r
1236 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 1237 sectiontype="EFI_SECTION_PEI_DEPEX"/>\r
1238 </sequential>\r
1239 </OnDependency>\r
5fc17c92 1240 \r
878ddf1f 1241 </then>\r
1242 <else>\r
1243 <if>\r
1244 <not>\r
22e0585c 1245 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1246 </not>\r
1247 <then>\r
22e0585c 1248 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 1249 </then>\r
1250 </if>\r
1251 </else>\r
1252 </if>\r
1253 <POST.PROCESS/>\r
1254 </sequential>\r
1255 </macrodef>\r
1256\r
878ddf1f 1257\r
1258 <!--\r
1259 EFI_SECTION_RAW\r
1260 -->\r
1261 <macrodef name="EFI_SECTION_RAW">\r
1262 <attribute name="FILEPATH"/>\r
1263 <attribute name="FILENAME"/>\r
1264 <attribute name="FILEEXT" default="bin"/>\r
1265\r
1266 <element name="PRE.PROCESS" optional="yes"/>\r
1267 <element name="POST.PROCESS" optional="yes"/>\r
1268\r
1269 <sequential>\r
1270 <OnDependency>\r
1271 <sourcefiles>\r
d8022b36 1272 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 1273 </sourcefiles>\r
1274 <targetfiles>\r
22e0585c 1275 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
878ddf1f 1276 </targetfiles>\r
1277\r
1278 <sequential>\r
1279 <PRE.PROCESS/>\r
d8022b36 1280 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
5fc17c92 1281 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec" \r
878ddf1f 1282 sectiontype="EFI_SECTION_RAW"/>\r
1283 <POST.PROCESS/>\r
1284 </sequential>\r
1285 </OnDependency>\r
1286 </sequential>\r
1287 </macrodef>\r
1288\r
706c2ad4 1289 <!--\r
1290 EFI_SECTION_RAW_SEC\r
1291 -->\r
1292 <macrodef name="EFI_SECTION_RAW_SEC">\r
1293 <attribute name="FILEPATH"/>\r
1294 <attribute name="FILENAME"/>\r
1295 <attribute name="FILEEXT" default="cat"/>\r
1296\r
1297 <element name="PRE.PROCESS" optional="yes"/>\r
1298 <element name="POST.PROCESS" optional="yes"/>\r
1299\r
1300 <sequential>\r
1301 <OnDependency>\r
1302 <sourcefiles>\r
1303 <file name="${DEST_DIR_OUTPUT}/ResetVec.@{FILEEXT}"/>\r
1304 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.te"/>\r
1305 </sourcefiles>\r
1306 <targetfiles>\r
1307 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
1308 </targetfiles>\r
1309\r
1310 <sequential>\r
1311 <PRE.PROCESS/>\r
1312 <secfixup secexefile="${DEST_DIR_OUTPUT}/@{FILENAME}.te" resetvectorDatafile="${DEST_DIR_OUTPUT}/ResetVec.@{FILEEXT}"\r
1313 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.bin"/>\r
1314 \r
1315 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.bin" \r
1316 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec" \r
1317 sectiontype="EFI_SECTION_RAW"/>\r
1318 <POST.PROCESS/>\r
1319 </sequential>\r
1320 </OnDependency>\r
1321 </sequential>\r
1322 </macrodef>\r
1323 \r
878ddf1f 1324 <!--\r
1325 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
1326 -->\r
1327 <macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">\r
1328 <attribute name="FILEPATH"/>\r
1329 <attribute name="FILENAME"/>\r
1330 <attribute name="FILEEXT" default="fv"/>\r
1331\r
1332 <element name="PRE.PROCESS" optional="yes"/>\r
1333 <element name="POST.PROCESS" optional="yes"/>\r
1334\r
1335 <sequential>\r
1336 <OnDependency>\r
1337 <sourcefiles>\r
22e0585c 1338 <file name="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 1339 </sourcefiles>\r
1340 <targetfiles>\r
22e0585c 1341 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"/>\r
878ddf1f 1342 </targetfiles>\r
1343\r
1344 <sequential>\r
1345 <PRE.PROCESS/>\r
5fc17c92 1346 \r
1347 <copy file="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1348 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
878ddf1f 1349 overwrite="true"/>\r
5fc17c92 1350 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1351 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec" \r
878ddf1f 1352 sectiontype="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>\r
5fc17c92 1353 \r
878ddf1f 1354 <POST.PROCESS/>\r
1355 </sequential>\r
1356 </OnDependency>\r
1357 </sequential>\r
1358 </macrodef>\r
1359\r
1360 <!--\r
1361 Binary\r
1362 -->\r
1363 <macrodef name="Build_Binary">\r
1364 <attribute name="FILEPATH"/>\r
1365 <attribute name="FILENAME"/>\r
1366 <attribute name="FILEEXT" default="bin"/>\r
1367\r
1368 <element name="EXTRA.INC" optional="yes"/>\r
1369 <element name="EXTRA.ARG" optional="yes"/>\r
1370\r
1371 <sequential>\r
5fc17c92 1372 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 1373 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 1374 </sequential>\r
1375 </macrodef>\r
d6123759 1376 \r
473f57d4 1377 <!--\r
1378 Microcode\r
1379 -->\r
1380 <macrodef name="Build_MICROCODE">\r
1381 <attribute name="FILEPATH"/>\r
1382 <attribute name="FILENAME"/>\r
1383 <attribute name="FILEEXT" default="TXT"/>\r
1384\r
1385 <element name="EXTRA.INC" optional="yes"/>\r
1386 <element name="EXTRA.ARG" optional="yes"/>\r
1387\r
1388 <sequential>\r
50017606 1389 <mkdir dir="${TARGET_DIR}/Microcode"/>\r
1390 <flashmap MCIFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" MCOFILE="${TARGET_DIR}/Microcode/@{FILENAME}.bin"/>\r
473f57d4 1391 </sequential>\r
1392 </macrodef> \r
878ddf1f 1393\r
1394 <!--\r
1395 Graphics (bmp, ...)\r
1396 -->\r
d6123759 1397 <macrodef name="Build_BMP">\r
878ddf1f 1398 <attribute name="FILEPATH"/>\r
473f57d4 1399 <attribute name="FILENAME"/> \r
878ddf1f 1400 <attribute name="FILEEXT" default="bmp"/>\r
1401\r
1402 <element name="EXTRA.INC" optional="yes"/>\r
1403 <element name="EXTRA.ARG" optional="yes"/>\r
1404\r
1405 <sequential>\r
5fc17c92 1406 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 1407 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 1408 </sequential>\r
5fc17c92 1409 </macrodef> \r
d6123759 1410\r
1411 <!--\r
1412 build EFI file\r
1413 -->\r
878ddf1f 1414 <macrodef name="Build_EFI">\r
1415 <attribute name="FILEPATH"/>\r
1416 <attribute name="FILENAME"/>\r
1417 <attribute name="FILEEXT" default="efi"/>\r
1418\r
1419 <element name="EXTRA.INC" optional="yes"/>\r
1420 <element name="EXTRA.ARG" optional="yes"/>\r
1421\r
1422 <sequential>\r
5fc17c92 1423 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" /> \r
1424 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 1425 tofile="${DEST_DIR_OUTPUT}/${BASE_NAME}.efi"/>\r
878ddf1f 1426 </sequential>\r
1427 </macrodef>\r
380191dd 1428 \r
1429 <!-- \r
1430 Build macro for Apriori\r
1431 -->\r
1432 <macrodef name="Build_Apriori">\r
1433 <attribute name="FILEPATH" default="."/>\r
1434 <attribute name="FILENAME"/>\r
1435 <attribute name="FILEEXT" default="apr"/>\r
1436 <attribute name="GUID"/>\r
1437\r
1438 <sequential>\r
1439 <mkdir dir="${FV_DIR}/Apriori" />\r
1440 <gensection inputfile="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1441 outputfile="${FV_DIR}/Apriori/@{FILENAME}.sec" \r
1442 sectiontype="EFI_SECTION_RAW"/>\r
1443\r
1444 <genffsfile BaseName="@{FILENAME}" ffsATTRIBCHECKSUM="TRUE" ffsFILETYPE="EFI_FV_FILETYPE_FREEFORM" \r
1445 fileGuid="@{GUID}" moduleType="BASE" outputDir="${FV_DIR}">\r
1446 <sectFile fileName="${FV_DIR}/Apriori/@{FILENAME}.sec"/>\r
1447 </genffsfile>\r
1448 \r
1449 </sequential>\r
1450 </macrodef>\r
878ddf1f 1451</project>\r