Add build macro to generate section type TE.
[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
5fc17c92 139 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_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
167 <equals arg1="@{FILEEXT}" arg2="S" />\r
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
176 <equals arg1="@{FILEEXT}" arg2="s" />\r
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
0fd9e137 213 <cc userdefine="on">\r
5fc17c92 214 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"\r
215 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
216 <EXTRA.INC.1/>\r
217 \r
0fd9e137 218 <argument value="${ASM_FLAGS}"/>\r
5fc17c92 219 <EXTRA.ARG.1/>\r
220 \r
75d0c5b1 221 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
222 </command>\r
223 </cc>\r
224 </sequential>\r
225 </OnDependency>\r
75d0c5b1 226 </sequential>\r
227 </macrodef>\r
228\r
878ddf1f 229 <!--\r
230 IPF Assembly\r
231 -->\r
232 <macrodef name="Build_IPF_Assembly_Code">\r
233 <attribute name="FILEPATH"/>\r
234 <attribute name="FILENAME"/>\r
235 <attribute name="FILEEXT" default="s"/>\r
236\r
5fc17c92 237 <element name="EXTRA.INC.1" optional="yes"/>\r
238 <element name="EXTRA.ARG.1" optional="yes"/>\r
878ddf1f 239\r
240 <sequential>\r
22e0585c 241 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 242\r
243 <if>\r
22e0585c 244 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 245 <then>\r
22e0585c 246 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
247 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
5fc17c92 248 <EXTRA.INC.1/>\r
878ddf1f 249 </makedeps>\r
250 </then>\r
251 </if>\r
252\r
253 <OnDependency>\r
254 <sourcefiles>\r
22e0585c 255 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 256 </sourcefiles>\r
257 <targetfiles>\r
22e0585c 258 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 259 </targetfiles>\r
260\r
261 <sequential>\r
878ddf1f 262 <cc userdefine="on">\r
5fc17c92 263 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}/@{FILEPATH}" family="${CC_FAMILY}">\r
264 <EXTRA.INC.1/>\r
878ddf1f 265 <argument value="${PP_FLAGS}"/>\r
0fd9e137 266 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 267 </command>\r
268 </cc>\r
5fc17c92 269 \r
878ddf1f 270 <cc userdefine="on">\r
5fc17c92 271 <command type="ASM" cmd="${ASM}" workdir="${DEST_DIR_OUTPUT}" family="${ASM_FAMILY}"\r
272 includepathDelimiter="-I" outputDelimiter="-o"\r
273 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
274 <EXTRA.INC.1/>\r
878ddf1f 275 <argument value="${ASM_FLAGS}"/>\r
5fc17c92 276 <EXTRA.ARG.1/>\r
277 <fileset casesensitive="off" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.i"/>\r
878ddf1f 278 </command>\r
279 </cc>\r
280 </sequential>\r
281 </OnDependency>\r
878ddf1f 282 </sequential>\r
283 </macrodef>\r
284\r
285\r
286 <macrodef name="Build_IPF_PP_Code">\r
287 <attribute name="FILEPATH"/>\r
288 <attribute name="FILENAME"/>\r
289 <attribute name="FILEEXT" default="i"/>\r
290\r
291 <element name="EXTRA.INC" optional="yes"/>\r
292 <element name="EXTRA.ARG" optional="yes"/>\r
293\r
294 <sequential>\r
22e0585c 295 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
5fc17c92 296 \r
878ddf1f 297 <cc userdefine="on">\r
298 <command type="ASM" includepathDelimiter="-I">\r
299 <includepath path="${WORKSPACE_DIR}"/>\r
300 <includepath path="${MODULE_DIR}"/>\r
22e0585c 301 <includepath path="${MODULE_DIR}/${ARCH}"/>\r
878ddf1f 302 <EXTRA.INC/>\r
5fc17c92 303 \r
878ddf1f 304 <argument value="${ASM_FLAGS}"/>\r
305 <EXTRA.ARG/>\r
22e0585c 306 <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
307 <OutputFile File="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
5fc17c92 308 \r
22e0585c 309 <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 310 </command>\r
311 </cc>\r
878ddf1f 312 </sequential>\r
313 </macrodef>\r
5fc17c92 314 \r
315 \r
316 <!--\r
317 Library private HashMap map = new HashMap();\r
878ddf1f 318 -->\r
5fc17c92 319 <macrodef name="Build_Library">\r
320 <attribute name="FILENAME" />\r
321 <attribute name="FILEEXT" default="obj"/>\r
322 \r
323 <sequential>\r
324 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
325 <var name="FILE_PATH" value="." />\r
326 <mkdir dir="${BIN_DIR}"/>\r
878ddf1f 327\r
5fc17c92 328 <OnDependency>\r
329 <sourcefiles>\r
330 <file list="${OBJECTS}"/>\r
331 </sourcefiles>\r
332 <targetfiles>\r
333 <file name="${BIN_DIR}/@{FILENAME}.lib"/>\r
334 </targetfiles>\r
878ddf1f 335\r
5fc17c92 336 <sequential>\r
337 <cc userdefine="on">\r
338 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"\r
339 outputFile="${BIN_DIR}/@{FILENAME}.lib">\r
340 <argument value="${SLINK_FLAGS}"/>\r
878ddf1f 341\r
5fc17c92 342 <fileset casesensitive="off" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>\r
343 </command>\r
344 </cc>\r
345 </sequential>\r
346 </OnDependency>\r
878ddf1f 347 </sequential>\r
348 </macrodef>\r
349\r
350 <!--\r
351 Unicode -> .sdb\r
352 -->\r
5fc17c92 353 <macrodef name="Build_UNI">\r
878ddf1f 354 <attribute name="FILEPATH"/>\r
355 <attribute name="FILENAME"/>\r
356 <attribute name="FILEEXT" default="uni"/>\r
357\r
358 <element name="EXTRA.INC" optional="yes"/>\r
359 <element name="EXTRA.ARG" optional="yes"/>\r
360\r
361 <sequential>\r
22e0585c 362 <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
878ddf1f 363\r
364 <OnDependency>\r
365 <sourcefiles>\r
22e0585c 366 <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 367 </sourcefiles>\r
368 <targetfiles>\r
22e0585c 369 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 370 </targetfiles>\r
371\r
372 <sequential>\r
373 <strgather commandtype="parse" newdatabase="true">\r
22e0585c 374 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 375 <EXTRA.INC/>\r
376 <EXTRA.ARG/>\r
22e0585c 377 <inputfile name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 378 </strgather>\r
379 </sequential>\r
380 </OnDependency>\r
381\r
5fc17c92 382 <var name="SDB_FILES" value="${SDB_FILES}, ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 383 </sequential>\r
384 </macrodef>\r
385\r
386 <!--\r
387 .sdb(s) -> .c, .h -> .obj\r
388 -->\r
389 <macrodef name="Build_Unicode_Database">\r
390 <attribute name="FILEPATH"/>\r
391 <attribute name="FILENAME"/>\r
392 <attribute name="FILEEXT" default="sdb"/>\r
393\r
394 <element name="EXTRA.INC" optional="yes"/>\r
395 <element name="EXTRA.ARG" optional="yes"/>\r
396\r
397 <sequential>\r
5fc17c92 398 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
399 <var name="FILE_PATH" value="@{FILEPATH}" />\r
878ddf1f 400 <OnDependency>\r
401 <sourcefiles>\r
402 <file list="${SDB_FILES}"/>\r
403 <file list="${SOURCE_FILES}"/>\r
404 </sourcefiles>\r
405 <targetfiles>\r
22e0585c 406 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 407 </targetfiles>\r
5fc17c92 408 \r
878ddf1f 409 <sequential>\r
22e0585c 410 <strgather commandtype="scan" outputdatabase="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb" verbose="read">\r
878ddf1f 411 <skipext name=".uni"/>\r
412 <skipext name=".h"/>\r
413 <database list="${SDB_FILES}"/>\r
414 <inputfile name="${SOURCE_FILES}"/>\r
415 </strgather>\r
416 </sequential>\r
417 </OnDependency>\r
418\r
419 <OnDependency>\r
420 <sourcefiles>\r
22e0585c 421 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 422 </sourcefiles>\r
423 <targetfiles>\r
22e0585c 424 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"/>\r
425 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"/>\r
426 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 427 </targetfiles>\r
5fc17c92 428 \r
878ddf1f 429 <sequential>\r
430 <strgather basename="@{FILENAME}Strings" commandtype="dump"\r
22e0585c 431 outputdefines="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}StrDefs.h"\r
432 outputhpk="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.hpk"\r
433 outputstring="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c">\r
434 <database name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
878ddf1f 435 </strgather>\r
436 </sequential>\r
437 </OnDependency>\r
438\r
439 <OnDependency>\r
440 <sourcefiles>\r
22e0585c 441 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 442 </sourcefiles>\r
443 <targetfiles>\r
22e0585c 444 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj"/>\r
878ddf1f 445 </targetfiles>\r
5fc17c92 446 \r
878ddf1f 447 <sequential>\r
448 <cc userdefine="on">\r
5fc17c92 449 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
450 includepathDelimiter="-I"\r
451 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj">\r
878ddf1f 452 <argument value="${CC_FLAGS}"/>\r
5fc17c92 453 <EXTRA.INC />\r
22e0585c 454 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}Strings.c"/>\r
878ddf1f 455 </command>\r
456 </cc>\r
457 </sequential>\r
458 </OnDependency>\r
459\r
878ddf1f 460 </sequential>\r
461 </macrodef>\r
462\r
463 <!--\r
464 Vfr\r
465 -->\r
5fc17c92 466 <macrodef name="Build_VFR">\r
878ddf1f 467 <attribute name="FILEPATH"/>\r
468 <attribute name="FILENAME"/>\r
469 <attribute name="FILEEXT" default="vfr"/>\r
470\r
471 <element name="EXTRA.INC" optional="yes"/>\r
472 <element name="EXTRA.ARG" optional="yes"/>\r
473\r
474 <sequential>\r
475 <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>\r
476\r
477 <if>\r
22e0585c 478 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 479 <then>\r
22e0585c 480 <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
481 <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 482 <EXTRA.INC/>\r
483 </makedeps>\r
484 </then>\r
485 </if>\r
486\r
487 <OnDependency>\r
488 <sourcefiles>\r
22e0585c 489 <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
878ddf1f 490 </sourcefiles>\r
491 <targetfiles>\r
22e0585c 492 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
878ddf1f 493 </targetfiles>\r
494\r
495 <sequential>\r
136adffc 496 <vfrcompile createIfrBinFile="on" createListFile="on" outPutDir="${DEST_DIR_DEBUG}/@{FILEPATH}" vfrFile="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}">\r
878ddf1f 497 <EXTRA.INC/>\r
498 </vfrcompile>\r
5fc17c92 499 \r
878ddf1f 500 <cc userdefine="on">\r
5fc17c92 501 <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" \r
502 includepathDelimiter="-I"\r
503 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" >\r
878ddf1f 504 <argument value="${CC_FLAGS}"/>\r
5fc17c92 505 <EXTRA.INC/>\r
878ddf1f 506 <EXTRA.ARG/>\r
22e0585c 507 <fileset casesensitive="off" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
878ddf1f 508 </command>\r
509 </cc>\r
5fc17c92 510 <delete file="${PLATFORM_DIR}/@{FILENAME}.i" />\r
878ddf1f 511 </sequential>\r
512 </OnDependency>\r
878ddf1f 513 </sequential>\r
514 </macrodef>\r
515\r
516<!--############################################################################\r
517 Build Sections\r
518#############################################################################-->\r
519 <!--\r
520 DLL\r
521 -->\r
522 <macrodef name="GenDll">\r
523 <attribute name="FILEPATH"/>\r
524 <attribute name="FILENAME"/>\r
525 <attribute name="FILEEXT"/>\r
526\r
527 <element name="LIB.ARG" optional="yes"/>\r
528 <element name="LINK.ARG" optional="yes"/>\r
529\r
530 <sequential>\r
5fc17c92 531 <var name="FILE_BASENAME" value="@{FILENAME}" />\r
532 <var name="FILE_PATH" value="@{FILEPATH}" />\r
878ddf1f 533 <OnDependency>\r
534 <sourcefiles>\r
5fc17c92 535 <!--fileset casesensitive="off" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj" /-->\r
878ddf1f 536 <file list="${LIBS}"/>\r
537 </sourcefiles>\r
538 <targetfiles>\r
22e0585c 539 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
878ddf1f 540 </targetfiles>\r
541\r
542 <sequential>\r
8b41e66e 543 <cc userdefine="on">\r
5fc17c92 544 <command type="SLINK" cmd="${SLINK}" family="${SLINK_FAMILY}"\r
545 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">\r
546 <argument value="${SLINK_FLAGS}"/>\r
547\r
548 <fileset casesensitive="off" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>\r
8b41e66e 549 </command>\r
550 </cc>\r
878ddf1f 551 <cc userdefine="on">\r
5fc17c92 552 <command type="DLINK" cmd="${DLINK}" family="${DLINK_FAMILY}"\r
553 outputFile="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll" >\r
554 <argument value="${DLINK_FLAGS}"/>\r
555 <libset libs="${LIBS}"/>\r
556 <libset libs="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib"/>\r
557 <libset libs="${DLINK_SPATH}" />\r
878ddf1f 558 <LINK.ARG/>\r
878ddf1f 559 </command>\r
560 </cc>\r
561 </sequential>\r
562 </OnDependency>\r
563 </sequential>\r
564 </macrodef>\r
565\r
566 <!--\r
567 EFI\r
568 -->\r
569 <macrodef name="GenEfi">\r
570 <attribute name="FILEPATH"/>\r
571 <attribute name="FILENAME"/>\r
572 <attribute name="FILEEXT" default="dll"/>\r
573\r
574 <sequential>\r
575 <OnDependency>\r
576 <sourcefiles>\r
22e0585c 577 <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 578 </sourcefiles>\r
579 <targetfiles>\r
22e0585c 580 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 581 </targetfiles>\r
582\r
583 <sequential>\r
5fc17c92 584 <!-- -->\r
585 <fwimage componentType="${MODULE_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
22e0585c 586 peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>\r
878ddf1f 587 </sequential>\r
588 </OnDependency>\r
589 </sequential>\r
590 </macrodef>\r
591\r
592<!--\r
593 EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
594 EFI_SECTION_VERSION\r
595 EFI_SECTION_USER_INTERFACE\r
596 EFI_SECTION_DXE_DEPEX\r
597 EFI_SECTION_PEI_DEPEX\r
598 EFI_SECTION_PE32\r
599 EFI_SECTION_PIC\r
600 EFI_SECTION_TE\r
601 EFI_SECTION_RAW\r
602 EFI_SECTION_COMPRESSION\r
603 EFI_SECTION_GUID_DEFINED\r
604 EFI_SECTION_COMPATIBILITY16\r
605 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
606 -->\r
607 <!--\r
608 EFI_SECTION_PE32\r
609 -->\r
610 <macrodef name="EFI_SECTION_PE32">\r
611 <attribute name="FILEPATH"/>\r
612 <attribute name="FILENAME"/>\r
613 <attribute name="FILEEXT" default="" />\r
614\r
615 <element name="PRE.PROCESS" optional="yes"/>\r
616 <element name="POST.PROCESS" optional="yes"/>\r
617\r
618 <sequential>\r
619 <PRE.PROCESS/>\r
878ddf1f 620 <if>\r
621 <not>\r
5fc17c92 622 <!-- TBD ${OBJECTS} -->\r
623 <equals arg1="${LIBS}" arg2=""/>\r
878ddf1f 624 </not>\r
625\r
626 <then>\r
627 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
628 <LIB.ARG></LIB.ARG>\r
629 <LINK.ARG></LINK.ARG>\r
630 </GenDll>\r
0fd9e137 631\r
878ddf1f 632 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
633 </then>\r
634 </if>\r
5fc17c92 635 \r
878ddf1f 636 <OnDependency>\r
637 <sourcefiles>\r
22e0585c 638 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.efi"/>\r
878ddf1f 639 </sourcefiles>\r
640 <targetfiles>\r
22e0585c 641 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32"/>\r
878ddf1f 642 </targetfiles>\r
643\r
644 <sequential>\r
22e0585c 645 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />\r
5fc17c92 646 \r
647 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
648 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.pe32" \r
878ddf1f 649 sectiontype="EFI_SECTION_PE32"/>\r
5fc17c92 650 \r
878ddf1f 651 <POST.PROCESS/>\r
652 </sequential>\r
653 </OnDependency>\r
5fc17c92 654 <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />\r
878ddf1f 655 </sequential>\r
656 </macrodef>\r
657\r
658 <!--\r
659 EFI_SECTION_VERSION\r
660 -->\r
661 <macrodef name="EFI_SECTION_VERSION">\r
662 <attribute name="FILEPATH"/>\r
663 <attribute name="FILENAME"/>\r
664 <attribute name="FILEEXT" default="" />\r
665 <attribute name="VERSION" default="0000"/>\r
666\r
667 <element name="PRE.PROCESS" optional="yes"/>\r
668 <element name="POST.PROCESS" optional="yes"/>\r
669\r
670 <sequential>\r
671 <if>\r
672 <not>\r
22e0585c 673 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver"/>\r
878ddf1f 674 </not>\r
675\r
676 <then>\r
677 <PRE.PROCESS/>\r
5fc17c92 678 <gensection outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ver" \r
878ddf1f 679 versionnum="@{VERSION}"\r
680 sectiontype="EFI_SECTION_VERSION"/>\r
681 <POST.PROCESS/>\r
682 </then>\r
683 </if>\r
684 </sequential>\r
685 </macrodef>\r
686\r
687 <!--\r
688 EFI_SECTION_USER_INTERFACE\r
689 -->\r
690 <macrodef name="EFI_SECTION_USER_INTERFACE">\r
691 <attribute name="FILEPATH"/>\r
692 <attribute name="FILENAME"/>\r
693 <attribute name="FILEEXT" default="" />\r
694 <attribute name="UI" default="${BASE_NAME}"/>\r
695\r
696 <element name="PRE.PROCESS" optional="yes"/>\r
697 <element name="POST.PROCESS" optional="yes"/>\r
698\r
699 <sequential>\r
700 <if>\r
701 <not>\r
22e0585c 702 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui"/>\r
878ddf1f 703 </not>\r
704\r
705 <then>\r
706 <PRE.PROCESS/>\r
707 <gensection interfacestring="@{UI}"\r
5fc17c92 708 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.ui" \r
878ddf1f 709 sectiontype="EFI_SECTION_USER_INTERFACE"/>\r
710 <POST.PROCESS/>\r
711 </then>\r
712 </if>\r
713 </sequential>\r
714 </macrodef>\r
715\r
716 <!--\r
717 EFI_SECTION_FREEFORM_SUBTYPE_GUID\r
718 <macrodef name="EFI_SECTION_FREEFORM_SUBTYPE_GUID">\r
719 <attribute name="FILEPATH"/>\r
720 <attribute name="FILENAME"/>\r
721 <attribute name="FILEEXT" default=""/>\r
5fc17c92 722 \r
878ddf1f 723 <element name="EXTRA.INC" optional="yes"/>\r
724 <element name="EXTRA.ARG" optional="yes"/>\r
5fc17c92 725 \r
878ddf1f 726 <sequential>\r
5fc17c92 727 <gensection inputfile="" \r
728 outputfile="" \r
878ddf1f 729 sectiontype="EFI_SECTION_FREEFORM_SUBTYPE_GUID"/>\r
730 </sequential>\r
731 </macrodef>\r
732 -->\r
733\r
734 <!--\r
735 EFI_SECTION_DXE_DEPEX\r
736 -->\r
737 <macrodef name="EFI_SECTION_DXE_DEPEX">\r
738 <attribute name="FILEPATH"/>\r
739 <attribute name="FILENAME"/>\r
740 <attribute name="FILEEXT" default="dxs"/>\r
741\r
742 <element name="PRE.PROCESS" optional="yes"/>\r
743 <element name="POST.PROCESS" optional="yes"/>\r
744\r
745 <sequential>\r
746 <PRE.PROCESS/>\r
747\r
748 <if>\r
5fc17c92 749 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 750 <then>\r
751 <OnDependency>\r
752 <sourcefiles>\r
5fc17c92 753 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 754 </sourcefiles>\r
755 <targetfiles>\r
22e0585c 756 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 757 </targetfiles>\r
758 <sequential>\r
5fc17c92 759 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex" \r
760 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 761 sectiontype="EFI_SECTION_DXE_DEPEX"/>\r
762 </sequential>\r
763 </OnDependency>\r
764 </then>\r
765 <else>\r
766 <if>\r
767 <not>\r
22e0585c 768 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 769 </not>\r
770 <then>\r
22e0585c 771 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 772 </then>\r
773 </if>\r
774 </else>\r
775 </if>\r
776\r
777 <POST.PROCESS/>\r
778 </sequential>\r
779 </macrodef>\r
780\r
781 <!--\r
782 EFI_SECTION_PEI_DEPEX\r
783 -->\r
784 <macrodef name="EFI_SECTION_PEI_DEPEX">\r
785 <attribute name="FILEPATH"/>\r
786 <attribute name="FILENAME"/>\r
787 <attribute name="FILEEXT" default="dxs"/>\r
788\r
789 <element name="PRE.PROCESS" optional="yes"/>\r
790 <element name="POST.PROCESS" optional="yes"/>\r
791 <sequential>\r
792 <PRE.PROCESS/>\r
793 <if>\r
5fc17c92 794 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 795 <then>\r
796 <OnDependency>\r
797 <sourcefiles>\r
5fc17c92 798 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.depex"/>\r
878ddf1f 799 </sourcefiles>\r
800 <targetfiles>\r
22e0585c 801 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 802 </targetfiles>\r
803\r
804 <sequential>\r
5fc17c92 805 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.depex" \r
806 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx" \r
878ddf1f 807 sectiontype="EFI_SECTION_PEI_DEPEX"/>\r
808 </sequential>\r
809 </OnDependency>\r
5fc17c92 810 \r
878ddf1f 811 </then>\r
812 <else>\r
813 <if>\r
814 <not>\r
22e0585c 815 <available type="file" file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 816 </not>\r
817 <then>\r
22e0585c 818 <touch file="${DEST_DIR_OUTPUT}/@{FILENAME}.dpx"/>\r
878ddf1f 819 </then>\r
820 </if>\r
821 </else>\r
822 </if>\r
823 <POST.PROCESS/>\r
824 </sequential>\r
825 </macrodef>\r
826\r
827 <!--\r
828 EFI_SECTION_PIC\r
829 <macrodef name="EFI_SECTION_PIC">\r
830 <attribute name="FILEPATH"/>\r
831 <attribute name="FILENAME"/>\r
832 <attribute name="FILEEXT" default=""/>\r
5fc17c92 833 \r
878ddf1f 834 <element name="EXTRA.INC" optional="yes"/>\r
835 <element name="EXTRA.ARG" optional="yes"/>\r
5fc17c92 836 \r
878ddf1f 837 <sequential>\r
5fc17c92 838 <gensection inputfile="${BIN_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
839 outputfile="${BIN_DIR}/@{FILENAME}.pe32" \r
878ddf1f 840 sectiontype="EFI_SECTION_PIC"/>\r
841 </sequential>\r
842 </macrodef>\r
843 -->\r
844\r
a2d0e909 845 <!-- \r
878ddf1f 846 EFI_SECTION_TE\r
a2d0e909 847 -->\r
848 <macrodef name="EFI_SECTION_TE">\r
849 <attribute name="FILEPATH"/>\r
850 <attribute name="FILENAME"/>\r
851 <attribute name="FILEEXT" default="" />\r
852\r
853 <element name="PRE.PROCESS" optional="yes"/>\r
854 <element name="POST.PROCESS" optional="yes"/>\r
855\r
856 <sequential>\r
857 <PRE.PROCESS/>\r
858\r
859 <if>\r
860 <not>\r
861 <!-- TBD ${OBJECTS} -->\r
862 <equals arg1="${LIBS}" arg2=""/>\r
863 </not>\r
864\r
865 <then>\r
866 <GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">\r
867 <LIB.ARG></LIB.ARG>\r
868 <LINK.ARG></LINK.ARG>\r
869 </GenDll>\r
870 \r
871 <GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>\r
872 </then>\r
873 </if>\r
874\r
875 <OnDependency>\r
876 <sourcefiles>\r
877 <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.efi"/>\r
878 </sourcefiles>\r
879 <targetfiles>\r
880 <file name="${DEST_DIR_OUTPUT}\@{FILENAME}.tes"/>\r
881 </targetfiles>\r
882\r
883 <sequential>\r
884 <copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${BIN_DIR}\@{FILENAME}.efi" />\r
885 <copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}\@{FILENAME}.efi" />\r
886 \r
887 <exec executable="${GENTEIMAGE}">\r
888 <arg line="-o ${DEST_DIR_OUTPUT}\@{FILENAME}.te ${DEST_DIR_OUTPUT}\@{FILENAME}.efi" />\r
889 </exec>\r
890 \r
891 <copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.te" tofile="${BIN_DIR}\@{FILENAME}.te" />\r
892 \r
893 <gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.te" \r
894 outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.tes" \r
895 sectiontype="EFI_SECTION_TE"/>\r
896 <POST.PROCESS/>\r
897 </sequential>\r
898 </OnDependency>\r
899 </sequential>\r
900 </macrodef>\r
901\r
878ddf1f 902\r
903 <!--\r
904 EFI_SECTION_RAW\r
905 -->\r
906 <macrodef name="EFI_SECTION_RAW">\r
907 <attribute name="FILEPATH"/>\r
908 <attribute name="FILENAME"/>\r
909 <attribute name="FILEEXT" default="bin"/>\r
910\r
911 <element name="PRE.PROCESS" optional="yes"/>\r
912 <element name="POST.PROCESS" optional="yes"/>\r
913\r
914 <sequential>\r
915 <OnDependency>\r
916 <sourcefiles>\r
22e0585c 917 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 918 </sourcefiles>\r
919 <targetfiles>\r
22e0585c 920 <file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>\r
878ddf1f 921 </targetfiles>\r
922\r
923 <sequential>\r
924 <PRE.PROCESS/>\r
5fc17c92 925 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.@{FILEEXT}" \r
926 outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec" \r
878ddf1f 927 sectiontype="EFI_SECTION_RAW"/>\r
928 <POST.PROCESS/>\r
929 </sequential>\r
930 </OnDependency>\r
931 </sequential>\r
932 </macrodef>\r
933\r
878ddf1f 934 <!--\r
935 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\r
936 -->\r
937 <macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">\r
938 <attribute name="FILEPATH"/>\r
939 <attribute name="FILENAME"/>\r
940 <attribute name="FILEEXT" default="fv"/>\r
941\r
942 <element name="PRE.PROCESS" optional="yes"/>\r
943 <element name="POST.PROCESS" optional="yes"/>\r
944\r
945 <sequential>\r
946 <OnDependency>\r
947 <sourcefiles>\r
22e0585c 948 <file name="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
878ddf1f 949 </sourcefiles>\r
950 <targetfiles>\r
22e0585c 951 <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec"/>\r
878ddf1f 952 </targetfiles>\r
953\r
954 <sequential>\r
955 <PRE.PROCESS/>\r
5fc17c92 956 \r
957 <copy file="${FV_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
958 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
878ddf1f 959 overwrite="true"/>\r
5fc17c92 960 <gensection inputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
961 outputfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}fv.sec" \r
878ddf1f 962 sectiontype="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>\r
5fc17c92 963 \r
878ddf1f 964 <POST.PROCESS/>\r
965 </sequential>\r
966 </OnDependency>\r
967 </sequential>\r
968 </macrodef>\r
969\r
970 <!--\r
971 Binary\r
972 -->\r
973 <macrodef name="Build_Binary">\r
974 <attribute name="FILEPATH"/>\r
975 <attribute name="FILENAME"/>\r
976 <attribute name="FILEEXT" default="bin"/>\r
977\r
978 <element name="EXTRA.INC" optional="yes"/>\r
979 <element name="EXTRA.ARG" optional="yes"/>\r
980\r
981 <sequential>\r
5fc17c92 982 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 983 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 984 </sequential>\r
985 </macrodef>\r
986\r
987 <!--\r
988 Graphics (bmp, ...)\r
989 -->\r
990 <macrodef name="Build_Graphics">\r
991 <attribute name="FILEPATH"/>\r
992 <attribute name="FILENAME"/>\r
993 <attribute name="FILEEXT" default="bmp"/>\r
994\r
995 <element name="EXTRA.INC" optional="yes"/>\r
996 <element name="EXTRA.ARG" optional="yes"/>\r
997\r
998 <sequential>\r
5fc17c92 999 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" /> \r
1000 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 1001 tofile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.bin"/>\r
878ddf1f 1002 </sequential>\r
5fc17c92 1003 </macrodef> \r
878ddf1f 1004 <macrodef name="Build_EFI">\r
1005 <attribute name="FILEPATH"/>\r
1006 <attribute name="FILENAME"/>\r
1007 <attribute name="FILEEXT" default="efi"/>\r
1008\r
1009 <element name="EXTRA.INC" optional="yes"/>\r
1010 <element name="EXTRA.ARG" optional="yes"/>\r
1011\r
1012 <sequential>\r
5fc17c92 1013 <mkdir dir="${MODULE_DIR}/@{FILEPATH}" /> \r
1014 <copy file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" \r
22e0585c 1015 tofile="${DEST_DIR_OUTPUT}/${BASE_NAME}.efi"/>\r
878ddf1f 1016 </sequential>\r
1017 </macrodef>\r
1018</project>\r