Merged the <libset> in <GenDll> to avoid warning message.
[mirror_edk2.git] / Tools / Conf / BuildMacro.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 name="common">
13 <!--
14 Macro for intialize some properties. This Macro build will be called before source file build.
15 -->
16 <macrodef name="Build_Init">
17 <sequential>
18 <var name="OBJECTS" value="" />
19 <var name="SDB_FILES" value="" />
20 </sequential>
21 </macrodef>
22
23
24 <!--
25 macro definitions for building files with different types
26 -->
27 <!--
28 C Code
29 -->
30 <macrodef name="Build_CCode">
31 <attribute name="FILEPATH"/>
32 <attribute name="FILENAME"/>
33 <attribute name="FILEEXT" default="c"/>
34
35 <element name="EXTRA.INC" optional="yes"/>
36 <element name="EXTRA.ARG" optional="yes"/>
37
38 <sequential>
39 <var name="FILE_BASENAME" value="@{FILENAME}" />
40 <var name="FILE_PATH" value="@{FILEPATH}" />
41 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
42
43 <if>
44 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
45 <then>
46 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">
47 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
48 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>
49 <EXTRA.INC/>
50 </makedeps>
51 </then>
52 </if>
53
54 <OnDependency>
55 <sourcefiles>
56 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>
57 </sourcefiles>
58 <targetfiles>
59 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
60 </targetfiles>
61
62 <sequential>
63 <!-- Use pre-compiled header if available -->
64 <if>
65 <and>
66 <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>
67 <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>
68 </and>
69 <then>
70 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>
71 </then>
72 <else>
73 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>
74 </else>
75 </if>
76
77 <cc userdefine="on">
78 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"
79 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">
80 <EXTRA.INC/>
81 <argument value="${LOCAL_CC_FLAGS}"/>
82 <EXTRA.ARG/>
83 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
84 </command>
85 </cc>
86 </sequential>
87 </OnDependency>
88 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
89 <if>
90 <equals arg1="@{FILEPATH}" arg2="." />
91 <then>
92 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
93 </then>
94 <else>
95 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
96 </else>
97 </if>
98 </sequential>
99 </macrodef>
100
101
102 <macrodef name="Build_AUTOGEN">
103 <attribute name="FILEPATH"/>
104 <attribute name="FILENAME"/>
105 <attribute name="FILEEXT" default="c"/>
106
107 <element name="EXTRA.INC" optional="yes"/>
108 <element name="EXTRA.ARG" optional="yes"/>
109
110 <sequential>
111 <var name="FILE_BASENAME" value="@{FILENAME}" />
112 <var name="FILE_PATH" value="@{FILEPATH}" />
113 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
114
115 <if>
116 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
117 <then>
118 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">
119 <input file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
120 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>
121 <EXTRA.INC/>
122 </makedeps>
123 </then>
124 </if>
125
126 <OnDependency>
127 <sourcefiles>
128 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>
129 </sourcefiles>
130 <targetfiles>
131 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
132 </targetfiles>
133
134 <sequential>
135 <!-- Generate pre-compiled header -->
136 <if>
137 <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>
138 <then>
139 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>
140 </then>
141 <else>
142 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>
143 </else>
144 </if>
145
146 <cc userdefine="on">
147 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"
148 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">
149 <EXTRA.INC/>
150 <argument value="${LOCAL_CC_FLAGS}"/>
151 <EXTRA.ARG/>
152 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
153 </command>
154 </cc>
155 </sequential>
156 </OnDependency>
157 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
158 <if>
159 <equals arg1="@{FILEPATH}" arg2="." />
160 <then>
161 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
162 </then>
163 <else>
164 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
165 </else>
166 </if>
167 </sequential>
168 </macrodef>
169
170 <macrodef name="Build_DPX">
171 <attribute name="FILEPATH"/>
172 <attribute name="FILENAME"/>
173 <attribute name="FILEEXT" default="dxs"/>
174
175 <element name="EXTRA.INC" optional="yes"/>
176 <element name="EXTRA.ARG" optional="yes"/>
177
178
179 <sequential>
180 <var name="FILE_BASENAME" value="@{FILENAME}" />
181 <var name="FILE_PATH" value="@{FILEPATH}" />
182 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
183
184 <OnDependency>
185 <sourcefiles>
186 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
187 </sourcefiles>
188 <targetfiles>
189 <file name="${DEST_DIR_OUTPUT}/${BASE_NAME}.depex"/>
190 </targetfiles>
191
192 <sequential>
193 <cc userdefine="on">
194 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${CC_FAMILY}"
195 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i">
196 <EXTRA.INC/>
197 <argument value="${PP_FLAGS}"/>
198 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
199 </command>
200 </cc>
201
202 <gendepex inputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i" outputFile="${DEST_DIR_OUTPUT}/${BASE_NAME}.depex"/>
203 </sequential>
204 </OnDependency>
205 </sequential>
206 </macrodef>
207
208 <macrodef name="Build_ASM">
209 <attribute name="FILEPATH"/>
210 <attribute name="FILENAME"/>
211 <attribute name="FILEEXT" default="asm"/>
212
213 <element name="EXTRA.INC" optional="yes"/>
214 <element name="EXTRA.ARG" optional="yes"/>
215
216 <!-- Dispath ASM file, there are three type.
217 asm - Build_Assembly
218 S - Build_Gcc_Assembly
219 s - Build_Ipf_Assembly -->
220 <sequential>
221 <if>
222 <equals arg1="@{FILEEXT}" arg2="asm" />
223 <then>
224 <Build_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">
225 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>
226 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>
227 </Build_Assembly>
228 </then>
229 <elseif>
230 <equals arg1="@{FILEEXT}" arg2="S" />
231 <then>
232 <Build_Gcc_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">
233 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>
234 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>
235 </Build_Gcc_Assembly>
236 </then>
237 </elseif>
238 <elseif>
239 <equals arg1="@{FILEEXT}" arg2="s" />
240 <then>
241 <Build_IPF_Assembly_Code FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">
242 <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>
243 <EXTRA.ARG.1><EXTRA.ARG /></EXTRA.ARG.1>
244 </Build_IPF_Assembly_Code>
245 </then>
246 </elseif>
247 </if>
248 </sequential>
249 </macrodef>
250
251 <!--
252 IA32/x64 Assembly
253 -->
254 <macrodef name="Build_Assembly">
255 <attribute name="FILEPATH"/>
256 <attribute name="FILENAME"/>
257 <attribute name="FILEEXT" default="asm"/>
258
259 <element name="EXTRA.INC.1" optional="yes"/>
260 <element name="EXTRA.ARG.1" optional="yes"/>
261
262 <sequential>
263 <var name="FILE_BASENAME" value="@{FILENAME}" />
264 <var name="FILE_PATH" value="@{FILEPATH}" />
265 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
266
267 <OnDependency>
268 <sourcefiles>
269 <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
270 </sourcefiles>
271 <targetfiles>
272 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
273 </targetfiles>
274
275 <sequential>
276 <cc userdefine="on">
277 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${PP_FAMILY}">
278 <EXTRA.INC.1/>
279 <argument value="${PP_FLAGS}"/>
280 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
281 </command>
282 </cc>
283
284 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"
285 match="^(#line +1 +.*@{FILEPATH}/@{FILENAME}\.@{FILEEXT}&quot;).+\1"
286 replace=";"
287 flags="gs"/>
288 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"
289 match="^(#line .*)$"
290 replace="; \1"
291 byline="true"/>
292 <replaceregexp file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"
293 match="([^_a-zA-Z])0x([0-9a-fA-F]+)"
294 replace="\10\2h"
295 flags="g"
296 byline="true"/>
297
298 <cc userdefine="on">
299 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"
300 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">
301 <EXTRA.INC.1/>
302
303 <argument value="${ASM_FLAGS}"/>
304 <EXTRA.ARG.1/>
305
306 <fileset casesensitive="on" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>
307 </command>
308 </cc>
309 </sequential>
310 </OnDependency>
311 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
312 <if>
313 <equals arg1="@{FILEPATH}" arg2="." />
314 <then>
315 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
316 </then>
317 <else>
318 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
319 </else>
320 </if>
321 </sequential>
322 </macrodef>
323
324 <!--
325 Build GCC assembly code
326 -->
327 <macrodef name="Build_Gcc_Assembly">
328 <attribute name="FILEPATH"/>
329 <attribute name="FILENAME"/>
330 <attribute name="FILEEXT" default="asm"/>
331
332 <element name="EXTRA.INC.1" optional="yes"/>
333 <element name="EXTRA.ARG.1" optional="yes"/>
334
335 <sequential>
336 <var name="FILE_BASENAME" value="@{FILENAME}" />
337 <var name="FILE_PATH" value="@{FILEPATH}" />
338 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
339
340 <OnDependency>
341 <sourcefiles>
342 <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
343 </sourcefiles>
344 <targetfiles>
345 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
346 </targetfiles>
347
348 <sequential>
349 <cc userdefine="on">
350 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"
351 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">
352 <EXTRA.INC.1/>
353
354 <argument value="${ASM_FLAGS}"/>
355 <EXTRA.ARG.1/>
356
357 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
358 </command>
359 </cc>
360 </sequential>
361 </OnDependency>
362 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
363 <if>
364 <equals arg1="@{FILEPATH}" arg2="." />
365 <then>
366 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
367 </then>
368 <else>
369 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
370 </else>
371 </if>
372 </sequential>
373 </macrodef>
374
375 <!--
376 IPF Assembly
377 -->
378 <macrodef name="Build_IPF_Assembly_Code">
379 <attribute name="FILEPATH"/>
380 <attribute name="FILENAME"/>
381 <attribute name="FILEEXT" default="s"/>
382
383 <element name="EXTRA.INC.1" optional="yes"/>
384 <element name="EXTRA.ARG.1" optional="yes"/>
385
386 <sequential>
387 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
388
389 <if>
390 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
391 <then>
392 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">
393 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
394 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>
395 <EXTRA.INC.1/>
396 </makedeps>
397 </then>
398 </if>
399
400 <OnDependency>
401 <sourcefiles>
402 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>
403 </sourcefiles>
404 <targetfiles>
405 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
406 </targetfiles>
407
408 <sequential>
409 <cc userdefine="on">
410 <command type="PP" cmd="${PP}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${PP_FAMILY}">
411 <EXTRA.INC.1/>
412 <argument value="${PP_FLAGS}"/>
413 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
414 </command>
415 </cc>
416
417 <cc userdefine="on">
418 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"
419 includepathDelimiter="-I" outputDelimiter="-o"
420 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">
421 <EXTRA.INC.1/>
422 <argument value="${ASM_FLAGS}"/>
423 <EXTRA.ARG.1/>
424 <fileset casesensitive="on" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>
425 </command>
426 </cc>
427 </sequential>
428 </OnDependency>
429 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
430 <if>
431 <equals arg1="@{FILEPATH}" arg2="." />
432 <then>
433 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
434 </then>
435 <else>
436 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
437 </else>
438 </if>
439 </sequential>
440 </macrodef>
441
442
443 <macrodef name="Build_IPF_PP_Code">
444 <attribute name="FILEPATH"/>
445 <attribute name="FILENAME"/>
446 <attribute name="FILEEXT" default="i"/>
447
448 <element name="EXTRA.INC" optional="yes"/>
449 <element name="EXTRA.ARG" optional="yes"/>
450
451 <sequential>
452 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
453
454 <cc userdefine="on">
455 <command type="ASM" includepathDelimiter="-I">
456 <includepath path="${WORKSPACE_DIR}"/>
457 <includepath path="${MODULE_DIR}"/>
458 <includepath path="${MODULE_DIR}/${ARCH}"/>
459 <EXTRA.INC/>
460
461 <argument value="${ASM_FLAGS}"/>
462 <EXTRA.ARG/>
463 <OutputFile File="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
464
465 <fileset casesensitive="on" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
466 </command>
467 </cc>
468 </sequential>
469 </macrodef>
470
471
472 <!--
473 Library private HashMap map = new HashMap();
474 -->
475 <macrodef name="Build_Library">
476 <attribute name="FILENAME" />
477 <attribute name="FILEEXT" default="obj"/>
478
479 <sequential>
480 <var name="FILE_BASENAME" value="@{FILENAME}" />
481 <var name="FILE_PATH" value="." />
482 <mkdir dir="${BIN_DIR}"/>
483
484 <OnDependency>
485 <sourcefiles>
486 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />
487 </sourcefiles>
488 <targetfiles>
489 <file name="${BIN_DIR}/@{FILENAME}.lib"/>
490 </targetfiles>
491
492 <sequential>
493 <cc userdefine="on">
494 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"
495 outputFile="${BIN_DIR}/@{FILENAME}.lib">
496 <argument value="${SLINK_FLAGS}"/>
497
498 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>
499 </command>
500 </cc>
501 </sequential>
502 </OnDependency>
503 </sequential>
504 </macrodef>
505
506 <!--
507 Unicode -> .sdb
508 -->
509 <macrodef name="Build_UNI">
510 <attribute name="FILEPATH"/>
511 <attribute name="FILENAME"/>
512 <attribute name="FILEEXT" default="uni"/>
513
514 <element name="EXTRA.INC" optional="yes"/>
515 <element name="EXTRA.ARG" optional="yes"/>
516
517 <sequential>
518 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>
519
520 <OnDependency>
521 <sourcefiles>
522 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
523 </sourcefiles>
524 <targetfiles>
525 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
526 </targetfiles>
527
528 <sequential>
529 <strgather commandtype="parse" newdatabase="true">
530 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
531 <EXTRA.INC/>
532 <EXTRA.ARG/>
533 <inputfile name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
534 </strgather>
535 </sequential>
536 </OnDependency>
537
538 <var name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
539 </sequential>
540 </macrodef>
541
542 <!--
543 .sdb(s) -> .c, .h -> .obj
544 -->
545 <macrodef name="Build_Unicode_Database">
546 <attribute name="FILEPATH"/>
547 <attribute name="FILENAME"/>
548 <attribute name="FILEEXT" default="sdb"/>
549
550 <element name="EXTRA.INC" optional="yes"/>
551 <element name="EXTRA.ARG" optional="yes"/>
552
553 <sequential>
554 <var name="FILE_BASENAME" value="@{FILENAME}" />
555 <var name="FILE_PATH" value="@{FILEPATH}" />
556 <OnDependency>
557 <sourcefiles>
558 <file list="${SDB_FILES}"/>
559 <file list="${SOURCE_FILES}"/>
560 </sourcefiles>
561 <targetfiles>
562 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
563 </targetfiles>
564
565 <sequential>
566 <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb" verbose="read">
567 <skipext name=".uni"/>
568 <skipext name=".h"/>
569 <database list="${SDB_FILES}"/>
570 <inputfile name="${SOURCE_FILES}"/>
571 </strgather>
572 </sequential>
573 </OnDependency>
574
575 <OnDependency>
576 <sourcefiles>
577 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
578 </sourcefiles>
579 <targetfiles>
580 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"/>
581 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"/>
582 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>
583 </targetfiles>
584
585 <sequential>
586 <strgather basename="@{FILENAME}Strings" commandtype="dump"
587 outputdefines="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"
588 outputhpk="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"
589 outputstring="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c">
590 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>
591 </strgather>
592 </sequential>
593 </OnDependency>
594
595 <OnDependency>
596 <sourcefiles>
597 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>
598 </sourcefiles>
599 <targetfiles>
600 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>
601 </targetfiles>
602
603 <sequential>
604 <!-- Use pre-compiled header if available -->
605 <if>
606 <and>
607 <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>
608 <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>
609 </and>
610 <then>
611 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>
612 </then>
613 <else>
614 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>
615 </else>
616 </if>
617
618 <cc userdefine="on">
619 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"
620 includepathDelimiter="-I"
621 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj">
622 <argument value="${LOCAL_CC_FLAGS}"/>
623 <EXTRA.INC />
624 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>
625 </command>
626 </cc>
627 </sequential>
628 </OnDependency>
629
630 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
631 <if>
632 <equals arg1="@{FILEPATH}" arg2="." />
633 <then>
634 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}Strings.obj" />
635 </then>
636 <else>
637 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}Strings.obj" />
638 </else>
639 </if>
640 </sequential>
641 </macrodef>
642
643 <!--
644 Vfr
645 -->
646 <macrodef name="Build_VFR">
647 <attribute name="FILEPATH"/>
648 <attribute name="FILENAME"/>
649 <attribute name="FILEEXT" default="vfr"/>
650
651 <element name="EXTRA.INC" optional="yes"/>
652 <element name="EXTRA.ARG" optional="yes"/>
653
654 <sequential>
655 <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>
656
657 <if>
658 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
659 <then>
660 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">
661 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
662 <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>
663 <EXTRA.INC/>
664 </makedeps>
665 </then>
666 </if>
667
668 <OnDependency>
669 <sourcefiles>
670 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>
671 </sourcefiles>
672 <targetfiles>
673 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>
674 </targetfiles>
675
676 <sequential>
677 <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}/@{FILEPATH}" vfrFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}">
678 <EXTRA.INC/>
679 </vfrcompile>
680
681 <!-- Use pre-compiled header if available -->
682 <if>
683 <and>
684 <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>
685 <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>
686 </and>
687 <then>
688 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>
689 </then>
690 <else>
691 <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>
692 </else>
693 </if>
694
695 <cc userdefine="on">
696 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}"
697 includepathDelimiter="-I" family="${CC_FAMILY}"
698 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" >
699 <argument value="${LOCAL_CC_FLAGS}"/>
700 <EXTRA.INC/>
701 <EXTRA.ARG/>
702 <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>
703 </command>
704 </cc>
705 </sequential>
706 </OnDependency>
707 <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->
708 <if>
709 <equals arg1="@{FILEPATH}" arg2="." />
710 <then>
711 <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />
712 </then>
713 <else>
714 <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />
715 </else>
716 </if>
717 </sequential>
718 </macrodef>
719
720 <!--
721 DUMMY
722 -->
723 <macrodef name="Build_DUMMY">
724 <attribute name="FILEPATH"/>
725 <attribute name="FILENAME"/>
726 <attribute name="FILEEXT"/>
727
728 <element name="EXTRA.INC" optional="yes"/>
729 <element name="EXTRA.ARG" optional="yes"/>
730
731 <sequential>
732 <echo message="Ignoring ${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
733 </sequential>
734 </macrodef>
735
736 <!--############################################################################
737 Build Sections
738 #############################################################################-->
739 <!--
740 DLL
741 -->
742 <macrodef name="GenDll">
743 <attribute name="FILEPATH"/>
744 <attribute name="FILENAME"/>
745 <attribute name="FILEEXT"/>
746
747 <element name="LIB.ARG" optional="yes"/>
748 <element name="LINK.ARG" optional="yes"/>
749
750 <sequential>
751 <var name="FILE_BASENAME" value="@{FILENAME}" />
752 <var name="FILE_PATH" value="@{FILEPATH}" />
753 <OnDependency>
754 <sourcefiles>
755 <file list="${LIBS}"/>
756 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />
757 </sourcefiles>
758 <targetfiles>
759 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>
760 </targetfiles>
761
762 <sequential>
763 <cc userdefine="on">
764 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"
765 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">
766 <argument value="${SLINK_FLAGS}"/>
767
768 <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>
769 </command>
770 </cc>
771 <cc userdefine="on">
772 <command type="DLINK" cmd="${DLINK}" family="${DLINK_FAMILY}"
773 outputFile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll" >
774 <argument value="${DLINK_FLAGS}"/>
775 <libset libs="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib ${LIBS} ${DLINK_SPATH}"/>
776 <LINK.ARG/>
777 </command>
778 </cc>
779 </sequential>
780 </OnDependency>
781 </sequential>
782 </macrodef>
783
784 <!--
785 EFI
786 -->
787 <macrodef name="GenEfi">
788 <attribute name="FILEPATH"/>
789 <attribute name="FILENAME"/>
790 <attribute name="FILEEXT" default="dll"/>
791
792 <sequential>
793 <OnDependency>
794 <sourcefiles>
795 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
796 </sourcefiles>
797 <targetfiles>
798 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>
799 </targetfiles>
800
801 <sequential>
802 <fwimage componentType="${MODULE_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"
803 peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>
804 </sequential>
805 </OnDependency>
806 </sequential>
807 </macrodef>
808
809 <!--
810 EFI_SECTION_FREEFORM_SUBTYPE_GUID
811 EFI_SECTION_VERSION
812 EFI_SECTION_USER_INTERFACE
813 EFI_SECTION_DXE_DEPEX
814 EFI_SECTION_PEI_DEPEX
815 EFI_SECTION_PE32
816 EFI_SECTION_PIC
817 EFI_SECTION_TE
818 EFI_SECTION_RAW
819 EFI_SECTION_COMPRESSION
820 EFI_SECTION_GUID_DEFINED
821 EFI_SECTION_COMPATIBILITY16
822 EFI_SECTION_FIRMWARE_VOLUME_IMAGE
823 -->
824 <!--
825 EFI_SECTION_PE32
826 -->
827
828 <macrodef name="EFI_SECTION_TE">
829 <attribute name="FILEPATH"/>
830 <attribute name="FILENAME"/>
831 <attribute name="FILEEXT" default="" />
832
833 <element name="PRE.PROCESS" optional="yes"/>
834 <element name="POST.PROCESS" optional="yes"/>
835
836 <sequential>
837 <PRE.PROCESS/>
838 <if>
839 <not>
840 <equals arg1="${LIBS}" arg2=""/>
841 </not>
842
843 <then>
844 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">
845 <LIB.ARG></LIB.ARG>
846 <LINK.ARG></LINK.ARG>
847 </GenDll>
848
849 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>
850 </then>
851 </if>
852
853 <OnDependency>
854 <sourcefiles>
855 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>
856 </sourcefiles>
857 <targetfiles>
858 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.tes"/>
859 </targetfiles>
860
861 <sequential>
862 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />
863 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />
864 <genteimage Dump="false" Verbose="false" OutputDir="" OutputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.te" InputFile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>
865 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.te" tofile="${BIN_DIR}/@{FILENAME}.te" />
866 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.te"
867 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.tes"
868 sectiontype="EFI_SECTION_TE"/>
869 <POST.PROCESS/>
870 </sequential>
871 </OnDependency>
872 </sequential>
873 </macrodef>
874
875 <macrodef name="EFI_SECTION_PE32">
876 <attribute name="FILEPATH"/>
877 <attribute name="FILENAME"/>
878 <attribute name="FILEEXT" default="" />
879
880 <element name="PRE.PROCESS" optional="yes"/>
881 <element name="POST.PROCESS" optional="yes"/>
882
883 <sequential>
884 <PRE.PROCESS/>
885 <if>
886 <not>
887 <!-- TBD ${OBJECTS} -->
888 <equals arg1="${LIBS}" arg2=""/>
889 </not>
890
891 <then>
892 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">
893 <LIB.ARG></LIB.ARG>
894 <LINK.ARG></LINK.ARG>
895 </GenDll>
896
897 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>
898 </then>
899 </if>
900
901 <OnDependency>
902 <sourcefiles>
903 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>
904 </sourcefiles>
905 <targetfiles>
906 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"/>
907 </targetfiles>
908
909 <sequential>
910 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />
911
912 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"
913 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"
914 sectiontype="EFI_SECTION_PE32"/>
915
916 <POST.PROCESS/>
917 </sequential>
918 </OnDependency>
919 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />
920 </sequential>
921 </macrodef>
922
923 <!--
924 EFI_SECTION_VERSION
925 -->
926 <macrodef name="EFI_SECTION_VERSION">
927 <attribute name="FILEPATH"/>
928 <attribute name="FILENAME"/>
929 <attribute name="FILEEXT" default="" />
930 <attribute name="VERSION" default="0000"/>
931
932 <element name="PRE.PROCESS" optional="yes"/>
933 <element name="POST.PROCESS" optional="yes"/>
934
935 <sequential>
936 <if>
937 <not>
938 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"/>
939 </not>
940
941 <then>
942 <PRE.PROCESS/>
943 <gensection outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"
944 versionnum="@{VERSION}"
945 sectiontype="EFI_SECTION_VERSION"/>
946 <POST.PROCESS/>
947 </then>
948 </if>
949 </sequential>
950 </macrodef>
951
952 <!--
953 EFI_SECTION_USER_INTERFACE
954 -->
955 <macrodef name="EFI_SECTION_USER_INTERFACE">
956 <attribute name="FILEPATH"/>
957 <attribute name="FILENAME"/>
958 <attribute name="FILEEXT" default="" />
959 <attribute name="UI" default="${BASE_NAME}"/>
960
961 <element name="PRE.PROCESS" optional="yes"/>
962 <element name="POST.PROCESS" optional="yes"/>
963
964 <sequential>
965 <if>
966 <not>
967 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"/>
968 </not>
969
970 <then>
971 <PRE.PROCESS/>
972 <gensection interfacestring="@{UI}"
973 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"
974 sectiontype="EFI_SECTION_USER_INTERFACE"/>
975 <POST.PROCESS/>
976 </then>
977 </if>
978 </sequential>
979 </macrodef>
980
981 <!--
982 EFI_SECTION_DXE_DEPEX
983 -->
984 <macrodef name="EFI_SECTION_DXE_DEPEX">
985 <attribute name="FILEPATH"/>
986 <attribute name="FILENAME"/>
987 <attribute name="FILEEXT" default="dxs"/>
988
989 <element name="PRE.PROCESS" optional="yes"/>
990 <element name="POST.PROCESS" optional="yes"/>
991
992 <sequential>
993 <PRE.PROCESS/>
994
995 <if>
996 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>
997 <then>
998 <OnDependency>
999 <sourcefiles>
1000 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>
1001 </sourcefiles>
1002 <targetfiles>
1003 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1004 </targetfiles>
1005 <sequential>
1006 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"
1007 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"
1008 sectiontype="EFI_SECTION_DXE_DEPEX"/>
1009 </sequential>
1010 </OnDependency>
1011 </then>
1012 <else>
1013 <if>
1014 <not>
1015 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1016 </not>
1017 <then>
1018 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1019 </then>
1020 </if>
1021 </else>
1022 </if>
1023
1024 <POST.PROCESS/>
1025 </sequential>
1026 </macrodef>
1027
1028 <!--
1029 EFI_SECTION_PEI_DEPEX
1030 -->
1031 <macrodef name="EFI_SECTION_PEI_DEPEX">
1032 <attribute name="FILEPATH"/>
1033 <attribute name="FILENAME"/>
1034 <attribute name="FILEEXT" default="dxs"/>
1035
1036 <element name="PRE.PROCESS" optional="yes"/>
1037 <element name="POST.PROCESS" optional="yes"/>
1038 <sequential>
1039 <PRE.PROCESS/>
1040 <if>
1041 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>
1042 <then>
1043 <OnDependency>
1044 <sourcefiles>
1045 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>
1046 </sourcefiles>
1047 <targetfiles>
1048 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1049 </targetfiles>
1050
1051 <sequential>
1052 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"
1053 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"
1054 sectiontype="EFI_SECTION_PEI_DEPEX"/>
1055 </sequential>
1056 </OnDependency>
1057
1058 </then>
1059 <else>
1060 <if>
1061 <not>
1062 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1063 </not>
1064 <then>
1065 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>
1066 </then>
1067 </if>
1068 </else>
1069 </if>
1070 <POST.PROCESS/>
1071 </sequential>
1072 </macrodef>
1073
1074
1075 <!--
1076 EFI_SECTION_RAW
1077 -->
1078 <macrodef name="EFI_SECTION_RAW">
1079 <attribute name="FILEPATH"/>
1080 <attribute name="FILENAME"/>
1081 <attribute name="FILEEXT" default="bin"/>
1082
1083 <element name="PRE.PROCESS" optional="yes"/>
1084 <element name="POST.PROCESS" optional="yes"/>
1085
1086 <sequential>
1087 <OnDependency>
1088 <sourcefiles>
1089 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}"/>
1090 </sourcefiles>
1091 <targetfiles>
1092 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>
1093 </targetfiles>
1094
1095 <sequential>
1096 <PRE.PROCESS/>
1097 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}"
1098 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"
1099 sectiontype="EFI_SECTION_RAW"/>
1100 <POST.PROCESS/>
1101 </sequential>
1102 </OnDependency>
1103 </sequential>
1104 </macrodef>
1105
1106 <!--
1107 EFI_SECTION_FIRMWARE_VOLUME_IMAGE
1108 -->
1109 <macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">
1110 <attribute name="FILEPATH"/>
1111 <attribute name="FILENAME"/>
1112 <attribute name="FILEEXT" default="fv"/>
1113
1114 <element name="PRE.PROCESS" optional="yes"/>
1115 <element name="POST.PROCESS" optional="yes"/>
1116
1117 <sequential>
1118 <OnDependency>
1119 <sourcefiles>
1120 <file name="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>
1121 </sourcefiles>
1122 <targetfiles>
1123 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"/>
1124 </targetfiles>
1125
1126 <sequential>
1127 <PRE.PROCESS/>
1128
1129 <copy file="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1130 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1131 overwrite="true"/>
1132 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1133 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"
1134 sectiontype="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>
1135
1136 <POST.PROCESS/>
1137 </sequential>
1138 </OnDependency>
1139 </sequential>
1140 </macrodef>
1141
1142 <!--
1143 Binary
1144 -->
1145 <macrodef name="Build_Binary">
1146 <attribute name="FILEPATH"/>
1147 <attribute name="FILENAME"/>
1148 <attribute name="FILEEXT" default="bin"/>
1149
1150 <element name="EXTRA.INC" optional="yes"/>
1151 <element name="EXTRA.ARG" optional="yes"/>
1152
1153 <sequential>
1154 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1155 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>
1156 </sequential>
1157 </macrodef>
1158 <!--
1159 Microcode
1160 -->
1161 <macrodef name="Build_MICROCODE">
1162 <attribute name="FILEPATH"/>
1163 <attribute name="FILENAME"/>
1164 <attribute name="FILEEXT" default="TXT"/>
1165
1166 <element name="EXTRA.INC" optional="yes"/>
1167 <element name="EXTRA.ARG" optional="yes"/>
1168
1169 <sequential>
1170 <mkdir dir="${TARGET_DIR}/Microcode"/>
1171 <flashmap MCIFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" MCOFILE="${TARGET_DIR}/Microcode/@{FILENAME}.bin"/>
1172 </sequential>
1173 </macrodef>
1174
1175 <!--
1176 Graphics (bmp, ...)
1177 -->
1178 <macrodef name="Build_Graphics">
1179 <attribute name="FILEPATH"/>
1180 <attribute name="FILENAME"/>
1181 <attribute name="FILEEXT" default="bmp"/>
1182
1183 <element name="EXTRA.INC" optional="yes"/>
1184 <element name="EXTRA.ARG" optional="yes"/>
1185
1186 <sequential>
1187 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" />
1188 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1189 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>
1190 </sequential>
1191 </macrodef>
1192 <macrodef name="Build_EFI">
1193 <attribute name="FILEPATH"/>
1194 <attribute name="FILENAME"/>
1195 <attribute name="FILEEXT" default="efi"/>
1196
1197 <element name="EXTRA.INC" optional="yes"/>
1198 <element name="EXTRA.ARG" optional="yes"/>
1199
1200 <sequential>
1201 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" />
1202 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"
1203 tofile="${DEST_DIR_OUTPUT}/${BASE_NAME}.efi"/>
1204 </sequential>
1205 </macrodef>
1206 </project>