blob: bb89ef033961c97b07fd4b3e8babd04865f6ea91 [file] [log] [blame]
Channagoud Kadabi934c4362016-01-22 12:10:11 -08001#
2# Copyright (c) 2007 - 2015, 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
Prathyush Katukojwalaeec0cc62017-08-23 12:00:14 -070059# $(WRAPPER) Optional wrapper script to call CC
Channagoud Kadabi934c4362016-01-22 12:10:11 -080060# $(OUTPUT_DIR) Directory for intermediate files for building a module
61# $(DEBUG_DIR) Directory for files used to debug a module
62# $(BUILD_DIR) All files for building a platform will be put in this directory
63# $(BIN_DIR) Common directory for executable files
64# $(FV_DIR) Directory to store flash image files
65# $(INC) Search path of current module
66# $(INC_LIST) A file containing search pathes of current module
67# $(LIBS) Static library files of current module
68# $(<tool>_FLAGS) Tools flags of current module
69# $(MODULE_NAME) Current module name
70# $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
71# in different modules, otherwise its value is same as $(MODULE_NAME)
72# $(MODULE_TYPE) Current module type
73# $(MODULE_GUID) Current module guid
74# $(ARCH) Architecture of current module
75# $(TOOLCHAIN) Toolchain used to build current module
76# $(TARGET) Target of current module (DEBUG/RELEASE)
77# $(<tool>) Path of tool
78# $(EDK_TOOLS_PATH) Path of build tools
79# $(<FILE_TYPES>) File list of each file type
80# (Note: The macro name is derived from file type name. For example,
81# C-Code-File will have C_CODE_FILES macro.)
82# $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
83# (
84# Note: The macro and file name are derived from file type name.
85# For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
86# to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
87# will be generated only when this macro is used in command line.
88# This is intended to get over the long command line limitation.
89# )
90#
91# $(CP) copy command
92# $(MV) move command
93# $(RM) delete command
94# $(MD) create dir command
95# $(RD) remove dir command
96#
97
98## Reserved File-Type
99#
100# Don't change following names of file types and their associated files,
101# which are also used in tools' code
102#
103# C-Code-File
104# C-Header-File
105# Dynamic-Library-File
106# Static-Library-File
107# Visual-Form-Representation-File
108# Unicode-Text-File
109#
110
111## Build Rule Version Number
112# build_rule_version=0.1
113#
114
115[C-Code-File]
116 <InputFile>
117 ?.c
118 ?.C
119 ?.cc
120 ?.CC
121 ?.cpp
122 ?.Cpp
123 ?.CPP
124
125 <ExtraDependency>
126 $(MAKE_FILE)
127
128 <OutputFile>
129 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
130
131 <Command.MSFT, Command.INTEL>
132 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
133
134 <Command.GCC, Command.RVCT>
135 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
Maria Yu70529a22017-07-28 15:23:18 +0800136 $(if $(wildcard $(CHECK)) , "$(CHECK)" $(INC) ${src})
Prathyush Katukojwalaeec0cc62017-08-23 12:00:14 -0700137 $(WRAPPER) "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
Channagoud Kadabi934c4362016-01-22 12:10:11 -0800138
139 <Command.XCODE>
140 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
141
142[C-Code-File.COMMON.IPF]
143 <InputFile>
144 ?.c
145 ?.C
146 ?.cc
147 ?.CC
148 ?.cpp
149 ?.Cpp
150 ?.CPP
151
152 <ExtraDependency>
153 $(MAKE_FILE)
154
155 <OutputFile>
156 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
157
158 <Command.MSFT, Command.INTEL>
159 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
160
161 <Command.GCC, Command.RVCT>
162 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
163 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
164 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
165
166[C-Header-File]
167 <InputFile>
168 *.h, *.H
169
170 <OutputFile>
171
172 <Command>
173
174
175[Assembly-Code-File.COMMON.COMMON]
176 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
177 ?.asm, ?.Asm, ?.ASM
178
179 <InputFile.GCC>
180 ?.S, ?.s
181
182 <ExtraDependency>
183 $(MAKE_FILE)
184
185 <OutputFile>
186 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
187
188 <Command.MSFT, Command.INTEL>
189 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
190 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
191 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
192
193 <Command.GCC, Command.RVCT>
194 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
195 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
196 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
197 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
198
199[Nasm-Assembly-Code-File.COMMON.COMMON]
200 <InputFile>
201 ?.nasm
202
203 <ExtraDependency>
204 $(MAKE_FILE)
205
206 <OutputFile>
207 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
208
209 <Command>
210 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
211 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
212 "$(NASM)" -I${s_path}(+) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
213
214[Assembly-Code-File.COMMON.IPF]
215 <InputFile>
216 ?.s
217
218 <ExtraDependency>
219 $(MAKE_FILE)
220
221 <OutputFile>
222 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
223
224 <Command.MSFT, Command.INTEL>
225 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
226 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
227 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
228 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii
229
230[Visual-Form-Representation-File]
231 <InputFile>
232 ?.vfr
233 ?.Vfr
234 ?.VFR
235
236 <ExtraDependency>
237 $(MAKE_FILE)
238
239 <OutputFile>
240 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
241
242 <Command>
243 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
244 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
245
246[Object-File]
247 <InputFile>
248 *.obj
249 *.o
250
251 <OutputFile>
252 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
253
254 <Command.MSFT, Command.INTEL>
255 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
256
257 <Command.GCC>
258 "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
259
260 <Command.RVCT>
261 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
262
263 <Command.RVCTCYGWIN>
264 # $(OBJECT_FILES_LIST) has wrong paths for cygwin
265 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
266
267 <Command.XCODE>
268 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
269
270[Static-Library-File]
271 <InputFile>
272 *.lib
273
274 <ExtraDependency>
275 $(MAKE_FILE)
276
277 <OutputFile>
278 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
279
280 <Command.MSFT, Command.INTEL>
281 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
282
283 <Command.GCC>
284 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
285 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
286
287 <Command.RVCT>
288 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
289
290 <Command.RVCTCYGWIN>
291 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
292 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
293
294 <Command.XCODE>
295 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
296
297
298[Static-Library-File.USER_DEFINED]
299 <InputFile>
300 *.lib
301
302 <ExtraDependency>
303 $(MAKE_FILE)
304
305 <OutputFile>
306 $(DEBUG_DIR)(+)$(MODULE_NAME)
307
308 <Command.MSFT, Command.INTEL>
309 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
310
311 <Command.GCC>
312 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
313
314 <Command.RVCT>
315 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
316
317 <Command.RVCTCYGWIN>
318 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin
319 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
320
321 <Command.XCODE>
322 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
323
324
325[Dynamic-Library-File]
326 <InputFile>
327 ?.dll
328
329 <OutputFile>
330 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
331
332 <Command.MSFT, Command.INTEL, Command.RVCT>
333 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
334 $(CP) ${dst} $(OUTPUT_DIR)
335 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
336 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
337 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
338 <Command.GCC>
339 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
340 $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}
341
342 #
343 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
344 #
345 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
346 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
347
348 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
349 $(CP) ${dst} $(OUTPUT_DIR)
350 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
351 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
352
353 <Command.XCODE>
354 # tool to convert Mach-O to PE/COFF
355 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
356 # create symbol file for GDB debug
357 -$(DSYMUTIL) ${src}
358 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
359 $(CP) ${dst} $(OUTPUT_DIR)
360 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
361 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
362
363[Dependency-Expression-File]
364 <InputFile>
365 ?.dxs, ?.Dxs, ?.DXS
366
367 <OutputFile>
368 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
369
370 <ExtraDependency>
371 $(MAKE_FILE)
372
373 <Command>
374 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
375 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
376 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
377
378[Acpi-Source-Language-File]
379 <InputFile>
380 ?.asl, ?.Asl, ?.ASL
381
382 <OutputFile>
383 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
384
385 <ExtraDependency>
386 $(MAKE_FILE)
387
388 <Command.MSFT, Command.INTEL>
389 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
390 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
391 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
392 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
393
394 <Command.GCC>
395 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
396 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
397 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
398 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
399
400[C-Code-File.AcpiTable]
401 <InputFile>
402 ?.c
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[Acpi-Table-Code-File]
421 <InputFile>
422 ?.aslc, ?.act
423
424 <OutputFile>
425 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
426
427 <ExtraDependency>
428 $(MAKE_FILE)
429
430 <Command.MSFT, Command.INTEL>
431 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
432 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
433 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
434
435 <Command.GCC>
436 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
437 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
438 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
439
440 <Command.XCODE>
441 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
442 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
443 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
444 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)
445
446
447[Masm16-Code-File]
448 <InputFile>
449 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
450
451 <ExtraDependency>
452 $(MAKE_FILE)
453
454 <OutputFile>
455 $(OUTPUT_DIR)(+)${s_base}.com
456
457 <Command.MSFT, Command.INTEL>
458 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
459 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
460 cd $(OUTPUT_DIR)(+)${s_dir}
461 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
462 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
463
464 <Command.GCC>
465 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
466 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
467 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
468 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
469
470 <Command.XCODE>
471 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
472 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
473 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
474 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
475 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
476
477
478[Nasm-to-Binary-Code-File]
479 <InputFile>
480 ?.nasmb
481
482 <ExtraDependency>
483 $(MAKE_FILE)
484
485 <OutputFile>
486 $(OUTPUT_DIR)(+)${s_base}.bin
487
488 <Command>
489 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
490 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
491 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
492 # copy the output file with .com postfix that be same to the output file of .asm16
493 $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com
494
495[Microcode-File.USER_DEFINED, Microcode-File.Microcode]
496 <InputFile>
497 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
498
499 <OutputFile>
500 $(OUTPUT_DIR)(+)${s_base}.mcb
501
502 <Command>
503 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
504
505[Microcode-Binary-File]
506 <InputFile>
507 *.mcb
508
509 <ExtraDependency>
510 $(MAKE_FILE)
511
512 <OutputFile>
513 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
514
515 <Command>
516 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
517 -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
518
519[EFI-Image-File]
520 <InputFile>
521 ?.efi, ?.Efi, ?.EFI
522
523 <OutputFile>
524
525 <Command>
526
527[Unicode-Text-File]
528 <InputFile>
529 *.uni, *.Uni, *.UNI
530
531 <OutputFile>
532 $(DEBUG_DIR)(+)AutoGen.c
533 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
534 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
535
536 <Command>
537
538[Efi-Image.UEFI_OPTIONROM]
539 <InputFile>
540 ?.efi, ?.EFI, ?.Efi
541
542 <OutputFile>
543 $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
544
545 <Command>
546 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
547
548[Unicode-Text-File.UEFI_HII]
549 <InputFile>
550 *.uni, *.Uni, *.UNI
551
552 <OutputFile>
553 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
554 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
555
556 <Command>
557
558[Visual-Form-Representation-File.UEFI_HII]
559 <InputFile>
560 ?.vfr
561 ?.Vfr
562 ?.VFR
563
564 <ExtraDependency>
565 $(MAKE_FILE)
566
567 <OutputFile>
568 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
569
570 <Command>
571 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
572 "$(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
573
574[Hii-Binary-Package.UEFI_HII]
575 <InputFile>
576 *.hpk
577
578 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>
579 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
580
581 <OutputFile.XCODE, OutputFile.RVCT>
582 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
583
584 <Command.MSFT, Command.INTEL>
585 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
586 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
587
588 <Command.GCC>
589 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
590 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
591
592 <Command.XCODE, Command.RVCT>
593 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
594
595