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