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