Maintainers.txt: Update email address
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
1 #
2 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
3 # Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
4 # Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
6 #
7
8 ## Syntax
9 #
10 # "*" is used to indicate that the source files will be processed at the same time.
11 # "?" is used to indicate that the source files will be processed one by one.
12 #
13 # "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
14 # <InputFile[.<ToolChainFamily>]> <EOL>
15 # (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
16 #
17 # <OutputFile[.<ToolChainFamily>]> <EOL>
18 # <FileFullPath>
19 #
20 # <ExtraDependency>
21 # <FileFullPath>
22 #
23 # <Command[.<ToolChainFamily>]> <EOL>
24 # <Command1>
25 # [<Command2>]
26 #
27 # <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK.
28 # Missing <InputFile> will cause an exception and break build.
29 # Missing <Command> will cause that related build target won't be generated but
30 # won't break build.
31 #
32
33 ## Placeholders for string substitution
34 #
35 # ${src} Source file(s) to be built (full path)
36 # ${s_path} Source file directory (absolute path)
37 # ${s_dir} Source file relative directory within a module
38 # (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
39 # ${s_name} Source file name without path
40 # ${s_base} Source file name without extension and path
41 # ${s_ext} Source file extension
42 #
43 # ${dst} Destination file(s) built from ${src} (full path)
44 # ${d_path} Destination file directory (absolute path)
45 # ${d_name} Destination file name without path
46 # ${d_base} Destination file name without extension and path
47 # ${d_ext} Destination file extension
48 #
49 # (+) Directory separator
50 #
51
52 ## Macro
53 # $(WORKSPACE) Workspace directory
54 # $(OUTPUT_DIR) Directory for intermediate files for building a module
55 # $(DEBUG_DIR) Directory for files used to debug a module
56 # $(BUILD_DIR) All files for building a platform will be put in this directory
57 # $(BIN_DIR) Common directory for executable files
58 # $(FV_DIR) Directory to store flash image files
59 # $(INC) Search path of current module
60 # $(NASM_INC) Search nasm file path of current module
61 # $(INC_LIST) A file containing search paths of current module
62 # $(LIBS) Static library files of current module
63 # $(<tool>_FLAGS) Tools flags of current module
64 # $(MODULE_NAME) Current module name
65 # $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
66 # in different modules, otherwise its value is same as $(MODULE_NAME)
67 # $(MODULE_TYPE) Current module type
68 # $(MODULE_GUID) Current module guid
69 # $(ARCH) Architecture of current module
70 # $(TOOLCHAIN) Toolchain used to build current module
71 # $(TARGET) Target of current module (DEBUG/RELEASE)
72 # $(<tool>) Path of tool
73 # $(EDK_TOOLS_PATH) Path of build tools
74 # $(<FILE_TYPES>) File list of each file type
75 # (Note: The macro name is derived from file type name. For example,
76 # C-Code-File will have C_CODE_FILES macro.)
77 # $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
78 # (
79 # Note: The macro and file name are derived from file type name.
80 # For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
81 # to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
82 # will be generated only when this macro is used in command line.
83 # This is intended to get over the long command line limitation.
84 # )
85 # $(DEPS_FLAGS) This is a tool flag to have c compiler generate dependent header file list for a source file.
86 # To enable incremental build, this flag must apply to $(CC), $(VFRPP), $(PP), $(ASLCC) and $(ASLPP).
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} $(DEPS_FLAGS) $(CC_FLAGS) $(INC) ${src}
130
131 <Command.GCC>
132 "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
133
134 <Command.XCODE>
135 "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -o ${dst} $(INC) ${src}
136
137 [C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AARCH64,C-Code-File.PEIM.AARCH64,C-Code-File.BASE.ARM,C-Code-File.SEC.ARM,C-Code-File.PEI_CORE.ARM,C-Code-File.PEIM.ARM]
138 <InputFile>
139 ?.c
140
141 <ExtraDependency>
142 $(MAKE_FILE)
143
144 <OutputFile>
145 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
146
147 <Command.GCC>
148 "$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src}
149
150 [C-Header-File]
151 <InputFile>
152 *.h, *.H
153
154 <OutputFile>
155
156 <Command>
157
158 [Assembly-Code-File.COMMON.COMMON]
159 <InputFile.MSFT, InputFile.INTEL>
160 ?.asm, ?.Asm, ?.ASM
161
162 <InputFile.GCC>
163 ?.S, ?.s
164
165 <ExtraDependency>
166 $(MAKE_FILE)
167
168 <OutputFile>
169 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
170
171 <Command.MSFT, Command.INTEL>
172 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
173 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
174 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
175 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
176
177 <Command.GCC>
178 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
179 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
180 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
181 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
182
183 [Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64]
184 # Remove --convert-hex for ARM as it breaks MSFT assemblers
185 <InputFile.MSFT, InputFile.INTEL>
186 ?.asm, ?.Asm, ?.ASM
187
188 <InputFile.GCC>
189 ?.S, ?.s
190
191 <ExtraDependency>
192 $(MAKE_FILE)
193
194 <OutputFile>
195 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
196
197 <Command.INTEL>
198 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
199 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
200 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
201 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
202
203 <Command.MSFT>
204 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
205 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
206 Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
207 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
208
209 <Command.GCC>
210 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
211 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
212 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
213 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
214
215 [Nasm-Assembly-Code-File.COMMON.COMMON]
216 <InputFile>
217 ?.nasm
218
219 <ExtraDependency>
220 $(MAKE_FILE)
221
222 <OutputFile>
223 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
224
225 <Command>
226 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
227 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
228 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
229 "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
230
231 [Device-Tree-Source-File]
232 <InputFile>
233 ?.dts
234
235 <ExtraDependency>
236 $(MAKE_FILE)
237
238 <OutputFile>
239 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dtb
240
241 <Command.GCC>
242 "$(DTCPP)" $(DTCPP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
243 "$(DTC)" $(DTC_FLAGS) -I dts -O dtb -o ${dst} ${d_path}(+)${s_base}.i
244
245 [Visual-Form-Representation-File]
246 <InputFile>
247 ?.vfr
248 ?.Vfr
249 ?.VFR
250
251 <ExtraDependency>
252 $(MAKE_FILE)
253
254 <OutputFile>
255 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
256
257 <Command>
258 "$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
259 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
260
261 [Object-File]
262 <InputFile>
263 *.obj
264 *.o
265
266 <OutputFile>
267 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
268
269 <Command.MSFT, Command.INTEL, Command.CLANGPDB>
270 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
271
272 <Command.GCC>
273 $(RM) ${dst}
274 "$(SLINK)" cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
275
276 <Command.XCODE>
277 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
278
279 [Static-Library-File]
280 <InputFile>
281 *.lib
282
283 <ExtraDependency>
284 $(MAKE_FILE)
285
286 <OutputFile>
287 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
288
289 <Command.MSFT, Command.INTEL>
290 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
291 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
292
293 <Command.CLANGPDB>
294 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
295
296 <Command.GCC>
297 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
298 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
299
300 <Command.XCODE>
301 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
302
303
304 [Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, Static-Library-File.PEIM.AARCH64,Static-Library-File.SEC.ARM, Static-Library-File.PEI_CORE.ARM, Static-Library-File.PEIM.ARM]
305 <InputFile>
306 *.lib
307
308 <ExtraDependency>
309 $(MAKE_FILE)
310
311 <OutputFile>
312 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
313
314 <Command.GCC>
315 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(CC_XIPFLAGS) $(DLINK2_FLAGS)
316 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
317
318
319 [Static-Library-File.USER_DEFINED, Static-Library-File.HOST_APPLICATION]
320 <InputFile>
321 *.lib
322
323 <ExtraDependency>
324 $(MAKE_FILE)
325
326 <OutputFile>
327 $(DEBUG_DIR)(+)$(MODULE_NAME)
328
329 <Command.MSFT, Command.INTEL, Command.CLANGPDB>
330 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
331
332 <Command.GCC>
333 "$(DLINK)" $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
334
335 <Command.XCODE>
336 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
337
338
339 [Dynamic-Library-File]
340 <InputFile>
341 ?.dll
342
343 <OutputFile>
344 $(OUTPUT_DIR)(+)$(MODULE_NAME).efi
345 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
346 $(OUTPUT_DIR)(+)$(MODULE_NAME).map
347
348 <Command.MSFT, Command.INTEL, Command.CLANGPDB>
349 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
350 $(CP) ${dst} $(DEBUG_DIR)
351 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
352 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
353 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
354 <Command.GCC>
355 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
356 $(OBJCOPY) $(OBJCOPY_STRIPFLAG) ${src}
357
358 #
359 #The below 2 lines are only needed for UNIXGCC tool chain, which generates PE image directly
360 #
361 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
362 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
363
364 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
365 $(CP) ${dst} $(DEBUG_DIR)
366 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
367 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
368
369 <Command.XCODE>
370 # tool to convert Mach-O to PE/COFF
371 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
372 # create symbol file for GDB debug
373 -$(DSYMUTIL) ${src}
374 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
375 $(CP) ${dst} $(DEBUG_DIR)
376 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
377 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
378
379 [Dependency-Expression-File]
380 <InputFile>
381 ?.dxs, ?.Dxs, ?.DXS
382
383 <OutputFile>
384 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
385
386 <ExtraDependency>
387 $(MAKE_FILE)
388
389 <Command>
390 "$(PP)" $(DEPS_FLAGS) $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
391 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
392 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
393
394 [Acpi-Source-Language-File]
395 <InputFile>
396 ?.asl, ?.Asl, ?.ASL
397
398 <OutputFile>
399 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
400 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
401
402 <ExtraDependency>
403 $(MAKE_FILE)
404
405 <Command.MSFT, Command.INTEL>
406 Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
407 "$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
408 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
409 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
410 $(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
411
412 <Command.GCC>
413 Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
414 "$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
415 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
416 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
417 $(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
418
419 [Acpi-Machine-Language-File-to-C.DXE_DRIVER]
420 <InputFile>
421 ?.amli
422
423 <OutputFile>
424 ${s_path}(+)${s_base}.c
425
426 <Command>
427 -AmlToC ${src}
428
429 [C-Code-File.AcpiTable]
430 <InputFile>
431 ?.c
432
433 <OutputFile>
434 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
435
436 <ExtraDependency>
437 $(MAKE_FILE)
438
439 <Command.MSFT, Command.INTEL>
440 "$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
441 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
442 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
443
444 <Command.GCC>
445 "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
446 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
447 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
448
449 [Acpi-Table-Code-File]
450 <InputFile>
451 ?.aslc, ?.act
452
453 <OutputFile>
454 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
455
456 <ExtraDependency>
457 $(MAKE_FILE)
458
459 <Command.MSFT, Command.INTEL>
460 "$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
461 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
462 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
463
464 <Command.GCC>
465 "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
466 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS)
467 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
468
469 <Command.CLANGPDB>
470 "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
471 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
472 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
473
474 <Command.XCODE>
475 "$(ASLCC)" $(DEPS_FLAGS) -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
476 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
477 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff
478 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff $(GENFW_FLAGS)
479
480
481 [Masm16-Code-File]
482 <InputFile>
483 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
484
485 <ExtraDependency>
486 $(MAKE_FILE)
487
488 <OutputFile>
489 $(OUTPUT_DIR)(+)${s_base}.com
490
491 <Command.MSFT, Command.INTEL>
492 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
493 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
494 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
495 cd $(OUTPUT_DIR)(+)${s_dir}
496 "$(ASM16)" /nologo /c /omf $(ASM16_FLAGS) $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
497 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
498
499 <Command.GCC>
500 Trim --asm-file -o {d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
501 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
502 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
503 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
504 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
505
506 <Command.XCODE>
507 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
508 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
509 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
510 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
511 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
512 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
513
514
515 [Nasm-to-Binary-Code-File]
516 <InputFile>
517 ?.nasmb
518
519 <ExtraDependency>
520 $(MAKE_FILE)
521
522 <OutputFile>
523 $(OUTPUT_DIR)(+)${s_base}.bin
524
525 <Command>
526 Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
527 "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
528 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
529 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) $(NASM_INC) -o $dst ${d_path}(+)${s_base}.iii
530 # copy the output file with .com postfix that be same to the output file of .asm16
531 $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com
532
533 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
534 <InputFile>
535 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
536
537 <OutputFile>
538 $(OUTPUT_DIR)(+)${s_base}.mcb
539
540 <Command>
541 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
542
543 [Microcode-Binary-File]
544 <InputFile>
545 *.mcb
546
547 <ExtraDependency>
548 $(MAKE_FILE)
549
550 <OutputFile>
551 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
552
553 <Command>
554 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
555 -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
556
557 [EFI-Image-File]
558 <InputFile>
559 ?.efi, ?.Efi, ?.EFI
560
561 <OutputFile>
562
563 <Command>
564
565 [Unicode-Text-File]
566 <InputFile>
567 *.uni, *.Uni, *.UNI
568
569 <OutputFile>
570 $(DEBUG_DIR)(+)AutoGen.c
571 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
572 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
573
574 <Command>
575
576 [Image-Definition-File]
577 <InputFile>
578 *.idf, *.Idf, *.IDF
579
580 <OutputFile>
581 $(DEBUG_DIR)(+)AutoGen.c
582 $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
583 $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
584
585 <Command>
586
587 [Efi-Image.UEFI_OPTIONROM]
588 <InputFile>
589 ?.efi, ?.EFI, ?.Efi
590
591 <OutputFile>
592 $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
593
594 <Command>
595 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
596
597 [Unicode-Text-File.UEFI_HII]
598 <InputFile>
599 *.uni, *.Uni, *.UNI
600
601 <OutputFile>
602 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
603 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
604
605 <Command>
606
607 [Image-Definition-File.UEFI_HII]
608 <InputFile>
609 *.idf, *.Idf, *.IDF
610
611 <OutputFile>
612 $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
613 $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
614
615 <Command>
616
617 [Visual-Form-Representation-File.UEFI_HII]
618 <InputFile>
619 ?.vfr
620 ?.Vfr
621 ?.VFR
622
623 <ExtraDependency>
624 $(MAKE_FILE)
625
626 <OutputFile>
627 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
628
629 <Command>
630 "$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
631 "$(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
632
633 [Hii-Binary-Package.UEFI_HII]
634 <InputFile>
635 *.hpk
636
637 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC, OutputFile.CLANGPDB>
638 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
639
640 <OutputFile.XCODE>
641 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
642
643 <Command.MSFT, Command.INTEL, Command.CLANGPDB>
644 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
645 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
646
647 <Command.GCC>
648 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
649 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
650 <Command.XCODE, Command.CLANGGCC>
651 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)