Modify PCD tool according to final PCD schema modification.
[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
75d0c5b1 285 <!--\r
286 GCC Assembly\r
287 -->\r
288 <macrodef name="Build_GCC_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 \r
322 <cc userdefine="on">\r
323 <command type="ASM" includepathDelimiter="-I">\r
324 <EXTRA.INC/>\r
325 \r
326 <argument value="${ASM_FLAGS}"/>\r
327 <EXTRA.ARG/>\r
328 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
329 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
330 \r
331 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
332 </command>\r
333 </cc>\r
334 </sequential>\r
335 </OnDependency>\r
336 <!--\r
337 for library generation later\r
338 -->\r
339 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
340 </sequential>\r
341 </macrodef>\r
342\r
878ddf1f 343 <!--\r
344 IPF Assembly\r
345 -->\r
346 <macrodef name="Build_IPF_Assembly_Code">\r
347 <attribute name="FILEPATH"/>\r
348 <attribute name="FILENAME"/>\r
349 <attribute name="FILEEXT" default="s"/>\r
350\r
351 <element name="EXTRA.INC" optional="yes"/>\r
352 <element name="EXTRA.ARG" optional="yes"/>\r
353\r
354 <sequential>\r
22e0585c 355 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 356\r
357 <if>\r
22e0585c 358 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 359 <then>\r
22e0585c 360 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
361 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 362 <includepath path="${WORKSPACE_DIR}"/>\r
363 <includepath path="${MODULE_DIR}"/>\r
22e0585c 364 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 365 <EXTRA.INC/>\r
366 </makedeps>\r
367 </then>\r
368 </if>\r
369\r
370 <OnDependency>\r
371 <sourcefiles>\r
22e0585c 372 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 373 </sourcefiles>\r
374 <targetfiles>\r
22e0585c 375 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 376 </targetfiles>\r
377\r
378 <sequential>\r
22e0585c 379 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
380 tofile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 381 <cc userdefine="on">\r
382 <command type="CC" workdir="."> \r
383 <includepath path="${WORKSPACE_DIR}"/>\r
384 <includepath path="${MODULE_DIR}"/>\r
22e0585c 385 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 386 <EXTRA.INC/>\r
387 <argument value="${PP_FLAGS}"/>\r
22e0585c 388 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.c"/>\r
878ddf1f 389 </command>\r
390 </cc>\r
391 <move file="@{FILENAME}.@{FILEEXT}.i" \r
22e0585c 392 tofile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pro"/>\r
878ddf1f 393 \r
394 <cc userdefine="on">\r
395 <command type="ASM" includepathDelimiter="-I">\r
396 <includepath path="${WORKSPACE_DIR}"/>\r
397 <includepath path="${MODULE_DIR}"/>\r
22e0585c 398 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 399 <EXTRA.INC/>\r
400 \r
401 <argument value="${ASM_FLAGS}"/>\r
402 <EXTRA.ARG/>\r
22e0585c 403 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
404 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 405 \r
22e0585c 406 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pro"/>\r
878ddf1f 407 </command>\r
408 </cc>\r
409 </sequential>\r
410 </OnDependency>\r
411 <!--\r
412 for library generation later\r
413 -->\r
22e0585c 414 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 415 </sequential>\r
416 </macrodef>\r
417\r
418\r
419 <macrodef name="Build_IPF_PP_Code">\r
420 <attribute name="FILEPATH"/>\r
421 <attribute name="FILENAME"/>\r
422 <attribute name="FILEEXT" default="i"/>\r
423\r
424 <element name="EXTRA.INC" optional="yes"/>\r
425 <element name="EXTRA.ARG" optional="yes"/>\r
426\r
427 <sequential>\r
22e0585c 428 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 429 \r
430 <cc userdefine="on">\r
431 <command type="ASM" includepathDelimiter="-I">\r
432 <includepath path="${WORKSPACE_DIR}"/>\r
433 <includepath path="${MODULE_DIR}"/>\r
22e0585c 434 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 435 <EXTRA.INC/>\r
436 \r
437 <argument value="${ASM_FLAGS}"/>\r
438 <EXTRA.ARG/>\r
22e0585c 439 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
440 <OutputFile File="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 441 \r
22e0585c 442 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 443 </command>\r
444 </cc>\r
445 \r
446 <!--\r
447 for library generation later\r
448 -->\r
22e0585c 449 <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 450 </sequential>\r
451 </macrodef>\r
452 \r
453 <!--\r
454 [Build.Ia32.Makefile,Build.Ipf.Makefile,Build.Ebc.Makefile]\r
455 [Build.Ia32.Custom_Makefile,Build.Ipf.Custom_Makefile,Build.Ebc.Custom_Makefile]\r
456 -->\r
457 <macrodef name="Build_Custom_Build">\r
458 <attribute name="FILEPATH"/>\r
459 <attribute name="FILENAME"/>\r
460 <attribute name="FILEEXT" default="c"/>\r
461\r
462 <element name="EXTRA.INC" optional="yes"/>\r
463 <element name="EXTRA.ARG" optional="yes"/>\r
464\r
465 <sequential>\r
466\r
467 </sequential>\r
468 </macrodef>\r
469\r
470 <!--\r
471 Unicode -> .sdb\r
472 -->\r
473 <macrodef name="Build_Unicode">\r
474 <attribute name="FILEPATH"/>\r
475 <attribute name="FILENAME"/>\r
476 <attribute name="FILEEXT" default="uni"/>\r
477\r
478 <element name="EXTRA.INC" optional="yes"/>\r
479 <element name="EXTRA.ARG" optional="yes"/>\r
480\r
481 <sequential>\r
22e0585c 482 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 483\r
484 <OnDependency>\r
485 <sourcefiles>\r
22e0585c 486 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 487 </sourcefiles>\r
488 <targetfiles>\r
22e0585c 489 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 490 </targetfiles>\r
491\r
492 <sequential>\r
493 <strgather commandtype="parse" newdatabase="true">\r
22e0585c 494 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 495 <includepath path="${WORKSPACE_DIR}"/>\r
496 <includepath path="${MODULE_DIR}"/>\r
22e0585c 497 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 498 <EXTRA.INC/>\r
499 <EXTRA.ARG/>\r
22e0585c 500 <inputfile name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 501 </strgather>\r
502 </sequential>\r
503 </OnDependency>\r
504\r
22e0585c 505 <bl name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 506 </sequential>\r
507 </macrodef>\r
508\r
509 <!--\r
510 .sdb(s) -> .c, .h -> .obj\r
511 -->\r
512 <macrodef name="Build_Unicode_Database">\r
513 <attribute name="FILEPATH"/>\r
514 <attribute name="FILENAME"/>\r
515 <attribute name="FILEEXT" default="sdb"/>\r
516\r
517 <element name="EXTRA.INC" optional="yes"/>\r
518 <element name="EXTRA.ARG" optional="yes"/>\r
519\r
520 <sequential>\r
521 <OnDependency>\r
522 <sourcefiles>\r
523 <file list="${SDB_FILES}"/>\r
524 <file list="${SOURCE_FILES}"/>\r
525 </sourcefiles>\r
526 <targetfiles>\r
22e0585c 527 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 528 </targetfiles>\r
529 \r
530 <sequential>\r
22e0585c 531 <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb" verbose="read">\r
878ddf1f 532 <skipext name=".uni"/>\r
533 <skipext name=".h"/>\r
534 <database list="${SDB_FILES}"/>\r
535 <inputfile name="${SOURCE_FILES}"/>\r
536 </strgather>\r
537 </sequential>\r
538 </OnDependency>\r
539\r
540 <OnDependency>\r
541 <sourcefiles>\r
22e0585c 542 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 543 </sourcefiles>\r
544 <targetfiles>\r
22e0585c 545 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"/>\r
546 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"/>\r
547 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 548 </targetfiles>\r
549 \r
550 <sequential>\r
551 <strgather basename="@{FILENAME}Strings" commandtype="dump"\r
22e0585c 552 outputdefines="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"\r
553 outputhpk="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"\r
554 outputstring="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c">\r
555 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 556 </strgather>\r
557 </sequential>\r
558 </OnDependency>\r
559\r
560 <OnDependency>\r
561 <sourcefiles>\r
22e0585c 562 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 563 </sourcefiles>\r
564 <targetfiles>\r
22e0585c 565 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 566 </targetfiles>\r
567 \r
568 <sequential>\r
569 <cc userdefine="on">\r
570 <command type="CC" workdir="${DEST_DIR_OUTPUT}" includepathDelimiter="-I">\r
571 <includepath path="${WORKSPACE_DIR}"/>\r
572 <includepath path="${MODULE_DIR}"/>\r
22e0585c 573 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 574\r
575 <argument value="${CC_FLAGS}"/>\r
22e0585c 576 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 577\r
22e0585c 578 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 579 </command>\r
580 </cc>\r
581 </sequential>\r
582 </OnDependency>\r
583\r
22e0585c 584 <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 585 </sequential>\r
586 </macrodef>\r
587\r
588 <!--\r
589 Vfr\r
590 -->\r
591 <macrodef name="Build_Vfr">\r
592 <attribute name="FILEPATH"/>\r
593 <attribute name="FILENAME"/>\r
594 <attribute name="FILEEXT" default="vfr"/>\r
595\r
596 <element name="EXTRA.INC" optional="yes"/>\r
597 <element name="EXTRA.ARG" optional="yes"/>\r
598\r
599 <sequential>\r
600 <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>\r
601\r
602 <if>\r
22e0585c 603 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 604 <then>\r
22e0585c 605 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
606 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
607 <!-- <input file="${DEST_DIR_DEBUG}/AutoGen.h"/> -->\r
878ddf1f 608 <includepath path="${WORKSPACE_DIR}"/>\r
609 <includepath path="${MODULE_DIR}"/>\r
22e0585c 610 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 611 <EXTRA.INC/>\r
612 </makedeps>\r
613 </then>\r
614 </if>\r
615\r
616 <OnDependency>\r
617 <sourcefiles>\r
22e0585c 618 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 619 </sourcefiles>\r
620 <targetfiles>\r
22e0585c 621 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 622 </targetfiles>\r
623\r
624 <sequential>\r
22e0585c 625 <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}/@{FILEPATH}" vfrFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}">\r
878ddf1f 626 <includepath path="${WORKSPACE_DIR}"/>\r
627 <includepath path="${MODULE_DIR}"/>\r
22e0585c 628 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 629 <EXTRA.INC/>\r
630 </vfrcompile>\r
631 \r
632 <cc userdefine="on">\r
633 <command type="CC" workdir="${DEST_DIR_OUTPUT}" includepathDelimiter="-I">\r
634 <includepath path="${WORKSPACE_DIR}"/>\r
635 <includepath path="${MODULE_DIR}"/>\r
22e0585c 636 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 637 <argument value="${CC_FLAGS}"/>\r
22e0585c 638 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 639 <EXTRA.ARG/>\r
640 \r
22e0585c 641 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
878ddf1f 642 </command>\r
643 </cc>\r
644 \r
645 <delete file="@{FILENAME}.i"/>\r
646 </sequential>\r
647 </OnDependency>\r
22e0585c 648 <bl name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 649 </sequential>\r
650 </macrodef>\r
651\r
652<!--############################################################################\r
653 Build Sections\r
654#############################################################################-->\r
655 <!--\r
656 DLL\r
657 -->\r
658 <macrodef name="GenDll">\r
659 <attribute name="FILEPATH"/>\r
660 <attribute name="FILENAME"/>\r
661 <attribute name="FILEEXT"/>\r
662\r
663 <element name="LIB.ARG" optional="yes"/>\r
664 <element name="LINK.ARG" optional="yes"/>\r
665\r
666 <sequential>\r
667 <OnDependency>\r
668 <sourcefiles>\r
669 <file list="${OBJECTS}"/>\r
670 <file list="${LIBS}"/>\r
671 </sourcefiles>\r
672 <targetfiles>\r
22e0585c 673 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
878ddf1f 674 </targetfiles>\r
675\r
676 <sequential>\r
8b41e66e 677 <cc userdefine="on">\r
678 <command type="LIB">\r
679 <argument value="${LIB_FLAGS}"/>\r
680 <FileList dir="" files="${OBJECTS}"/>\r
681 <LIB.ARG/>\r
f06ffac4 682 <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib"/>\r
8b41e66e 683 </command>\r
684 </cc>\r
878ddf1f 685 <cc userdefine="on">\r
686 <command type="LINK">\r
687 <argument value="${LINK_FLAGS}"/>\r
f06ffac4 688 <libset libs="${LIBS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib"/>\r
878ddf1f 689 <LINK.ARG/>\r
878ddf1f 690 <EntryPoint value="_ModuleEntryPoint"/>\r
22e0585c 691 <map value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.map"/>\r
692 <pdb value="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pdb"/>\r
693 <OutputFile value="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
8b41e66e 694 <!-- <FileList dir="" files="${OBJECTS}"/> -->\r
878ddf1f 695 </command>\r
696 </cc>\r
697 </sequential>\r
698 </OnDependency>\r
699 </sequential>\r
700 </macrodef>\r
701\r
702 <!--\r
703 EFI\r
704 -->\r
705 <macrodef name="GenEfi">\r
706 <attribute name="FILEPATH"/>\r
707 <attribute name="FILENAME"/>\r
708 <attribute name="FILEEXT" default="dll"/>\r
709\r
710 <sequential>\r
711 <OnDependency>\r
712 <sourcefiles>\r
22e0585c 713 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 714 </sourcefiles>\r
715 <targetfiles>\r
22e0585c 716 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 717 </targetfiles>\r
718\r
719 <sequential>\r
22e0585c 720 <fwimage componenttype="${COMPONENT_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
721 peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>\r
f06ffac4 722 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />\r
878ddf1f 723 </sequential>\r
724 </OnDependency>\r
725 </sequential>\r
726 </macrodef>\r
727\r
728<!--\r
729 EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
730 EFI_SECTION_VERSION\r
731 EFI_SECTION_USER_INTERFACE\r
732 EFI_SECTION_DXE_DEPEX\r
733 EFI_SECTION_PEI_DEPEX\r
734 EFI_SECTION_PE32\r
735 EFI_SECTION_PIC\r
736 EFI_SECTION_TE\r
737 EFI_SECTION_RAW\r
738 EFI_SECTION_COMPRESSION\r
739 EFI_SECTION_GUID_DEFINED\r
740 EFI_SECTION_COMPATIBILITY16\r
741 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
742 -->\r
743 <!--\r
744 EFI_SECTION_PE32\r
745 -->\r
746 <macrodef name="EFI_SECTION_PE32">\r
747 <attribute name="FILEPATH"/>\r
748 <attribute name="FILENAME"/>\r
749 <attribute name="FILEEXT" default="" />\r
750\r
751 <element name="PRE.PROCESS" optional="yes"/>\r
752 <element name="POST.PROCESS" optional="yes"/>\r
753\r
754 <sequential>\r
755 <PRE.PROCESS/>\r
756\r
757 <if>\r
758 <not>\r
759 <equals arg1="${OBJECTS}" arg2=""/>\r
760 </not>\r
761\r
762 <then>\r
763 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
764 <LIB.ARG></LIB.ARG>\r
765 <LINK.ARG></LINK.ARG>\r
766 </GenDll>\r
767 \r
768 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
769 </then>\r
770 </if>\r
771\r
772 <OnDependency>\r
773 <sourcefiles>\r
22e0585c 774 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 775 </sourcefiles>\r
776 <targetfiles>\r
22e0585c 777 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"/>\r
878ddf1f 778 </targetfiles>\r
779\r
780 <sequential>\r
22e0585c 781 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />\r
782 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
783 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32" \r
878ddf1f 784 sectiontype="EFI_SECTION_PE32"/>\r
785 \r
786 <POST.PROCESS/>\r
787 </sequential>\r
788 </OnDependency>\r
789 </sequential>\r
790 </macrodef>\r
791\r
792 <!--\r
793 EFI_SECTION_VERSION\r
794 -->\r
795 <macrodef name="EFI_SECTION_VERSION">\r
796 <attribute name="FILEPATH"/>\r
797 <attribute name="FILENAME"/>\r
798 <attribute name="FILEEXT" default="" />\r
799 <attribute name="VERSION" default="0000"/>\r
800\r
801 <element name="PRE.PROCESS" optional="yes"/>\r
802 <element name="POST.PROCESS" optional="yes"/>\r
803\r
804 <sequential>\r
805 <if>\r
806 <not>\r
22e0585c 807 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"/>\r
878ddf1f 808 </not>\r
809\r
810 <then>\r
811 <PRE.PROCESS/>\r
22e0585c 812 <gensection outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver" \r
878ddf1f 813 versionnum="@{VERSION}"\r
814 sectiontype="EFI_SECTION_VERSION"/>\r
815 <POST.PROCESS/>\r
816 </then>\r
817 </if>\r
818 </sequential>\r
819 </macrodef>\r
820\r
821 <!--\r
822 EFI_SECTION_USER_INTERFACE\r
823 -->\r
824 <macrodef name="EFI_SECTION_USER_INTERFACE">\r
825 <attribute name="FILEPATH"/>\r
826 <attribute name="FILENAME"/>\r
827 <attribute name="FILEEXT" default="" />\r
828 <attribute name="UI" default="${BASE_NAME}"/>\r
829\r
830 <element name="PRE.PROCESS" optional="yes"/>\r
831 <element name="POST.PROCESS" optional="yes"/>\r
832\r
833 <sequential>\r
834 <if>\r
835 <not>\r
22e0585c 836 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"/>\r
878ddf1f 837 </not>\r
838\r
839 <then>\r
840 <PRE.PROCESS/>\r
841 <gensection interfacestring="@{UI}"\r
22e0585c 842 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui" \r
878ddf1f 843 sectiontype="EFI_SECTION_USER_INTERFACE"/>\r
844 <POST.PROCESS/>\r
845 </then>\r
846 </if>\r
847 </sequential>\r
848 </macrodef>\r
849\r
850 <!--\r
851 EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
852 <macrodef name="EFI_SECTION_FREEFORM_SUBTYPE_GUID">\r
853 <attribute name="FILEPATH"/>\r
854 <attribute name="FILENAME"/>\r
855 <attribute name="FILEEXT" default=""/>\r
856 \r
857 <element name="EXTRA.INC" optional="yes"/>\r
858 <element name="EXTRA.ARG" optional="yes"/>\r
859 \r
860 <sequential>\r
861 <gensection inputfile="" \r
862 outputfile="" \r
863 sectiontype="EFI_SECTION_FREEFORM_SUBTYPE_GUID"/>\r
864 </sequential>\r
865 </macrodef>\r
866 -->\r
867\r
868 <!--\r
869 EFI_SECTION_DXE_DEPEX\r
870 -->\r
871 <macrodef name="EFI_SECTION_DXE_DEPEX">\r
872 <attribute name="FILEPATH"/>\r
873 <attribute name="FILENAME"/>\r
874 <attribute name="FILEEXT" default="dxs"/>\r
875\r
876 <element name="PRE.PROCESS" optional="yes"/>\r
877 <element name="POST.PROCESS" optional="yes"/>\r
878\r
879 <sequential>\r
880 <PRE.PROCESS/>\r
881\r
882 <if>\r
22e0585c 883 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 884 <then>\r
885 <OnDependency>\r
886 <sourcefiles>\r
22e0585c 887 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 888 </sourcefiles>\r
889 <targetfiles>\r
22e0585c 890 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 891 </targetfiles>\r
892 <sequential>\r
22e0585c 893 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex" \r
894 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 895 sectiontype="EFI_SECTION_DXE_DEPEX"/>\r
896 </sequential>\r
897 </OnDependency>\r
898 </then>\r
899 <else>\r
900 <if>\r
901 <not>\r
22e0585c 902 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 903 </not>\r
904 <then>\r
22e0585c 905 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 906 </then>\r
907 </if>\r
908 </else>\r
909 </if>\r
910\r
911 <POST.PROCESS/>\r
912 </sequential>\r
913 </macrodef>\r
914\r
915 <!--\r
916 EFI_SECTION_PEI_DEPEX\r
917 -->\r
918 <macrodef name="EFI_SECTION_PEI_DEPEX">\r
919 <attribute name="FILEPATH"/>\r
920 <attribute name="FILENAME"/>\r
921 <attribute name="FILEEXT" default="dxs"/>\r
922\r
923 <element name="PRE.PROCESS" optional="yes"/>\r
924 <element name="POST.PROCESS" optional="yes"/>\r
925 <sequential>\r
926 <PRE.PROCESS/>\r
927 <if>\r
22e0585c 928 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 929 <then>\r
930 <OnDependency>\r
931 <sourcefiles>\r
22e0585c 932 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex"/>\r
878ddf1f 933 </sourcefiles>\r
934 <targetfiles>\r
22e0585c 935 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 936 </targetfiles>\r
937\r
938 <sequential>\r
22e0585c 939 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}.depex" \r
940 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 941 sectiontype="EFI_SECTION_PEI_DEPEX"/>\r
942 </sequential>\r
943 </OnDependency>\r
944 \r
945 </then>\r
946 <else>\r
947 <if>\r
948 <not>\r
22e0585c 949 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 950 </not>\r
951 <then>\r
22e0585c 952 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 953 </then>\r
954 </if>\r
955 </else>\r
956 </if>\r
957 <POST.PROCESS/>\r
958 </sequential>\r
959 </macrodef>\r
960\r
961 <!--\r
962 EFI_SECTION_PIC\r
963 <macrodef name="EFI_SECTION_PIC">\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}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
973 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 974 sectiontype="EFI_SECTION_PIC"/>\r
975 </sequential>\r
976 </macrodef>\r
977 -->\r
978\r
979 <!--\r
980 EFI_SECTION_TE\r
981 <macrodef name="EFI_SECTION_TE">\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_RAW\r
999 -->\r
1000 <macrodef name="EFI_SECTION_RAW">\r
1001 <attribute name="FILEPATH"/>\r
1002 <attribute name="FILENAME"/>\r
1003 <attribute name="FILEEXT" default="bin"/>\r
1004\r
1005 <element name="PRE.PROCESS" optional="yes"/>\r
1006 <element name="POST.PROCESS" optional="yes"/>\r
1007\r
1008 <sequential>\r
1009 <OnDependency>\r
1010 <sourcefiles>\r
22e0585c 1011 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 1012 </sourcefiles>\r
1013 <targetfiles>\r
22e0585c 1014 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
878ddf1f 1015 </targetfiles>\r
1016\r
1017 <sequential>\r
1018 <PRE.PROCESS/>\r
22e0585c 1019 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}" \r
1020 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec" \r
878ddf1f 1021 sectiontype="EFI_SECTION_RAW"/>\r
1022 <POST.PROCESS/>\r
1023 </sequential>\r
1024 </OnDependency>\r
1025 </sequential>\r
1026 </macrodef>\r
1027\r
1028 <!--\r
1029 EFI_SECTION_COMPRESSION\r
1030 <macrodef name="EFI_SECTION_COMPRESSION">\r
1031 <attribute name="FILEPATH"/>\r
1032 <attribute name="FILENAME"/>\r
1033 <attribute name="FILEEXT" default=""/>\r
1034 \r
1035 <element name="EXTRA.INC" optional="yes"/>\r
1036 <element name="EXTRA.ARG" optional="yes"/>\r
1037 \r
1038 <sequential>\r
22e0585c 1039 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
1040 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 1041 sectiontype="EFI_SECTION_PE32"/>\r
1042 </sequential>\r
1043 </macrodef>\r
1044 -->\r
1045\r
1046 <!--\r
1047 EFI_SECTION_GUID_DEFINED\r
1048 <macrodef name="EFI_SECTION_GUID_DEFINED">\r
1049 <attribute name="FILEPATH"/>\r
1050 <attribute name="FILENAME"/>\r
1051 <attribute name="FILEEXT" default=""/>\r
1052 \r
1053 <element name="EXTRA.INC" optional="yes"/>\r
1054 <element name="EXTRA.ARG" optional="yes"/>\r
1055 \r
1056 <sequential>\r
22e0585c 1057 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
1058 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 1059 sectiontype="EFI_SECTION_PE32"/>\r
1060 </sequential>\r
1061 </macrodef>\r
1062 -->\r
1063\r
1064 <!--\r
1065 EFI_SECTION_COMPATIBILITY16\r
1066 <macrodef name="EFI_SECTION_COMPATIBILITY16">\r
1067 <attribute name="FILEPATH"/>\r
1068 <attribute name="FILENAME"/>\r
1069 <attribute name="FILEEXT" default=""/>\r
1070 \r
1071 <element name="EXTRA.INC" optional="yes"/>\r
1072 <element name="EXTRA.ARG" optional="yes"/>\r
1073 \r
1074 <sequential>\r
22e0585c 1075 <gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}" \r
1076 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 1077 sectiontype="EFI_SECTION_PE32"/>\r
1078 </sequential>\r
1079 </macrodef>\r
1080 \r
1081 -->\r
1082 <!--\r
1083 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
1084 -->\r
1085 <macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">\r
1086 <attribute name="FILEPATH"/>\r
1087 <attribute name="FILENAME"/>\r
1088 <attribute name="FILEEXT" default="fv"/>\r
1089\r
1090 <element name="PRE.PROCESS" optional="yes"/>\r
1091 <element name="POST.PROCESS" optional="yes"/>\r
1092\r
1093 <sequential>\r
1094 <OnDependency>\r
1095 <sourcefiles>\r
22e0585c 1096 <file name="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 1097 </sourcefiles>\r
1098 <targetfiles>\r
22e0585c 1099 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"/>\r
878ddf1f 1100 </targetfiles>\r
1101\r
1102 <sequential>\r
1103 <PRE.PROCESS/>\r
1104 \r
22e0585c 1105 <copy file="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1106 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
878ddf1f 1107 overwrite="true"/>\r
22e0585c 1108 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1109 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec" \r
878ddf1f 1110 sectiontype="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>\r
1111 \r
1112 <POST.PROCESS/>\r
1113 </sequential>\r
1114 </OnDependency>\r
1115 </sequential>\r
1116 </macrodef>\r
1117\r
1118 <!--\r
1119 Binary\r
1120 -->\r
1121 <macrodef name="Build_Binary">\r
1122 <attribute name="FILEPATH"/>\r
1123 <attribute name="FILENAME"/>\r
1124 <attribute name="FILEEXT" default="bin"/>\r
1125\r
1126 <element name="EXTRA.INC" optional="yes"/>\r
1127 <element name="EXTRA.ARG" optional="yes"/>\r
1128\r
1129 <sequential>\r
22e0585c 1130 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1131 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 1132 </sequential>\r
1133 </macrodef>\r
1134\r
1135 <!--\r
1136 Graphics (bmp, ...)\r
1137 -->\r
1138 <macrodef name="Build_Graphics">\r
1139 <attribute name="FILEPATH"/>\r
1140 <attribute name="FILENAME"/>\r
1141 <attribute name="FILEEXT" default="bmp"/>\r
1142\r
1143 <element name="EXTRA.INC" optional="yes"/>\r
1144 <element name="EXTRA.ARG" optional="yes"/>\r
1145\r
1146 <sequential>\r
22e0585c 1147 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" /> \r
1148 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1149 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 1150 </sequential>\r
1151 </macrodef>\r
1152 <macrodef name="Build_EFI">\r
1153 <attribute name="FILEPATH"/>\r
1154 <attribute name="FILENAME"/>\r
1155 <attribute name="FILEEXT" default="efi"/>\r
1156\r
1157 <element name="EXTRA.INC" optional="yes"/>\r
1158 <element name="EXTRA.ARG" optional="yes"/>\r
1159\r
1160 <sequential>\r
22e0585c 1161 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" /> \r
1162 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
1163 tofile="${DEST_DIR_OUTPUT}/${BASE_NAME}.efi"/>\r
878ddf1f 1164 </sequential>\r
1165 </macrodef>\r
1166</project>\r