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