Added a line to instruct users how to exit the NT32 emulation platform.
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
CommitLineData
878ddf1f 1<?xml version="1.0" encoding="UTF-8"?>\r
2<!--\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11-->\r
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
22e0585c 28 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 29\r
30 <if>\r
22e0585c 31 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 32 <then>\r
22e0585c 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
878ddf1f 36 <includepath path="${WORKSPACE_DIR}"/>\r
37 <includepath path="${MODULE_DIR}"/>\r
22e0585c 38 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 39 <EXTRA.INC/>\r
40 </makedeps>\r
41 </then>\r
42 </if>\r
43\r
44 <OnDependency>\r
45 <sourcefiles>\r
22e0585c 46 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 47 </sourcefiles>\r
48 <targetfiles>\r
22e0585c 49 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 57 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 58 <EXTRA.INC/>\r
59\r
60 <argument value="${CC_FLAGS}"/>\r
61 <EXTRA.ARG/>\r
22e0585c 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
878ddf1f 66\r
22e0585c 67 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 68 </command>\r
69 </cc>\r
70 </sequential>\r
71 </OnDependency>\r
72\r
73 <!--\r
74 for library generation later\r
75 -->\r
22e0585c 76 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> \r
878ddf1f 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
22e0585c 90 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 91\r
92 <if>\r
22e0585c 93 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 94 <then>\r
22e0585c 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
878ddf1f 98 <includepath path="${WORKSPACE_DIR}"/>\r
99 <includepath path="${MODULE_DIR}"/>\r
22e0585c 100 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 101 <EXTRA.INC/>\r
102 </makedeps>\r
103 </then>\r
104 </if>\r
105\r
106 <OnDependency>\r
107 <sourcefiles>\r
22e0585c 108 <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 109 </sourcefiles>\r
110 <targetfiles>\r
22e0585c 111 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 119 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 120 <EXTRA.INC/>\r
121 \r
122 <argument value="${CC_FLAGS}"/>\r
123 <EXTRA.ARG/>\r
22e0585c 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
878ddf1f 128 \r
22e0585c 129 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 130 </command>\r
131 </cc>\r
132 </sequential>\r
133 </OnDependency>\r
134 <!--\r
135 for library generation later\r
136 -->\r
22e0585c 137 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> \r
878ddf1f 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
22e0585c 150 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 151\r
152 <OnDependency>\r
153 <sourcefiles>\r
22e0585c 154 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 155 </sourcefiles>\r
156 <targetfiles>\r
22e0585c 157 <file name="${DEST_DIR_OUTPUT}/${BASE_NAME}.@{FILEEXT}.depex"/>\r
878ddf1f 158 </targetfiles>\r
159\r
160 <sequential>\r
22e0585c 161 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
162 tofile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 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
22e0585c 169 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 170 <EXTRA.INC/>\r
171 <argument value="${PP_FLAGS}"/>\r
22e0585c 172 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 173 <outputFile value="@{FILENAME}.@{FILEEXT}.i"/>\r
174 </command>\r
175 </cc>\r
176 \r
22e0585c 177 <gendepex inputFile="@{FILENAME}.@{FILEEXT}.i" outputFile="${DEST_DIR_OUTPUT}/${BASE_NAME}.@{FILEEXT}.depex"/>\r
878ddf1f 178 <delete file="@{FILENAME}.@{FILEEXT}.i" />\r
22e0585c 179 <delete file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c" /> \r
878ddf1f 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
22e0585c 191 <includepath path="${PACKAGE_DIR}/Include"/>\r
192 <includepath path="${PACKAGE_DIR}/Include/${ARCH}"/>\r
878ddf1f 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
22e0585c 213 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 214\r
215 <OnDependency>\r
216 <sourcefiles>\r
22e0585c 217 <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 218 </sourcefiles>\r
219 <targetfiles>\r
22e0585c 220 <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 228 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 229 <EXTRA.INC/>\r
230 \r
231 <argument value="${ASM_FLAGS}"/>\r
232 <EXTRA.ARG/>\r
22e0585c 233 <argument value="/Fl${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.lst"/>\r
234 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 235 \r
22e0585c 236 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 237 </command>\r
238 </cc>\r
239 </sequential>\r
240 </OnDependency>\r
241 <!--\r
242 for library generation later\r
243 -->\r
22e0585c 244 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 266 <file name="${BIN_DIR}/@{FILENAME}.lib"/>\r
878ddf1f 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
22e0585c 276 <!-- <argument value="/out:${BIN_DIR}/@{FILENAME}.lib"/> -->\r
277 <OutputFile value="${BIN_DIR}/@{FILENAME}.lib"/>\r
878ddf1f 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
22e0585c 297 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 298\r
299 <if>\r
22e0585c 300 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 301 <then>\r
22e0585c 302 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
303 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 304 <includepath path="${WORKSPACE_DIR}"/>\r
305 <includepath path="${MODULE_DIR}"/>\r
22e0585c 306 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 307 <EXTRA.INC/>\r
308 </makedeps>\r
309 </then>\r
310 </if>\r
311\r
312 <OnDependency>\r
313 <sourcefiles>\r
22e0585c 314 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 315 </sourcefiles>\r
316 <targetfiles>\r
22e0585c 317 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 318 </targetfiles>\r
319\r
320 <sequential>\r
22e0585c 321 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
322 tofile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 323 <cc userdefine="on">\r
324 <command type="CC" workdir="."> \r
325 <includepath path="${WORKSPACE_DIR}"/>\r
326 <includepath path="${MODULE_DIR}"/>\r
22e0585c 327 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 328 <EXTRA.INC/>\r
329 <argument value="${PP_FLAGS}"/>\r
22e0585c 330 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 331 </command>\r
332 </cc>\r
333 <move file="@{FILENAME}.@{FILEEXT}.i" \r
22e0585c 334 tofile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pro"/>\r
878ddf1f 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
22e0585c 340 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 341 <EXTRA.INC/>\r
342 \r
343 <argument value="${ASM_FLAGS}"/>\r
344 <EXTRA.ARG/>\r
22e0585c 345 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
346 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 347 \r
22e0585c 348 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pro"/>\r
878ddf1f 349 </command>\r
350 </cc>\r
351 </sequential>\r
352 </OnDependency>\r
353 <!--\r
354 for library generation later\r
355 -->\r
22e0585c 356 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 370 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 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
22e0585c 376 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 377 <EXTRA.INC/>\r
378 \r
379 <argument value="${ASM_FLAGS}"/>\r
380 <EXTRA.ARG/>\r
22e0585c 381 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
382 <OutputFile File="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 383 \r
22e0585c 384 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 385 </command>\r
386 </cc>\r
387 \r
388 <!--\r
389 for library generation later\r
390 -->\r
22e0585c 391 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 424 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 425\r
426 <OnDependency>\r
427 <sourcefiles>\r
22e0585c 428 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 429 </sourcefiles>\r
430 <targetfiles>\r
22e0585c 431 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 432 </targetfiles>\r
433\r
434 <sequential>\r
435 <strgather commandtype="parse" newdatabase="true">\r
22e0585c 436 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 437 <includepath path="${WORKSPACE_DIR}"/>\r
438 <includepath path="${MODULE_DIR}"/>\r
22e0585c 439 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 440 <EXTRA.INC/>\r
441 <EXTRA.ARG/>\r
22e0585c 442 <inputfile name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 443 </strgather>\r
444 </sequential>\r
445 </OnDependency>\r
446\r
22e0585c 447 <bl name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 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
22e0585c 469 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 470 </targetfiles>\r
471 \r
472 <sequential>\r
22e0585c 473 <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb" verbose="read">\r
878ddf1f 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
22e0585c 484 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 485 </sourcefiles>\r
486 <targetfiles>\r
22e0585c 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
878ddf1f 490 </targetfiles>\r
491 \r
492 <sequential>\r
493 <strgather basename="@{FILENAME}Strings" commandtype="dump"\r
22e0585c 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
878ddf1f 498 </strgather>\r
499 </sequential>\r
500 </OnDependency>\r
501\r
502 <OnDependency>\r
503 <sourcefiles>\r
22e0585c 504 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 505 </sourcefiles>\r
506 <targetfiles>\r
22e0585c 507 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 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
22e0585c 515 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 516\r
517 <argument value="${CC_FLAGS}"/>\r
22e0585c 518 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 519\r
22e0585c 520 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 521 </command>\r
522 </cc>\r
523 </sequential>\r
524 </OnDependency>\r
525\r
22e0585c 526 <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 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
22e0585c 545 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 546 <then>\r
22e0585c 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
878ddf1f 550 <includepath path="${WORKSPACE_DIR}"/>\r
551 <includepath path="${MODULE_DIR}"/>\r
22e0585c 552 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 553 <EXTRA.INC/>\r
554 </makedeps>\r
555 </then>\r
556 </if>\r
557\r
558 <OnDependency>\r
559 <sourcefiles>\r
22e0585c 560 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 561 </sourcefiles>\r
562 <targetfiles>\r
22e0585c 563 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 564 </targetfiles>\r
565\r
566 <sequential>\r
22e0585c 567 <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}/@{FILEPATH}" vfrFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}">\r
878ddf1f 568 <includepath path="${WORKSPACE_DIR}"/>\r
569 <includepath path="${MODULE_DIR}"/>\r
22e0585c 570 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 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
22e0585c 578 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 579 <argument value="${CC_FLAGS}"/>\r
22e0585c 580 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 581 <EXTRA.ARG/>\r
582 \r
22e0585c 583 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
878ddf1f 584 </command>\r
585 </cc>\r
586 \r
587 <delete file="@{FILENAME}.i"/>\r
588 </sequential>\r
589 </OnDependency>\r
22e0585c 590 <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 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
22e0585c 615 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
878ddf1f 616 </targetfiles>\r
617\r
618 <sequential>\r
878ddf1f 619 <cc userdefine="on">\r
620 <command type="LINK">\r
621 <argument value="${LINK_FLAGS}"/>\r
61746a87 622 <libset libs="${LIBS}"/>\r
878ddf1f 623 <LINK.ARG/>\r
878ddf1f 624 <EntryPoint value="_ModuleEntryPoint"/>\r
22e0585c 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
61746a87 628 <FileList dir="" files="${OBJECTS}"/>\r
878ddf1f 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
22e0585c 647 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 648 </sourcefiles>\r
649 <targetfiles>\r
22e0585c 650 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 651 </targetfiles>\r
652\r
653 <sequential>\r
22e0585c 654 <fwimage componenttype="${COMPONENT_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
655 peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>\r
878ddf1f 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
22e0585c 707 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 708 </sourcefiles>\r
709 <targetfiles>\r
22e0585c 710 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"/>\r
878ddf1f 711 </targetfiles>\r
712\r
713 <sequential>\r
22e0585c 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
878ddf1f 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
22e0585c 740 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"/>\r
878ddf1f 741 </not>\r
742\r
743 <then>\r
744 <PRE.PROCESS/>\r
22e0585c 745 <gensection outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver" \r
878ddf1f 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
22e0585c 769 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"/>\r
878ddf1f 770 </not>\r
771\r
772 <then>\r
773 <PRE.PROCESS/>\r
774 <gensection interfacestring="@{UI}"\r
22e0585c 775 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui" \r
878ddf1f 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
22e0585c 816 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 817 <then>\r
818 <OnDependency>\r
819 <sourcefiles>\r
22e0585c 820 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 821 </sourcefiles>\r
822 <targetfiles>\r
22e0585c 823 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 824 </targetfiles>\r
825 <sequential>\r
22e0585c 826 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex" \r
827 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 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
22e0585c 835 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 836 </not>\r
837 <then>\r
22e0585c 838 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 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
22e0585c 861 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 862 <then>\r
863 <OnDependency>\r
864 <sourcefiles>\r
22e0585c 865 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 866 </sourcefiles>\r
867 <targetfiles>\r
22e0585c 868 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 869 </targetfiles>\r
870\r
871 <sequential>\r
22e0585c 872 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex" \r
873 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 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
22e0585c 882 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 883 </not>\r
884 <then>\r
22e0585c 885 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 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
22e0585c 905 <gensection inputfile="${BIN_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
906 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 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
22e0585c 923 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
924 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 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
22e0585c 944 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 945 </sourcefiles>\r
946 <targetfiles>\r
22e0585c 947 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
878ddf1f 948 </targetfiles>\r
949\r
950 <sequential>\r
951 <PRE.PROCESS/>\r
22e0585c 952 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}" \r
953 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec" \r
878ddf1f 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
22e0585c 972 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
973 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 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
22e0585c 990 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
991 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 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
22e0585c 1008 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
1009 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 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
22e0585c 1029 <file name="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 1030 </sourcefiles>\r
1031 <targetfiles>\r
22e0585c 1032 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"/>\r
878ddf1f 1033 </targetfiles>\r
1034\r
1035 <sequential>\r
1036 <PRE.PROCESS/>\r
1037 \r
22e0585c 1038 <copy file="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1039 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
878ddf1f 1040 overwrite="true"/>\r
22e0585c 1041 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1042 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec" \r
878ddf1f 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
22e0585c 1063 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1064 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 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
22e0585c 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
878ddf1f 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
22e0585c 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
878ddf1f 1097 </sequential>\r
1098 </macrodef>\r
1099</project>\r