Fix a bug on GenBuild and have a minor update on BuildMacro.xml
[efi/edk2/.git] / edk2 / Tools / Conf / BuildMacro.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3 Copyright (c) 2006, Intel Corporation\r
4 All rights reserved. This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution.  The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php\r
8 \r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11 -->\r
12 <project name="common">\r
13   <!--\r
14     macro definitions for building files with different types\r
15     -->\r
16   <!--\r
17     C Code\r
18     -->\r
19   <macrodef name="Build_C_Code">\r
20     <attribute name="FILEPATH"/>\r
21     <attribute name="FILENAME"/>\r
22     <attribute name="FILEEXT" default="c"/>\r
23 \r
24     <element name="EXTRA.INC" optional="yes"/>\r
25     <element name="EXTRA.ARG" optional="yes"/>\r
26 \r
27     <sequential>\r
28       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
29 \r
30       <if>\r
31         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
32         <then>\r
33           <makedeps DepsFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep">\r
34             <input file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
35             <input file="${DEST_DIR_DEBUG}\AutoGen.h"/>\r
36             <includepath path="${WORKSPACE_DIR}"/>\r
37             <includepath path="${MODULE_DIR}"/>\r
38             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
39             <EXTRA.INC/>\r
40           </makedeps>\r
41         </then>\r
42       </if>\r
43 \r
44       <OnDependency>\r
45         <sourcefiles>\r
46           <file ListFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep"/>\r
47         </sourcefiles>\r
48         <targetfiles>\r
49           <file Name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
50         </targetfiles>\r
51 \r
52         <sequential>\r
53           <cc userdefine="on">\r
54             <command type="CC" workdir="${DEST_DIR_OUTPUT}">\r
55               <includepath path="${WORKSPACE_DIR}"/>\r
56               <includepath path="${MODULE_DIR}"/>\r
57               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
58               <EXTRA.INC/>\r
59 \r
60               <argument value="${CC_FLAGS}"/>\r
61               <EXTRA.ARG/>\r
62               <!-- <argument value="/FI${DEST_DIR_DEBUG}\AutoGen.h" /> -->\r
63               <includeFile value="${DEST_DIR_DEBUG}\AutoGen.h"/>\r
64               <!-- <argument value="/Fo${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> -->\r
65               <outputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
66 \r
67               <fileset casesensitive="off" file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
68             </command>\r
69           </cc>\r
70         </sequential>\r
71       </OnDependency>\r
72 \r
73       <!--\r
74         for library generation later\r
75         -->\r
76       <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> \r
77     </sequential>\r
78   </macrodef>\r
79 \r
80 \r
81   <macrodef name="Build_AUTOGEN">\r
82     <attribute name="FILEPATH"/>\r
83     <attribute name="FILENAME"/>\r
84     <attribute name="FILEEXT" default="c"/>\r
85 \r
86     <element name="EXTRA.INC" optional="yes"/>\r
87     <element name="EXTRA.ARG" optional="yes"/>\r
88 \r
89     <sequential>\r
90       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
91 \r
92       <if>\r
93         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
94         <then>\r
95           <makedeps DepsFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep">\r
96             <input file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
97             <input file="${DEST_DIR_DEBUG}\AutoGen.h"/>\r
98             <includepath path="${WORKSPACE_DIR}"/>\r
99             <includepath path="${MODULE_DIR}"/>\r
100             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
101             <EXTRA.INC/>\r
102           </makedeps>\r
103         </then>\r
104       </if>\r
105 \r
106       <OnDependency>\r
107         <sourcefiles>\r
108           <file ListFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep"/>\r
109         </sourcefiles>\r
110         <targetfiles>\r
111           <file Name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
112         </targetfiles>\r
113 \r
114         <sequential>\r
115           <cc userdefine="on">\r
116             <command type="CC" workdir="${DEST_DIR_OUTPUT}">\r
117               <includepath path="${WORKSPACE_DIR}"/>\r
118               <includepath path="${MODULE_DIR}"/>\r
119               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
120               <EXTRA.INC/>\r
121     \r
122               <argument value="${CC_FLAGS}"/>\r
123               <EXTRA.ARG/>\r
124               <!-- <argument value="/FI${DEST_DIR_DEBUG}\AutoGen.h" />  -->\r
125               <includeFile value="${DEST_DIR_DEBUG}\AutoGen.h"/>\r
126               <!-- <argument value="/Fo${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> -->\r
127               <outputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
128     \r
129               <fileset casesensitive="off" file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
130             </command>\r
131           </cc>\r
132         </sequential>\r
133       </OnDependency>\r
134       <!--\r
135         for library generation later\r
136         -->\r
137       <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> \r
138     </sequential>\r
139   </macrodef>\r
140 \r
141   <macrodef name="Build_Dependency_File">\r
142     <attribute name="FILEPATH"/>\r
143     <attribute name="FILENAME"/>\r
144     <attribute name="FILEEXT" default="dxs"/>\r
145 \r
146     <element name="EXTRA.INC" optional="yes"/>\r
147     <element name="EXTRA.ARG" optional="yes"/>\r
148 \r
149     <sequential>\r
150       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
151 \r
152       <OnDependency>\r
153         <sourcefiles>\r
154           <file name="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
155         </sourcefiles>\r
156         <targetfiles>\r
157           <file name="${DEST_DIR_OUTPUT}\${BASE_NAME}.@{FILEEXT}.depex"/>\r
158         </targetfiles>\r
159 \r
160         <sequential>\r
161           <copy file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
162                 tofile="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.c"/>\r
163 \r
164           <cc userdefine="on">\r
165             <command type="CC" workdir=".">\r
166               <includepath path="${DEST_DIR_DEBUG}" /> \r
167               <includepath path="${WORKSPACE_DIR}"/>\r
168               <includepath path="${MODULE_DIR}"/>\r
169               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
170               <EXTRA.INC/>\r
171               <argument value="${PP_FLAGS}"/>\r
172               <fileset casesensitive="off" file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.c"/>\r
173               <outputFile value="@{FILENAME}.@{FILEEXT}.i"/>\r
174             </command>\r
175           </cc>\r
176     \r
177           <gendepex inputFile="@{FILENAME}.@{FILEEXT}.i" outputFile="${DEST_DIR_OUTPUT}\${BASE_NAME}.@{FILEEXT}.depex"/>\r
178           <delete file="@{FILENAME}.@{FILEEXT}.i" />\r
179           <delete file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.c" /> \r
180         </sequential>\r
181       </OnDependency>\r
182     </sequential>\r
183   </macrodef>\r
184   \r
185 <!-- Usage Example\r
186    <Build_C_Code\r
187      FILEPATH="."\r
188      FILENAME="${SOURCE_NAME}"\r
189      FILEEXT="c">\r
190      <EXTRA.INC>\r
191        <includepath path="${PACKAGE_DIR}\Include"/>\r
192        <includepath path="${PACKAGE_DIR}\Include\${ARCH}"/>\r
193      </EXTRA.INC>\r
194 \r
195      <EXTRA.ARG>\r
196        <argument value="/D EFI_DEBUG /D EFI_WHATEVER_FLAG"/>\r
197      </EXTRA.ARG>\r
198    </Build_C_Code>\r
199   -->\r
200 \r
201   <!--\r
202     IA32/x64 Assembly\r
203     -->\r
204   <macrodef name="Build_Assembly">\r
205     <attribute name="FILEPATH"/>\r
206     <attribute name="FILENAME"/>\r
207     <attribute name="FILEEXT" default="asm"/>\r
208 \r
209     <element name="EXTRA.INC" optional="yes"/>\r
210     <element name="EXTRA.ARG" optional="yes"/>\r
211 \r
212     <sequential>\r
213       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
214 \r
215       <OnDependency>\r
216         <sourcefiles>\r
217           <file Name="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
218         </sourcefiles>\r
219         <targetfiles>\r
220           <file Name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
221         </targetfiles>\r
222 \r
223         <sequential>\r
224           <cc userdefine="on">\r
225             <command type="ASM">\r
226               <includepath path="${WORKSPACE_DIR}"/>\r
227               <includepath path="${MODULE_DIR}"/>\r
228               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
229               <EXTRA.INC/>\r
230       \r
231               <argument value="${ASM_FLAGS}"/>\r
232               <EXTRA.ARG/>\r
233               <argument value="/Fl${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.lst"/>\r
234               <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
235       \r
236               <fileset casesensitive="off" file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
237             </command>\r
238           </cc>\r
239         </sequential>\r
240       </OnDependency>\r
241       <!--\r
242         for library generation later\r
243         -->\r
244       <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
245     </sequential>\r
246   </macrodef>\r
247 \r
248   <!--\r
249     Library    private HashMap map = new HashMap();\r
250     -->\r
251   <macrodef name="Build_Library">\r
252     <attribute name="FILENAME" />\r
253     <attribute name="FILEEXT" default="obj"/>\r
254 \r
255     <element name="EXTRA.INC" optional="yes"/>\r
256     <element name="EXTRA.ARG" optional="yes"/>\r
257 \r
258     <sequential>\r
259       <mkdir dir="${BIN_DIR}"/>\r
260 \r
261       <OnDependency>\r
262         <sourcefiles>\r
263           <file list="${OBJECTS}"/>\r
264         </sourcefiles>\r
265         <targetfiles>\r
266           <file name="${BIN_DIR}\@{FILENAME}.lib"/>\r
267         </targetfiles>\r
268 \r
269         <sequential>\r
270           <!--  <echo>re-generate library</echo> -->\r
271           <cc userdefine="on">\r
272             <command type="LIB">\r
273               <argument value="${LIB_FLAGS}"/>\r
274               <!--<argument value="${OBJECTS}"/>-->\r
275               <FileList dir="" files="${OBJECTS}"/>\r
276               <!-- <argument value="/out:${BIN_DIR}\@{FILENAME}.lib"/> -->\r
277               <OutputFile value="${BIN_DIR}\@{FILENAME}.lib"/>\r
278             </command>\r
279           </cc>\r
280         </sequential>\r
281       </OnDependency>\r
282     </sequential>\r
283   </macrodef>\r
284 \r
285   <!--\r
286     IPF Assembly\r
287     -->\r
288   <macrodef name="Build_IPF_Assembly_Code">\r
289     <attribute name="FILEPATH"/>\r
290     <attribute name="FILENAME"/>\r
291     <attribute name="FILEEXT" default="s"/>\r
292 \r
293     <element name="EXTRA.INC" optional="yes"/>\r
294     <element name="EXTRA.ARG" optional="yes"/>\r
295 \r
296     <sequential>\r
297       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
298 \r
299       <if>\r
300         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
301         <then>\r
302           <makedeps DepsFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep">\r
303             <input file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
304             <includepath path="${WORKSPACE_DIR}"/>\r
305             <includepath path="${MODULE_DIR}"/>\r
306             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
307             <EXTRA.INC/>\r
308           </makedeps>\r
309         </then>\r
310       </if>\r
311 \r
312       <OnDependency>\r
313         <sourcefiles>\r
314           <file listfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep"/>\r
315         </sourcefiles>\r
316         <targetfiles>\r
317           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
318         </targetfiles>\r
319 \r
320         <sequential>\r
321           <copy file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
322                 tofile="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.c"/>\r
323           <cc userdefine="on">\r
324             <command type="CC" workdir="."> \r
325               <includepath path="${WORKSPACE_DIR}"/>\r
326               <includepath path="${MODULE_DIR}"/>\r
327               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
328               <EXTRA.INC/>\r
329               <argument value="${PP_FLAGS}"/>\r
330               <fileset casesensitive="off" file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.c"/>\r
331             </command>\r
332           </cc>\r
333           <move file="@{FILENAME}.@{FILEEXT}.i" \r
334                 tofile="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pro"/>\r
335       \r
336           <cc userdefine="on">\r
337             <command type="ASM" includepathDelimiter="-I">\r
338               <includepath path="${WORKSPACE_DIR}"/>\r
339               <includepath path="${MODULE_DIR}"/>\r
340               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
341               <EXTRA.INC/>\r
342       \r
343               <argument value="${ASM_FLAGS}"/>\r
344               <EXTRA.ARG/>\r
345               <!-- <argument value="-o ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> -->\r
346               <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
347       \r
348               <fileset casesensitive="off" file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pro"/>\r
349             </command>\r
350           </cc>\r
351         </sequential>\r
352       </OnDependency>\r
353       <!--\r
354         for library generation later\r
355         -->\r
356       <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
357     </sequential>\r
358   </macrodef>\r
359 \r
360 \r
361   <macrodef name="Build_IPF_PP_Code">\r
362     <attribute name="FILEPATH"/>\r
363     <attribute name="FILENAME"/>\r
364     <attribute name="FILEEXT" default="i"/>\r
365 \r
366     <element name="EXTRA.INC" optional="yes"/>\r
367     <element name="EXTRA.ARG" optional="yes"/>\r
368 \r
369     <sequential>\r
370       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
371   \r
372       <cc userdefine="on">\r
373         <command type="ASM" includepathDelimiter="-I">\r
374           <includepath path="${WORKSPACE_DIR}"/>\r
375           <includepath path="${MODULE_DIR}"/>\r
376           <includepath path="${MODULE_DIR}\${ARCH}"/>\r
377           <EXTRA.INC/>\r
378   \r
379           <argument value="${ASM_FLAGS}"/>\r
380           <EXTRA.ARG/>\r
381           <!-- <argument value="-o ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/> -->\r
382           <OutputFile File="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
383   \r
384           <fileset casesensitive="off" file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
385         </command>\r
386       </cc>\r
387   \r
388       <!--\r
389         for library generation later\r
390         -->\r
391       <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
392     </sequential>\r
393   </macrodef>\r
394   \r
395   <!--\r
396     [Build.Ia32.Makefile,Build.Ipf.Makefile,Build.Ebc.Makefile]\r
397     [Build.Ia32.Custom_Makefile,Build.Ipf.Custom_Makefile,Build.Ebc.Custom_Makefile]\r
398     -->\r
399   <macrodef name="Build_Custom_Build">\r
400     <attribute name="FILEPATH"/>\r
401     <attribute name="FILENAME"/>\r
402     <attribute name="FILEEXT" default="c"/>\r
403 \r
404     <element name="EXTRA.INC" optional="yes"/>\r
405     <element name="EXTRA.ARG" optional="yes"/>\r
406 \r
407     <sequential>\r
408 \r
409     </sequential>\r
410   </macrodef>\r
411 \r
412   <!--\r
413     Unicode -> .sdb\r
414     -->\r
415   <macrodef name="Build_Unicode">\r
416     <attribute name="FILEPATH"/>\r
417     <attribute name="FILENAME"/>\r
418     <attribute name="FILEEXT" default="uni"/>\r
419 \r
420     <element name="EXTRA.INC" optional="yes"/>\r
421     <element name="EXTRA.ARG" optional="yes"/>\r
422 \r
423     <sequential>\r
424       <mkdir dir="${DEST_DIR_OUTPUT}\@{FILEPATH}"/>\r
425 \r
426       <OnDependency>\r
427         <sourcefiles>\r
428           <file name="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
429         </sourcefiles>\r
430         <targetfiles>\r
431           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
432         </targetfiles>\r
433 \r
434         <sequential>\r
435           <strgather commandtype="parse" newdatabase="true">\r
436             <database name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
437             <includepath path="${WORKSPACE_DIR}"/>\r
438             <includepath path="${MODULE_DIR}"/>\r
439             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
440             <EXTRA.INC/>\r
441             <EXTRA.ARG/>\r
442             <inputfile name="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
443           </strgather>\r
444         </sequential>\r
445       </OnDependency>\r
446 \r
447       <bl name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
448     </sequential>\r
449   </macrodef>\r
450 \r
451   <!--\r
452     .sdb(s) -> .c, .h -> .obj\r
453     -->\r
454   <macrodef name="Build_Unicode_Database">\r
455     <attribute name="FILEPATH"/>\r
456     <attribute name="FILENAME"/>\r
457     <attribute name="FILEEXT" default="sdb"/>\r
458 \r
459     <element name="EXTRA.INC" optional="yes"/>\r
460     <element name="EXTRA.ARG" optional="yes"/>\r
461 \r
462     <sequential>\r
463       <OnDependency>\r
464         <sourcefiles>\r
465           <file list="${SDB_FILES}"/>\r
466           <file list="${SOURCE_FILES}"/>\r
467         </sourcefiles>\r
468         <targetfiles>\r
469           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
470         </targetfiles>\r
471         \r
472         <sequential>\r
473           <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb" verbose="read">\r
474             <skipext name=".uni"/>\r
475             <skipext name=".h"/>\r
476             <database list="${SDB_FILES}"/>\r
477             <inputfile name="${SOURCE_FILES}"/>\r
478           </strgather>\r
479         </sequential>\r
480       </OnDependency>\r
481 \r
482       <OnDependency>\r
483         <sourcefiles>\r
484           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
485         </sourcefiles>\r
486         <targetfiles>\r
487           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}StrDefs.h"/>\r
488           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.hpk"/>\r
489           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.c"/>\r
490         </targetfiles>\r
491         \r
492         <sequential>\r
493           <strgather basename="@{FILENAME}Strings" commandtype="dump"\r
494                      outputdefines="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}StrDefs.h"\r
495                      outputhpk="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.hpk"\r
496                      outputstring="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.c">\r
497             <database name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.sdb"/>\r
498           </strgather>\r
499         </sequential>\r
500       </OnDependency>\r
501 \r
502       <OnDependency>\r
503         <sourcefiles>\r
504           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.c"/>\r
505         </sourcefiles>\r
506         <targetfiles>\r
507           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Strings.obj"/>\r
508         </targetfiles>\r
509         \r
510         <sequential>\r
511           <cc userdefine="on">\r
512             <command type="CC" workdir="${DEST_DIR_OUTPUT}" includepathDelimiter="-I">\r
513               <includepath path="${WORKSPACE_DIR}"/>\r
514               <includepath path="${MODULE_DIR}"/>\r
515               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
516 \r
517               <argument value="${CC_FLAGS}"/>\r
518               <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Strings.obj"/>\r
519 \r
520               <fileset casesensitive="off" file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}Strings.c"/>\r
521             </command>\r
522           </cc>\r
523         </sequential>\r
524       </OnDependency>\r
525 \r
526       <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Strings.obj"/>\r
527     </sequential>\r
528   </macrodef>\r
529 \r
530   <!--\r
531     Vfr\r
532     -->\r
533   <macrodef name="Build_Vfr">\r
534     <attribute name="FILEPATH"/>\r
535     <attribute name="FILENAME"/>\r
536     <attribute name="FILEEXT" default="vfr"/>\r
537 \r
538     <element name="EXTRA.INC" optional="yes"/>\r
539     <element name="EXTRA.ARG" optional="yes"/>\r
540 \r
541     <sequential>\r
542       <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>\r
543 \r
544       <if>\r
545         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
546         <then>\r
547           <makedeps DepsFile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep">\r
548             <input file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
549             <!-- <input file="${DEST_DIR_DEBUG}\AutoGen.h"/> -->\r
550             <includepath path="${WORKSPACE_DIR}"/>\r
551             <includepath path="${MODULE_DIR}"/>\r
552             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
553             <EXTRA.INC/>\r
554           </makedeps>\r
555         </then>\r
556       </if>\r
557 \r
558       <OnDependency>\r
559         <sourcefiles>\r
560           <file listfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}.dep"/>\r
561         </sourcefiles>\r
562         <targetfiles>\r
563           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
564         </targetfiles>\r
565 \r
566         <sequential>\r
567           <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}\@{FILEPATH}" vfrFile="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}">\r
568             <includepath path="${WORKSPACE_DIR}"/>\r
569             <includepath path="${MODULE_DIR}"/>\r
570             <includepath path="${MODULE_DIR}\${ARCH}"/>\r
571             <EXTRA.INC/>\r
572           </vfrcompile>\r
573     \r
574           <cc userdefine="on">\r
575             <command type="CC" workdir="${DEST_DIR_OUTPUT}" includepathDelimiter="-I">\r
576               <includepath path="${WORKSPACE_DIR}"/>\r
577               <includepath path="${MODULE_DIR}"/>\r
578               <includepath path="${MODULE_DIR}\${ARCH}"/>\r
579               <argument value="${CC_FLAGS}"/>\r
580               <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
581               <EXTRA.ARG/>\r
582     \r
583               <fileset casesensitive="off" file="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.c"/>\r
584             </command>\r
585           </cc>\r
586     \r
587           <delete file="@{FILENAME}.i"/>\r
588         </sequential>\r
589       </OnDependency>\r
590       <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.obj"/>\r
591     </sequential>\r
592   </macrodef>\r
593 \r
594 <!--############################################################################\r
595   Build Sections\r
596 #############################################################################-->\r
597   <!--\r
598     DLL\r
599     -->\r
600   <macrodef name="GenDll">\r
601     <attribute name="FILEPATH"/>\r
602     <attribute name="FILENAME"/>\r
603     <attribute name="FILEEXT"/>\r
604 \r
605     <element name="LIB.ARG" optional="yes"/>\r
606     <element name="LINK.ARG" optional="yes"/>\r
607 \r
608     <sequential>\r
609       <OnDependency>\r
610         <sourcefiles>\r
611           <file list="${OBJECTS}"/>\r
612           <file list="${LIBS}"/>\r
613         </sourcefiles>\r
614         <targetfiles>\r
615           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/>\r
616         </targetfiles>\r
617 \r
618         <sequential>\r
619           <cc userdefine="on">\r
620             <command type="LINK">\r
621               <argument value="${LINK_FLAGS}"/>\r
622               <libset libs="${LIBS}"/>\r
623               <LINK.ARG/>\r
624               <EntryPoint value="_ModuleEntryPoint"/>\r
625               <map value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.map"/>\r
626               <pdb value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pdb"/>\r
627               <OutputFile value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/>\r
628               <FileList dir="" files="${OBJECTS}"/>\r
629             </command>\r
630           </cc>\r
631         </sequential>\r
632       </OnDependency>\r
633     </sequential>\r
634   </macrodef>\r
635 \r
636   <!--\r
637     EFI\r
638     -->\r
639   <macrodef name="GenEfi">\r
640     <attribute name="FILEPATH"/>\r
641     <attribute name="FILENAME"/>\r
642     <attribute name="FILEEXT" default="dll"/>\r
643 \r
644     <sequential>\r
645       <OnDependency>\r
646         <sourcefiles>\r
647           <file name="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
648         </sourcefiles>\r
649         <targetfiles>\r
650           <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.efi"/>\r
651         </targetfiles>\r
652 \r
653         <sequential>\r
654           <fwimage componenttype="${COMPONENT_TYPE}" outImage="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" \r
655                    peImage="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" time="0"/>\r
656         </sequential>\r
657       </OnDependency>\r
658     </sequential>\r
659   </macrodef>\r
660 \r
661 <!--\r
662   EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
663   EFI_SECTION_VERSION\r
664   EFI_SECTION_USER_INTERFACE\r
665   EFI_SECTION_DXE_DEPEX\r
666   EFI_SECTION_PEI_DEPEX\r
667   EFI_SECTION_PE32\r
668   EFI_SECTION_PIC\r
669   EFI_SECTION_TE\r
670   EFI_SECTION_RAW\r
671   EFI_SECTION_COMPRESSION\r
672   EFI_SECTION_GUID_DEFINED\r
673   EFI_SECTION_COMPATIBILITY16\r
674   EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
675   -->\r
676   <!--\r
677     EFI_SECTION_PE32\r
678     -->\r
679   <macrodef name="EFI_SECTION_PE32">\r
680     <attribute name="FILEPATH"/>\r
681     <attribute name="FILENAME"/>\r
682     <attribute name="FILEEXT" default="" />\r
683 \r
684     <element name="PRE.PROCESS" optional="yes"/>\r
685     <element name="POST.PROCESS" optional="yes"/>\r
686 \r
687     <sequential>\r
688       <PRE.PROCESS/>\r
689 \r
690       <if>\r
691         <not>\r
692           <equals arg1="${OBJECTS}" arg2=""/>\r
693         </not>\r
694 \r
695         <then>\r
696           <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
697             <LIB.ARG></LIB.ARG>\r
698             <LINK.ARG></LINK.ARG>\r
699           </GenDll>\r
700     \r
701           <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
702         </then>\r
703       </if>\r
704 \r
705       <OnDependency>\r
706         <sourcefiles>\r
707           <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.efi"/>\r
708         </sourcefiles>\r
709         <targetfiles>\r
710           <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.pe32"/>\r
711         </targetfiles>\r
712 \r
713         <sequential>\r
714           <copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${BIN_DIR}\@{FILENAME}.efi" />\r
715           <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" \r
716                       outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.pe32" \r
717                       sectiontype="EFI_SECTION_PE32"/>\r
718     \r
719           <POST.PROCESS/>\r
720         </sequential>\r
721       </OnDependency>\r
722     </sequential>\r
723   </macrodef>\r
724 \r
725   <!--\r
726     EFI_SECTION_VERSION\r
727     -->\r
728   <macrodef name="EFI_SECTION_VERSION">\r
729     <attribute name="FILEPATH"/>\r
730     <attribute name="FILENAME"/>\r
731     <attribute name="FILEEXT" default="" />\r
732     <attribute name="VERSION" default="0000"/>\r
733 \r
734     <element name="PRE.PROCESS" optional="yes"/>\r
735     <element name="POST.PROCESS" optional="yes"/>\r
736 \r
737     <sequential>\r
738       <if>\r
739         <not>\r
740           <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.ver"/>\r
741         </not>\r
742 \r
743         <then>\r
744           <PRE.PROCESS/>\r
745           <gensection outputfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.ver" \r
746                       versionnum="@{VERSION}"\r
747                       sectiontype="EFI_SECTION_VERSION"/>\r
748           <POST.PROCESS/>\r
749         </then>\r
750       </if>\r
751     </sequential>\r
752   </macrodef>\r
753 \r
754   <!--\r
755     EFI_SECTION_USER_INTERFACE\r
756     -->\r
757   <macrodef name="EFI_SECTION_USER_INTERFACE">\r
758     <attribute name="FILEPATH"/>\r
759     <attribute name="FILENAME"/>\r
760     <attribute name="FILEEXT" default="" />\r
761     <attribute name="UI" default="${BASE_NAME}"/>\r
762 \r
763     <element name="PRE.PROCESS" optional="yes"/>\r
764     <element name="POST.PROCESS" optional="yes"/>\r
765 \r
766     <sequential>\r
767       <if>\r
768         <not>\r
769           <available type="file" file="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.ui"/>\r
770         </not>\r
771 \r
772         <then>\r
773           <PRE.PROCESS/>\r
774           <gensection interfacestring="@{UI}"\r
775                       outputfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.ui" \r
776                       sectiontype="EFI_SECTION_USER_INTERFACE"/>\r
777           <POST.PROCESS/>\r
778         </then>\r
779       </if>\r
780     </sequential>\r
781   </macrodef>\r
782 \r
783   <!--\r
784     EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
785     <macrodef name="EFI_SECTION_FREEFORM_SUBTYPE_GUID">\r
786       <attribute name="FILEPATH"/>\r
787       <attribute name="FILENAME"/>\r
788       <attribute name="FILEEXT" default=""/>\r
789   \r
790       <element name="EXTRA.INC" optional="yes"/>\r
791       <element name="EXTRA.ARG" optional="yes"/>\r
792   \r
793       <sequential>\r
794         <gensection inputfile="" \r
795                     outputfile="" \r
796                     sectiontype="EFI_SECTION_FREEFORM_SUBTYPE_GUID"/>\r
797       </sequential>\r
798     </macrodef>\r
799     -->\r
800 \r
801   <!--\r
802     EFI_SECTION_DXE_DEPEX\r
803     -->\r
804   <macrodef name="EFI_SECTION_DXE_DEPEX">\r
805     <attribute name="FILEPATH"/>\r
806     <attribute name="FILENAME"/>\r
807     <attribute name="FILEEXT" default="dxs"/>\r
808 \r
809     <element name="PRE.PROCESS" optional="yes"/>\r
810     <element name="POST.PROCESS" optional="yes"/>\r
811 \r
812     <sequential>\r
813       <PRE.PROCESS/>\r
814 \r
815       <if>\r
816         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex"/>\r
817         <then>\r
818           <OnDependency>\r
819             <sourcefiles>\r
820               <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex"/>\r
821             </sourcefiles>\r
822             <targetfiles>\r
823               <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
824             </targetfiles>\r
825             <sequential>\r
826               <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex" \r
827                           outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx" \r
828                           sectiontype="EFI_SECTION_DXE_DEPEX"/>\r
829             </sequential>\r
830           </OnDependency>\r
831         </then>\r
832         <else>\r
833           <if>\r
834             <not>\r
835               <available type="file" file="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
836             </not>\r
837             <then>\r
838               <touch file="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
839             </then>\r
840           </if>\r
841         </else>\r
842       </if>\r
843 \r
844       <POST.PROCESS/>\r
845     </sequential>\r
846   </macrodef>\r
847 \r
848   <!--\r
849     EFI_SECTION_PEI_DEPEX\r
850     -->\r
851   <macrodef name="EFI_SECTION_PEI_DEPEX">\r
852     <attribute name="FILEPATH"/>\r
853     <attribute name="FILENAME"/>\r
854     <attribute name="FILEEXT" default="dxs"/>\r
855 \r
856     <element name="PRE.PROCESS" optional="yes"/>\r
857     <element name="POST.PROCESS" optional="yes"/>\r
858     <sequential>\r
859       <PRE.PROCESS/>\r
860       <if>\r
861         <available type="file" file="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex"/>\r
862         <then>\r
863           <OnDependency>\r
864             <sourcefiles>\r
865               <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex"/>\r
866             </sourcefiles>\r
867             <targetfiles>\r
868               <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
869             </targetfiles>\r
870 \r
871             <sequential>\r
872               <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}.depex" \r
873                           outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx" \r
874                           sectiontype="EFI_SECTION_PEI_DEPEX"/>\r
875             </sequential>\r
876           </OnDependency>\r
877           \r
878         </then>\r
879         <else>\r
880           <if>\r
881             <not>\r
882               <available type="file" file="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
883             </not>\r
884             <then>\r
885               <touch file="${DEST_DIR_OUTPUT}\@{FILENAME}.dpx"/>\r
886             </then>\r
887           </if>\r
888         </else>\r
889       </if>\r
890       <POST.PROCESS/>\r
891     </sequential>\r
892   </macrodef>\r
893 \r
894   <!--\r
895     EFI_SECTION_PIC\r
896     <macrodef name="EFI_SECTION_PIC">\r
897       <attribute name="FILEPATH"/>\r
898       <attribute name="FILENAME"/>\r
899       <attribute name="FILEEXT" default=""/>\r
900   \r
901       <element name="EXTRA.INC" optional="yes"/>\r
902       <element name="EXTRA.ARG" optional="yes"/>\r
903   \r
904       <sequential>\r
905         <gensection inputfile="${BIN_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
906                     outputfile="${BIN_DIR}\@{FILENAME}.pe32" \r
907                     sectiontype="EFI_SECTION_PIC"/>\r
908       </sequential>\r
909     </macrodef>\r
910     -->\r
911 \r
912   <!--\r
913     EFI_SECTION_TE\r
914     <macrodef name="EFI_SECTION_TE">\r
915       <attribute name="FILEPATH"/>\r
916       <attribute name="FILENAME"/>\r
917       <attribute name="FILEEXT" default=""/>\r
918   \r
919       <element name="EXTRA.INC" optional="yes"/>\r
920       <element name="EXTRA.ARG" optional="yes"/>\r
921   \r
922       <sequential>\r
923         <gensection inputfile="${BIN_DIR}\@{FILENAME}.@{FILEEXT}" \r
924                     outputfile="${BIN_DIR}\@{FILENAME}.pe32" \r
925                     sectiontype="EFI_SECTION_PE32"/>\r
926       </sequential>\r
927     </macrodef>\r
928     -->\r
929 \r
930   <!--\r
931     EFI_SECTION_RAW\r
932     -->\r
933   <macrodef name="EFI_SECTION_RAW">\r
934     <attribute name="FILEPATH"/>\r
935     <attribute name="FILENAME"/>\r
936     <attribute name="FILEEXT" default="bin"/>\r
937 \r
938     <element name="PRE.PROCESS" optional="yes"/>\r
939     <element name="POST.PROCESS" optional="yes"/>\r
940 \r
941     <sequential>\r
942       <OnDependency>\r
943         <sourcefiles>\r
944           <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}"/>\r
945         </sourcefiles>\r
946         <targetfiles>\r
947           <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.sec"/>\r
948         </targetfiles>\r
949 \r
950         <sequential>\r
951           <PRE.PROCESS/>\r
952           <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.@{FILEEXT}" \r
953                       outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.sec" \r
954                       sectiontype="EFI_SECTION_RAW"/>\r
955           <POST.PROCESS/>\r
956         </sequential>\r
957       </OnDependency>\r
958     </sequential>\r
959   </macrodef>\r
960 \r
961   <!--\r
962     EFI_SECTION_COMPRESSION\r
963     <macrodef name="EFI_SECTION_COMPRESSION">\r
964       <attribute name="FILEPATH"/>\r
965       <attribute name="FILENAME"/>\r
966       <attribute name="FILEEXT" default=""/>\r
967   \r
968       <element name="EXTRA.INC" optional="yes"/>\r
969       <element name="EXTRA.ARG" optional="yes"/>\r
970   \r
971       <sequential>\r
972         <gensection inputfile="${BIN_DIR}\@{FILENAME}.@{FILEEXT}" \r
973                     outputfile="${BIN_DIR}\@{FILENAME}.pe32" \r
974                     sectiontype="EFI_SECTION_PE32"/>\r
975       </sequential>\r
976     </macrodef>\r
977     -->\r
978 \r
979   <!--\r
980     EFI_SECTION_GUID_DEFINED\r
981     <macrodef name="EFI_SECTION_GUID_DEFINED">\r
982       <attribute name="FILEPATH"/>\r
983       <attribute name="FILENAME"/>\r
984       <attribute name="FILEEXT" default=""/>\r
985   \r
986       <element name="EXTRA.INC" optional="yes"/>\r
987       <element name="EXTRA.ARG" optional="yes"/>\r
988   \r
989       <sequential>\r
990         <gensection inputfile="${BIN_DIR}\@{FILENAME}.@{FILEEXT}" \r
991                     outputfile="${BIN_DIR}\@{FILENAME}.pe32" \r
992                     sectiontype="EFI_SECTION_PE32"/>\r
993       </sequential>\r
994     </macrodef>\r
995     -->\r
996 \r
997   <!--\r
998     EFI_SECTION_COMPATIBILITY16\r
999     <macrodef name="EFI_SECTION_COMPATIBILITY16">\r
1000       <attribute name="FILEPATH"/>\r
1001       <attribute name="FILENAME"/>\r
1002       <attribute name="FILEEXT" default=""/>\r
1003   \r
1004       <element name="EXTRA.INC" optional="yes"/>\r
1005       <element name="EXTRA.ARG" optional="yes"/>\r
1006   \r
1007       <sequential>\r
1008         <gensection inputfile="${BIN_DIR}\@{FILENAME}.@{FILEEXT}" \r
1009                     outputfile="${BIN_DIR}\@{FILENAME}.pe32" \r
1010                     sectiontype="EFI_SECTION_PE32"/>\r
1011       </sequential>\r
1012     </macrodef>\r
1013   \r
1014     -->\r
1015   <!--\r
1016     EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
1017     -->\r
1018   <macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">\r
1019     <attribute name="FILEPATH"/>\r
1020     <attribute name="FILENAME"/>\r
1021     <attribute name="FILEEXT" default="fv"/>\r
1022 \r
1023     <element name="PRE.PROCESS" optional="yes"/>\r
1024     <element name="POST.PROCESS" optional="yes"/>\r
1025 \r
1026     <sequential>\r
1027       <OnDependency>\r
1028         <sourcefiles>\r
1029           <file name="${FV_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}"/>\r
1030         </sourcefiles>\r
1031         <targetfiles>\r
1032           <file name="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}fv.sec"/>\r
1033         </targetfiles>\r
1034 \r
1035         <sequential>\r
1036           <PRE.PROCESS/>\r
1037     \r
1038           <copy file="${FV_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1039                 tofile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1040                 overwrite="true"/>\r
1041           <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1042                       outputfile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}fv.sec" \r
1043                       sectiontype="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>\r
1044     \r
1045           <POST.PROCESS/>\r
1046         </sequential>\r
1047       </OnDependency>\r
1048     </sequential>\r
1049   </macrodef>\r
1050 \r
1051   <!--\r
1052     Binary\r
1053     -->\r
1054   <macrodef name="Build_Binary">\r
1055     <attribute name="FILEPATH"/>\r
1056     <attribute name="FILENAME"/>\r
1057     <attribute name="FILEEXT" default="bin"/>\r
1058 \r
1059     <element name="EXTRA.INC" optional="yes"/>\r
1060     <element name="EXTRA.ARG" optional="yes"/>\r
1061 \r
1062     <sequential>\r
1063       <copy file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1064             tofile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.bin"/>\r
1065     </sequential>\r
1066   </macrodef>\r
1067 \r
1068   <!--\r
1069     Graphics (bmp, ...)\r
1070     -->\r
1071   <macrodef name="Build_Graphics">\r
1072     <attribute name="FILEPATH"/>\r
1073     <attribute name="FILENAME"/>\r
1074     <attribute name="FILEEXT" default="bmp"/>\r
1075 \r
1076     <element name="EXTRA.INC" optional="yes"/>\r
1077     <element name="EXTRA.ARG" optional="yes"/>\r
1078 \r
1079     <sequential>\r
1080       <mkdir dir="${MODULE_DIR}\@{FILEPATH}" /> \r
1081       <copy file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1082             tofile="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.bin"/>\r
1083     </sequential>\r
1084   </macrodef>\r
1085   <macrodef name="Build_EFI">\r
1086     <attribute name="FILEPATH"/>\r
1087     <attribute name="FILENAME"/>\r
1088     <attribute name="FILEEXT" default="efi"/>\r
1089 \r
1090     <element name="EXTRA.INC" optional="yes"/>\r
1091     <element name="EXTRA.ARG" optional="yes"/>\r
1092 \r
1093     <sequential>\r
1094       <mkdir dir="${MODULE_DIR}\@{FILEPATH}" /> \r
1095       <copy file="${MODULE_DIR}\@{FILEPATH}\@{FILENAME}.@{FILEEXT}" \r
1096         tofile="${DEST_DIR_OUTPUT}\${BASE_NAME}.efi"/>\r
1097     </sequential>\r
1098   </macrodef>\r
1099 </project>\r