496fd666b19489ab824a50dabd66d9e2c5d0c019
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
1 #
2 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
3 # Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
4 # This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
8
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 #
12
13 ## Syntax
14 #
15 # "*" is used to indicate that the source files will be processed at the same time.
16 # "?" is used to indicate that the source files will be processed one by one.
17 #
18 # "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
19 # <InputFile[.<ToolChainFamily>]> <EOL>
20 # (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
21 #
22 # <OutputFile[.<ToolChainFamily>]> <EOL>
23 # <FileFullPath>
24 #
25 # <ExtraDependency>
26 # <FileFullPath>
27 #
28 # <Command[.<ToolChainFamily>]> <EOL>
29 # <Command1>
30 # [<Command2>]
31 #
32 # <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK.
33 # Missing <InputFile> will cause an exception and break build.
34 # Missing <Command> will cause that related build target won't be generated but
35 # won't break build.
36 #
37
38 ## Placeholders for string substitution
39 #
40 # ${src} Source file(s) to be built (full path)
41 # ${s_path} Source file directory (absolute path)
42 # ${s_dir} Source file relative directory within a module
43 # (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
44 # ${s_name} Source file name without path
45 # ${s_base} Source file name without extension and path
46 # ${s_ext} Source file extension
47 #
48 # ${dst} Destination file(s) built from ${src} (full path)
49 # ${d_path} Destination file directory (absolute path)
50 # ${d_name} Destination file name without path
51 # ${d_base} Destination file name without extension and path
52 # ${d_ext} Destination file extension
53 #
54 # (+) Directory separator
55 #
56
57 ## Macro
58 # $(WORKSPACE) Workspace directory
59 # $(OUTPUT_DIR) Directory for intermediate files for building a module
60 # $(DEBUG_DIR) Directory for files used to debug a module
61 # $(BUILD_DIR) All files for building a platform will be put in this directory
62 # $(BIN_DIR) Common directory for executable files
63 # $(FV_DIR) Directory to store flash image files
64 # $(INC) Search path of current module
65 # $(INC_LIST) A file containing search pathes of current module
66 # $(LIBS) Static library files of current module
67 # $(<tool>_FLAGS) Tools flags of current module
68 # $(MODULE_NAME) Current module name
69 # $(MODULE_TYPE) Current module type
70 # $(MODULE_GUID) Current module guid
71 # $(ARCH) Architecture of current module
72 # $(TOOLCHAIN) Toolchain used to build current module
73 # $(TARGET) Target of current module (DEBUG/RELEASE)
74 # $(<tool>) Path of tool
75 # $(EDK_TOOLS_PATH) Path of build tools
76 # $(<FILE_TYPES>) File list of each file type
77 # (Note: The macro name is derived from file type name. For example,
78 # C-Code-File will have C_CODE_FILES macro.)
79 # $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
80 # (
81 # Note: The macro and file name are derived from file type name.
82 # For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
83 # to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
84 # will be generated only when this macro is used in command line.
85 # This is intended to get over the long command line limitation.
86 # )
87 #
88 # $(CP) copy command
89 # $(MV) move command
90 # $(RM) delete command
91 # $(MD) create dir command
92 # $(RD) remove dir command
93 #
94
95 ## Reserved File-Type
96 #
97 # Don't change following names of file types and their associated files,
98 # which are also used in tools' code
99 #
100 # C-Code-File
101 # C-Header-File
102 # Dynamic-Library-File
103 # Static-Library-File
104 # Visual-Form-Representation-File
105 # Unicode-Text-File
106 #
107
108 ## Build Rule Version Number
109 # build_rule_version=0.1
110 #
111
112 [C-Code-File]
113 <InputFile>
114 ?.c
115 ?.C
116 ?.cc
117 ?.CC
118 ?.cpp
119 ?.Cpp
120 ?.CPP
121
122 <ExtraDependency>
123 $(MAKE_FILE)
124
125 <OutputFile>
126 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
127
128 <Command.MSFT, Command.INTEL>
129 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
130
131 <Command.GCC, Command.RVCT>
132 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
133 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
134 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
135
136 <Command.ARMGCC, Command.ARMLINUXGCC, command.XCODE>
137 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
138
139
140 [C-Header-File]
141 <InputFile>
142 *.h, *.H
143
144 <OutputFile>
145
146 <Command>
147
148
149 [Assembly-Code-File.COMMON.COMMON]
150 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
151 ?.asm, ?.Asm, ?.ASM
152
153 <InputFile.GCC>
154 ?.S, ?.s
155
156 <ExtraDependency>
157 $(MAKE_FILE)
158
159 <OutputFile>
160 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
161
162 <Command.MSFT, Command.INTEL>
163 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
164 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
165 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
166
167 <Command.GCC, Command.RVCT>
168 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
169 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
170 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
171 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
172
173 [Nasm-Assembly-Code-File.COMMON.COMMON]
174 <InputFile>
175 ?.nasm, ?.Nasm, ?.NASM
176
177 <ExtraDependency>
178 $(MAKE_FILE)
179
180 <OutputFile>
181 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
182
183 <Command>
184 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
185 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
186 "$(NASM)" -I${s_path}(+) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
187
188 [Assembly-Code-File.COMMON.IPF]
189 <InputFile>
190 ?.s
191
192 <ExtraDependency>
193 $(MAKE_FILE)
194
195 <OutputFile>
196 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
197
198 <Command.MSFT, Command.INTEL>
199 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
200 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
201 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
202 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii
203
204 [Visual-Form-Representation-File]
205 <InputFile>
206 ?.vfr
207 ?.Vfr
208 ?.VFR
209
210 <ExtraDependency>
211 $(MAKE_FILE)
212
213 <OutputFile>
214 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
215
216 <Command>
217 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
218 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
219
220 [Object-File]
221 <InputFile>
222 *.obj
223 *.o
224
225 <OutputFile>
226 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
227
228 <Command.MSFT, Command.INTEL>
229 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
230
231 <Command.GCC>
232 "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
233
234 <Command.RVCT>
235 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
236
237 <Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC>
238 # $(OBJECT_FILES_LIST) has wrong paths for cygwin
239 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
240
241 <Command.XCODE>
242 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
243
244 [Static-Library-File]
245 <InputFile>
246 *.lib
247
248 <ExtraDependency>
249 $(MAKE_FILE)
250
251 <OutputFile>
252 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
253
254 <Command.MSFT, Command.INTEL>
255 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
256
257 <Command.GCC>
258 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
259 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
260
261 <Command.ARMGCC, Command.ARMLINUXGCC>
262 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)
263
264 <Command.RVCT>
265 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
266
267 <Command.RVCTCYGWIN>
268 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
269 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
270
271 <Command.XCODE>
272 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
273
274
275 [Static-Library-File.USER_DEFINED]
276 <InputFile>
277 *.lib
278
279 <ExtraDependency>
280 $(MAKE_FILE)
281
282 <OutputFile>
283 $(DEBUG_DIR)(+)$(MODULE_NAME)
284
285 <Command.MSFT, Command.INTEL>
286 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
287
288 <Command.GCC>
289 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
290
291 <Command.ARMGCC, Command.ARMLINUXGCC>
292 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)
293
294 <Command.RVCT>
295 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
296
297 <Command.RVCTCYGWIN>
298 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin
299 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
300
301 <Command.XCODE>
302 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
303
304
305 [Dynamic-Library-File]
306 <InputFile>
307 ?.dll
308
309 <OutputFile>
310 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
311
312 <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
313 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
314 $(CP) ${dst} $(OUTPUT_DIR)
315 $(CP) ${dst} $(BIN_DIR)
316 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
317 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
318 <Command.GCC>
319 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
320 $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}
321
322 #
323 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
324 #
325 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
326 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
327
328 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
329 $(CP) ${dst} $(OUTPUT_DIR)
330 $(CP) ${dst} $(BIN_DIR)
331 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
332
333 <Command.XCODE>
334 # tool to convert Mach-O to PE/COFF
335 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
336 # create symbol file for GDB debug
337 -$(DSYMUTIL) ${src}
338 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
339 $(CP) ${dst} $(OUTPUT_DIR)
340 $(CP) ${dst} $(BIN_DIR)
341 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
342
343 [Dependency-Expression-File]
344 <InputFile>
345 ?.dxs, ?.Dxs, ?.DXS
346
347 <OutputFile>
348 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
349
350 <ExtraDependency>
351 $(MAKE_FILE)
352
353 <Command>
354 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
355 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
356 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
357
358 [Acpi-Source-Language-File]
359 <InputFile>
360 ?.asl, ?.Asl, ?.ASL
361
362 <OutputFile>
363 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
364
365 <ExtraDependency>
366 $(MAKE_FILE)
367
368 <Command.MSFT, Command.INTEL>
369 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
370 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
371 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
372 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
373
374 <Command.GCC>
375 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
376 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
377 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
378 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
379
380 [C-Code-File.AcpiTable]
381 <InputFile>
382 ?.c
383
384 <OutputFile>
385 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
386
387 <ExtraDependency>
388 $(MAKE_FILE)
389
390 <Command.MSFT, Command.INTEL>
391 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
392 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
393 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
394
395 <Command.GCC>
396 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
397 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
398 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
399
400 [Acpi-Table-Code-File]
401 <InputFile>
402 ?.aslc, ?.act
403
404 <OutputFile>
405 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
406
407 <ExtraDependency>
408 $(MAKE_FILE)
409
410 <Command.MSFT, Command.INTEL>
411 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
412 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
413 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
414
415 <Command.GCC>
416 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
417 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
418 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
419
420 <Command.XCODE>
421 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
422 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
423 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
424 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)
425
426
427 [Masm16-Code-File]
428 <InputFile>
429 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
430
431 <ExtraDependency>
432 $(MAKE_FILE)
433
434 <OutputFile>
435 $(OUTPUT_DIR)(+)${s_base}.com
436
437 <Command.MSFT, Command.INTEL>
438 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
439 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
440 cd $(OUTPUT_DIR)(+)${s_dir}
441 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
442 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
443
444 <Command.GCC>
445 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
446 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
447 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
448 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
449
450 <Command.XCODE>
451 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
452 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
453 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
454 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
455 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
456
457
458 [Nasm-to-Binary-Code-File]
459 <InputFile>
460 ?.nasmb, ?.NASMB
461
462 <ExtraDependency>
463 $(MAKE_FILE)
464
465 <OutputFile>
466 $(OUTPUT_DIR)(+)${s_base}.bin
467
468 <Command>
469 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
470 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
471 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
472
473
474 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
475 <InputFile>
476 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
477
478 <OutputFile>
479 $(OUTPUT_DIR)(+)${s_base}.mcb
480
481 <Command>
482 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
483
484 [Microcode-Binary-File]
485 <InputFile>
486 *.mcb
487
488 <ExtraDependency>
489 $(MAKE_FILE)
490
491 <OutputFile>
492 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
493
494 <Command>
495 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
496 -$(CP) ${dst} $(BIN_DIR)
497
498 [EFI-Image-File]
499 <InputFile>
500 ?.efi, ?.Efi, ?.EFI
501
502 <OutputFile>
503
504 <Command>
505
506 [Unicode-Text-File]
507 <InputFile>
508 *.uni, *.Uni, *.UNI
509
510 <OutputFile>
511 $(DEBUG_DIR)(+)AutoGen.c
512 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
513 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
514
515 <Command>
516
517 [Efi-Image.UEFI_OPTIONROM]
518 <InputFile>
519 ?.efi, ?.EFI, ?.Efi
520
521 <OutputFile>
522 $(BIN_DIR)(+)$(MODULE_NAME).rom
523
524 <Command>
525 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
526
527 [Unicode-Text-File.UEFI_HII]
528 <InputFile>
529 *.uni, *.Uni, *.UNI
530
531 <OutputFile>
532 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
533 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
534
535 <Command>
536
537 [Visual-Form-Representation-File.UEFI_HII]
538 <InputFile>
539 ?.vfr
540 ?.Vfr
541 ?.VFR
542
543 <ExtraDependency>
544 $(MAKE_FILE)
545
546 <OutputFile>
547 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
548
549 <Command>
550 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
551 "$(VFR)" $(VFR_FLAGS) --create-ifr-package --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory $(OUTPUT_DIR)(+)${s_dir} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
552
553 [Hii-Binary-Package.UEFI_HII]
554 <InputFile>
555 *.hpk
556
557 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>
558 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
559
560 <OutputFile.XCODE, OutputFile.RVCT, OutputFile.ARMGCC>
561 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
562
563 <Command.MSFT, Command.INTEL>
564 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
565 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
566
567 <Command.GCC>
568 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
569 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
570
571 <Command.XCODE, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
572 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
573
574