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