671d37833d8c8ffbc240ed5a792f0bb0db36e910
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
1 #
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
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_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
70 # in different modules, otherwise its value is same as $(MODULE_NAME)
71 # $(MODULE_TYPE) Current module type
72 # $(MODULE_GUID) Current module guid
73 # $(ARCH) Architecture of current module
74 # $(TOOLCHAIN) Toolchain used to build current module
75 # $(TARGET) Target of current module (DEBUG/RELEASE)
76 # $(<tool>) Path of tool
77 # $(EDK_TOOLS_PATH) Path of build tools
78 # $(<FILE_TYPES>) File list of each file type
79 # (Note: The macro name is derived from file type name. For example,
80 # C-Code-File will have C_CODE_FILES macro.)
81 # $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
82 # (
83 # Note: The macro and file name are derived from file type name.
84 # For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
85 # to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
86 # will be generated only when this macro is used in command line.
87 # This is intended to get over the long command line limitation.
88 # )
89 #
90 # $(CP) copy command
91 # $(MV) move command
92 # $(RM) delete command
93 # $(MD) create dir command
94 # $(RD) remove dir command
95 #
96
97 ## Reserved File-Type
98 #
99 # Don't change following names of file types and their associated files,
100 # which are also used in tools' code
101 #
102 # C-Code-File
103 # C-Header-File
104 # Dynamic-Library-File
105 # Static-Library-File
106 # Visual-Form-Representation-File
107 # Unicode-Text-File
108 #
109
110 ## Build Rule Version Number
111 # build_rule_version=0.1
112 #
113
114 [C-Code-File]
115 <InputFile>
116 ?.c
117 ?.C
118 ?.cc
119 ?.CC
120 ?.cpp
121 ?.Cpp
122 ?.CPP
123
124 <ExtraDependency>
125 $(MAKE_FILE)
126
127 <OutputFile>
128 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
129
130 <Command.MSFT, Command.INTEL>
131 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
132
133 <Command.GCC, Command.GCCLD, Command.RVCT>
134 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
135 "$(CC)" $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
136
137 <Command.XCODE>
138 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
139
140 [C-Code-File.COMMON.IPF]
141 <InputFile>
142 ?.c
143 ?.C
144 ?.cc
145 ?.CC
146 ?.cpp
147 ?.Cpp
148 ?.CPP
149
150 <ExtraDependency>
151 $(MAKE_FILE)
152
153 <OutputFile>
154 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
155
156 <Command.MSFT, Command.INTEL>
157 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
158
159 <Command.GCC, Command.GCCLD, Command.RVCT>
160 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
161 "$(CC)" $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
162 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
163
164 [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]
165 <InputFile>
166 ?.c
167
168 <ExtraDependency>
169 $(MAKE_FILE)
170
171 <OutputFile>
172 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
173
174 <Command.GCC, Command.GCCLD, Command.RVCT>
175 "$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src}
176
177 [C-Header-File]
178 <InputFile>
179 *.h, *.H
180
181 <OutputFile>
182
183 <Command>
184
185 [Assembly-Code-File.COMMON.COMMON]
186 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
187 ?.asm, ?.Asm, ?.ASM
188
189 <InputFile.GCC, InputFile.GCCLD>
190 ?.S, ?.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 --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
201 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
202
203 <Command.GCC, Command.GCCLD, Command.RVCT>
204 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
205 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
206 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
207 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
208
209 [Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64]
210 # Remove --convert-hex for ARM as it breaks MSFT assemblers
211 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
212 ?.asm, ?.Asm, ?.ASM
213
214 <InputFile.GCC, InputFile.GCCLD>
215 ?.S, ?.s
216
217 <ExtraDependency>
218 $(MAKE_FILE)
219
220 <OutputFile>
221 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
222
223 <Command.INTEL>
224 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
225 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
226 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
227
228 <Command.MSFT>
229 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
230 Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
231 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
232
233 <Command.GCC, Command.GCCLD, Command.RVCT>
234 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
235 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
236 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
237 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
238
239 [Nasm-Assembly-Code-File.COMMON.COMMON]
240 <InputFile>
241 ?.nasm
242
243 <ExtraDependency>
244 $(MAKE_FILE)
245
246 <OutputFile>
247 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
248
249 <Command>
250 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
251 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
252 "$(NASM)" -I${s_path}(+) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
253
254 [Assembly-Code-File.COMMON.IPF]
255 <InputFile>
256 ?.s
257
258 <ExtraDependency>
259 $(MAKE_FILE)
260
261 <OutputFile>
262 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
263
264 <Command.MSFT, Command.INTEL>
265 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
266 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
267 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
268 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii
269
270 [Device-Tree-Source-File]
271 <InputFile>
272 ?.dts
273
274 <ExtraDependency>
275 $(MAKE_FILE)
276
277 <OutputFile>
278 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dtb
279
280 <Command.GCC>
281 "$(DTCPP)" $(DTCPP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
282 "$(DTC)" $(DTC_FLAGS) -I dts -O dtb -o ${dst} ${d_path}(+)${s_base}.i
283
284 [Visual-Form-Representation-File]
285 <InputFile>
286 ?.vfr
287 ?.Vfr
288 ?.VFR
289
290 <ExtraDependency>
291 $(MAKE_FILE)
292
293 <OutputFile>
294 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
295
296 <Command>
297 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
298 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
299
300 [Object-File]
301 <InputFile>
302 *.obj
303 *.o
304
305 <OutputFile>
306 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
307
308 <Command.MSFT, Command.INTEL>
309 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
310
311 <Command.GCC, Command.GCCLD>
312 "$(SLINK)" cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
313
314 <Command.RVCT>
315 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
316
317 <Command.RVCTCYGWIN>
318 # $(OBJECT_FILES_LIST) has wrong paths for cygwin
319 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
320
321 <Command.XCODE>
322 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
323
324 [Static-Library-File]
325 <InputFile>
326 *.lib
327
328 <ExtraDependency>
329 $(MAKE_FILE)
330
331 <OutputFile>
332 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
333
334 <Command.MSFT, Command.INTEL>
335 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
336 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
337
338 <Command.GCC>
339 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
340 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
341
342 <Command.GCCLD>
343 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
344 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
345
346 <Command.RVCT>
347 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
348
349 <Command.RVCTCYGWIN>
350 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
351 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
352
353 <Command.XCODE>
354 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
355
356
357 [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]
358 <InputFile>
359 *.lib
360
361 <ExtraDependency>
362 $(MAKE_FILE)
363
364 <OutputFile>
365 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
366
367 <Command.GCC>
368 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(CC_XIPFLAGS) $(DLINK2_FLAGS)
369 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
370
371
372 [Static-Library-File.USER_DEFINED]
373 <InputFile>
374 *.lib
375
376 <ExtraDependency>
377 $(MAKE_FILE)
378
379 <OutputFile>
380 $(DEBUG_DIR)(+)$(MODULE_NAME)
381
382 <Command.MSFT, Command.INTEL>
383 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
384
385 <Command.GCC>
386 "$(DLINK)" $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
387
388 <Command.GCCLD>
389 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)
390
391 <Command.RVCT>
392 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
393
394 <Command.RVCTCYGWIN>
395 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin
396 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
397
398 <Command.XCODE>
399 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
400
401
402 [Dynamic-Library-File]
403 <InputFile>
404 ?.dll
405
406 <OutputFile>
407 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
408
409 <Command.MSFT, Command.INTEL, Command.RVCT>
410 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
411 $(CP) ${dst} $(OUTPUT_DIR)
412 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
413 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
414 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
415 <Command.GCC, Command.GCCLD>
416 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
417 $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}
418
419 #
420 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
421 #
422 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
423 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
424
425 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
426 $(CP) ${dst} $(OUTPUT_DIR)
427 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
428 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
429
430 <Command.XCODE>
431 # tool to convert Mach-O to PE/COFF
432 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
433 # create symbol file for GDB debug
434 -$(DSYMUTIL) ${src}
435 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
436 $(CP) ${dst} $(OUTPUT_DIR)
437 $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
438 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
439
440 [Dependency-Expression-File]
441 <InputFile>
442 ?.dxs, ?.Dxs, ?.DXS
443
444 <OutputFile>
445 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
446
447 <ExtraDependency>
448 $(MAKE_FILE)
449
450 <Command>
451 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
452 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
453 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
454
455 [Acpi-Source-Language-File]
456 <InputFile>
457 ?.asl, ?.Asl, ?.ASL
458
459 <OutputFile>
460 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
461
462 <ExtraDependency>
463 $(MAKE_FILE)
464
465 <Command.MSFT, Command.INTEL>
466 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
467 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
468 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
469 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
470
471 <Command.GCC, Command.GCCLD>
472 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
473 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
474 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
475 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
476
477 [C-Code-File.AcpiTable]
478 <InputFile>
479 ?.c
480
481 <OutputFile>
482 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
483
484 <ExtraDependency>
485 $(MAKE_FILE)
486
487 <Command.MSFT, Command.INTEL>
488 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
489 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
490 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
491
492 <Command.GCC, Command.GCCLD>
493 "$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
494 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
495 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
496
497 [Acpi-Table-Code-File]
498 <InputFile>
499 ?.aslc, ?.act
500
501 <OutputFile>
502 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
503
504 <ExtraDependency>
505 $(MAKE_FILE)
506
507 <Command.MSFT, Command.INTEL>
508 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
509 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
510 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
511
512 <Command.GCC, Command.GCCLD>
513 "$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
514 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
515 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
516
517 <Command.XCODE>
518 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
519 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
520 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
521 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)
522
523
524 [Masm16-Code-File]
525 <InputFile>
526 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
527
528 <ExtraDependency>
529 $(MAKE_FILE)
530
531 <OutputFile>
532 $(OUTPUT_DIR)(+)${s_base}.com
533
534 <Command.MSFT, Command.INTEL>
535 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
536 Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
537 cd $(OUTPUT_DIR)(+)${s_dir}
538 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
539 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
540
541 <Command.GCC, Command.GCCLD>
542 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
543 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
544 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
545 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
546
547 <Command.XCODE>
548 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
549 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
550 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
551 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
552 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
553
554
555 [Nasm-to-Binary-Code-File]
556 <InputFile>
557 ?.nasmb
558
559 <ExtraDependency>
560 $(MAKE_FILE)
561
562 <OutputFile>
563 $(OUTPUT_DIR)(+)${s_base}.bin
564
565 <Command>
566 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
567 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
568 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
569 # copy the output file with .com postfix that be same to the output file of .asm16
570 $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com
571
572 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
573 <InputFile>
574 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
575
576 <OutputFile>
577 $(OUTPUT_DIR)(+)${s_base}.mcb
578
579 <Command>
580 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
581
582 [Microcode-Binary-File]
583 <InputFile>
584 *.mcb
585
586 <ExtraDependency>
587 $(MAKE_FILE)
588
589 <OutputFile>
590 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
591
592 <Command>
593 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
594 -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
595
596 [EFI-Image-File]
597 <InputFile>
598 ?.efi, ?.Efi, ?.EFI
599
600 <OutputFile>
601
602 <Command>
603
604 [Unicode-Text-File]
605 <InputFile>
606 *.uni, *.Uni, *.UNI
607
608 <OutputFile>
609 $(DEBUG_DIR)(+)AutoGen.c
610 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
611 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
612
613 <Command>
614
615 [Image-Definition-File]
616 <InputFile>
617 *.idf, *.Idf, *.IDF
618
619 <OutputFile>
620 $(DEBUG_DIR)(+)AutoGen.c
621 $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
622 $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
623
624 <Command>
625
626 [Efi-Image.UEFI_OPTIONROM]
627 <InputFile>
628 ?.efi, ?.EFI, ?.Efi
629
630 <OutputFile>
631 $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
632
633 <Command>
634 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
635
636 [Unicode-Text-File.UEFI_HII]
637 <InputFile>
638 *.uni, *.Uni, *.UNI
639
640 <OutputFile>
641 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
642 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
643
644 <Command>
645
646 [Image-Definition-File.UEFI_HII]
647 <InputFile>
648 *.idf, *.Idf, *.IDF
649
650 <OutputFile>
651 $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
652 $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
653
654 <Command>
655
656 [Visual-Form-Representation-File.UEFI_HII]
657 <InputFile>
658 ?.vfr
659 ?.Vfr
660 ?.VFR
661
662 <ExtraDependency>
663 $(MAKE_FILE)
664
665 <OutputFile>
666 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
667
668 <Command>
669 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
670 "$(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
671
672 [Hii-Binary-Package.UEFI_HII]
673 <InputFile>
674 *.hpk
675
676 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>
677 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
678
679 <OutputFile.XCODE, OutputFile.RVCT>
680 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
681
682 <Command.MSFT, Command.INTEL>
683 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
684 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
685
686 <Command.GCC, Command.GCCLD>
687 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
688 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
689
690 <Command.XCODE, Command.RVCT>
691 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
692
693