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