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