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