BaseTools: Modify gcc 4.8 and 4.9 tool chain definition to support building from...
[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
135 <Command.ARMGCC, Command.ARMLINUXGCC, command.XCODE>
136 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
137
138 [C-Code-File.COMMON.IPF]
139 <InputFile>
140 ?.c
141 ?.C
142 ?.cc
143 ?.CC
144 ?.cpp
145 ?.Cpp
146 ?.CPP
147
148 <ExtraDependency>
149 $(MAKE_FILE)
150
151 <OutputFile>
152 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
153
154 <Command.MSFT, Command.INTEL>
155 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
156
157 <Command.GCC, Command.RVCT>
158 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
159 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
160 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
161
162 [C-Header-File]
163 <InputFile>
164 *.h, *.H
165
166 <OutputFile>
167
168 <Command>
169
170
171 [Assembly-Code-File.COMMON.COMMON]
172 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
173 ?.asm, ?.Asm, ?.ASM
174
175 <InputFile.GCC>
176 ?.S, ?.s
177
178 <ExtraDependency>
179 $(MAKE_FILE)
180
181 <OutputFile>
182 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
183
184 <Command.MSFT, Command.INTEL>
185 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
186 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
187 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
188
189 <Command.GCC, Command.RVCT>
190 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
191 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
192 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
193 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
194
195 [Nasm-Assembly-Code-File.COMMON.COMMON]
196 <InputFile>
197 ?.nasm, ?.Nasm, ?.NASM
198
199 <ExtraDependency>
200 $(MAKE_FILE)
201
202 <OutputFile>
203 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
204
205 <Command>
206 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
207 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
208 "$(NASM)" -I${s_path}(+) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
209
210 [Assembly-Code-File.COMMON.IPF]
211 <InputFile>
212 ?.s
213
214 <ExtraDependency>
215 $(MAKE_FILE)
216
217 <OutputFile>
218 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
219
220 <Command.MSFT, Command.INTEL>
221 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
222 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
223 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
224 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii
225
226 [Visual-Form-Representation-File]
227 <InputFile>
228 ?.vfr
229 ?.Vfr
230 ?.VFR
231
232 <ExtraDependency>
233 $(MAKE_FILE)
234
235 <OutputFile>
236 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
237
238 <Command>
239 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
240 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
241
242 [Object-File]
243 <InputFile>
244 *.obj
245 *.o
246
247 <OutputFile>
248 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
249
250 <Command.MSFT, Command.INTEL>
251 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
252
253 <Command.GCC>
254 "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
255
256 <Command.RVCT>
257 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
258
259 <Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC>
260 # $(OBJECT_FILES_LIST) has wrong paths for cygwin
261 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
262
263 <Command.XCODE>
264 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
265
266 [Static-Library-File]
267 <InputFile>
268 *.lib
269
270 <ExtraDependency>
271 $(MAKE_FILE)
272
273 <OutputFile>
274 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
275
276 <Command.MSFT, Command.INTEL>
277 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
278
279 <Command.GCC>
280 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
281 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
282
283 <Command.ARMGCC, Command.ARMLINUXGCC>
284 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)
285
286 <Command.RVCT>
287 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
288
289 <Command.RVCTCYGWIN>
290 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
291 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
292
293 <Command.XCODE>
294 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
295
296
297 [Static-Library-File.USER_DEFINED]
298 <InputFile>
299 *.lib
300
301 <ExtraDependency>
302 $(MAKE_FILE)
303
304 <OutputFile>
305 $(DEBUG_DIR)(+)$(MODULE_NAME)
306
307 <Command.MSFT, Command.INTEL>
308 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
309
310 <Command.GCC>
311 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
312
313 <Command.ARMGCC, Command.ARMLINUXGCC>
314 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)
315
316 <Command.RVCT>
317 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
318
319 <Command.RVCTCYGWIN>
320 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin
321 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
322
323 <Command.XCODE>
324 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
325
326
327 [Dynamic-Library-File]
328 <InputFile>
329 ?.dll
330
331 <OutputFile>
332 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
333
334 <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
335 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
336 $(CP) ${dst} $(OUTPUT_DIR)
337 $(CP) ${dst} $(BIN_DIR)
338 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
339 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
340 <Command.GCC>
341 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
342 $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}
343
344 #
345 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
346 #
347 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
348 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
349
350 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
351 $(CP) ${dst} $(OUTPUT_DIR)
352 $(CP) ${dst} $(BIN_DIR)
353 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
354
355 <Command.XCODE>
356 # tool to convert Mach-O to PE/COFF
357 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
358 # create symbol file for GDB debug
359 -$(DSYMUTIL) ${src}
360 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
361 $(CP) ${dst} $(OUTPUT_DIR)
362 $(CP) ${dst} $(BIN_DIR)
363 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
364
365 [Dependency-Expression-File]
366 <InputFile>
367 ?.dxs, ?.Dxs, ?.DXS
368
369 <OutputFile>
370 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
371
372 <ExtraDependency>
373 $(MAKE_FILE)
374
375 <Command>
376 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
377 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
378 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
379
380 [Acpi-Source-Language-File]
381 <InputFile>
382 ?.asl, ?.Asl, ?.ASL
383
384 <OutputFile>
385 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
386
387 <ExtraDependency>
388 $(MAKE_FILE)
389
390 <Command.MSFT, Command.INTEL>
391 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
392 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
393 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
394 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
395
396 <Command.GCC>
397 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
398 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
399 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
400 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
401
402 [C-Code-File.AcpiTable]
403 <InputFile>
404 ?.c
405
406 <OutputFile>
407 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
408
409 <ExtraDependency>
410 $(MAKE_FILE)
411
412 <Command.MSFT, Command.INTEL>
413 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
414 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
415 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
416
417 <Command.GCC>
418 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
419 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
420 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
421
422 [Acpi-Table-Code-File]
423 <InputFile>
424 ?.aslc, ?.act
425
426 <OutputFile>
427 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
428
429 <ExtraDependency>
430 $(MAKE_FILE)
431
432 <Command.MSFT, Command.INTEL>
433 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
434 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
435 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
436
437 <Command.GCC>
438 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
439 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
440 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
441
442 <Command.XCODE>
443 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
444 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
445 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
446 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)
447
448
449 [Masm16-Code-File]
450 <InputFile>
451 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
452
453 <ExtraDependency>
454 $(MAKE_FILE)
455
456 <OutputFile>
457 $(OUTPUT_DIR)(+)${s_base}.com
458
459 <Command.MSFT, Command.INTEL>
460 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
461 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
462 cd $(OUTPUT_DIR)(+)${s_dir}
463 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
464 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
465
466 <Command.GCC>
467 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
468 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
469 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
470 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
471
472 <Command.XCODE>
473 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
474 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
475 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
476 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
477 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
478
479
480 [Nasm-to-Binary-Code-File]
481 <InputFile>
482 ?.nasmb, ?.NASMB
483
484 <ExtraDependency>
485 $(MAKE_FILE)
486
487 <OutputFile>
488 $(OUTPUT_DIR)(+)${s_base}.bin
489
490 <Command>
491 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
492 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
493 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
494
495
496 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
497 <InputFile>
498 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
499
500 <OutputFile>
501 $(OUTPUT_DIR)(+)${s_base}.mcb
502
503 <Command>
504 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
505
506 [Microcode-Binary-File]
507 <InputFile>
508 *.mcb
509
510 <ExtraDependency>
511 $(MAKE_FILE)
512
513 <OutputFile>
514 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
515
516 <Command>
517 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
518 -$(CP) ${dst} $(BIN_DIR)
519
520 [EFI-Image-File]
521 <InputFile>
522 ?.efi, ?.Efi, ?.EFI
523
524 <OutputFile>
525
526 <Command>
527
528 [Unicode-Text-File]
529 <InputFile>
530 *.uni, *.Uni, *.UNI
531
532 <OutputFile>
533 $(DEBUG_DIR)(+)AutoGen.c
534 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
535 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
536
537 <Command>
538
539 [Efi-Image.UEFI_OPTIONROM]
540 <InputFile>
541 ?.efi, ?.EFI, ?.Efi
542
543 <OutputFile>
544 $(BIN_DIR)(+)$(MODULE_NAME).rom
545
546 <Command>
547 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
548
549 [Unicode-Text-File.UEFI_HII]
550 <InputFile>
551 *.uni, *.Uni, *.UNI
552
553 <OutputFile>
554 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
555 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
556
557 <Command>
558
559 [Visual-Form-Representation-File.UEFI_HII]
560 <InputFile>
561 ?.vfr
562 ?.Vfr
563 ?.VFR
564
565 <ExtraDependency>
566 $(MAKE_FILE)
567
568 <OutputFile>
569 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
570
571 <Command>
572 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
573 "$(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
574
575 [Hii-Binary-Package.UEFI_HII]
576 <InputFile>
577 *.hpk
578
579 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>
580 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
581
582 <OutputFile.XCODE, OutputFile.RVCT, OutputFile.ARMGCC>
583 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
584
585 <Command.MSFT, Command.INTEL>
586 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
587 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
588
589 <Command.GCC>
590 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
591 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
592
593 <Command.XCODE, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
594 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
595
596