BaseTools: Correct NASM output file type for UNIXGCC and CYGGCC.
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
CommitLineData
07a756b9 1#\r
e4ac870f 2# Copyright (c) 2007 - 2014, 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
69# $(MODULE_TYPE) Current module type\r
b303ea72 70# $(MODULE_GUID) Current module guid\r
07a756b9 71# $(ARCH) Architecture of current module\r
72# $(TOOLCHAIN) Toolchain used to build current module\r
73# $(TARGET) Target of current module (DEBUG/RELEASE)\r
74# $(<tool>) Path of tool\r
75# $(EDK_TOOLS_PATH) Path of build tools\r
a388ec43 76# $(<FILE_TYPES>) File list of each file type\r
07a756b9 77# (Note: The macro name is derived from file type name. For example,\r
a388ec43 78# C-Code-File will have C_CODE_FILES macro.)\r
79# $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type\r
80# (\r
81# Note: The macro and file name are derived from file type name.\r
a7d37687 82# For example, C-Code-File will have C_CODE_FILES_LIST macro pointing\r
a388ec43 83# to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name\r
84# will be generated only when this macro is used in command line.\r
85# This is intended to get over the long command line limitation.\r
86# )\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
129 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}\r
130\r
fd171542 131 <Command.GCC, Command.RVCT>\r
132 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues\r
133 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}\r
3b6c90a1 134 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}\r
07a756b9 135\r
9358dc21 136 <Command.ARMGCC, Command.ARMLINUXGCC, command.XCODE>\r
636f2be6
LG
137 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}\r
138\r
139\r
f285eb16 140[C-Header-File]\r
07a756b9 141 <InputFile>\r
142 *.h, *.H\r
143\r
144 <OutputFile>\r
07a756b9 145\r
146 <Command>\r
147\r
148\r
f285eb16 149[Assembly-Code-File.COMMON.COMMON]\r
fd171542 150 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>\r
f285eb16 151 ?.asm, ?.Asm, ?.ASM\r
07a756b9 152\r
153 <InputFile.GCC>\r
3b6c90a1 154 ?.S, ?.s\r
f285eb16 155\r
156 <ExtraDependency>\r
23fdff82 157 $(MAKE_FILE)\r
07a756b9 158\r
159 <OutputFile>\r
160 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
161\r
162 <Command.MSFT, Command.INTEL>\r
163 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
164 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
ffe084ee 165 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii\r
07a756b9 166\r
fd171542 167 <Command.GCC, Command.RVCT>\r
07a756b9 168 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
2bc3256c 169 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
fd171542 170 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues\r
171 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii\r
07a756b9 172\r
ff027981
JJ
173[Nasm-Assembly-Code-File.COMMON.COMMON]\r
174 <InputFile>\r
175 ?.nasm, ?.Nasm, ?.NASM\r
176\r
177 <ExtraDependency>\r
178 $(MAKE_FILE)\r
179\r
180 <OutputFile>\r
181 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
182\r
183 <Command>\r
184 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
185 Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
186 "$(NASM)" -I${s_path}(+) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii\r
187\r
f285eb16 188[Assembly-Code-File.COMMON.IPF]\r
07a756b9 189 <InputFile>\r
190 ?.s\r
f285eb16 191\r
192 <ExtraDependency>\r
23fdff82 193 $(MAKE_FILE)\r
07a756b9 194\r
195 <OutputFile>\r
196 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
197\r
198 <Command.MSFT, Command.INTEL>\r
199 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
200 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
fd171542 201 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues\r
202 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii\r
07a756b9 203\r
f285eb16 204[Visual-Form-Representation-File]\r
07a756b9 205 <InputFile>\r
206 ?.vfr\r
207 ?.Vfr\r
208 ?.VFR\r
f285eb16 209\r
210 <ExtraDependency>\r
23fdff82 211 $(MAKE_FILE)\r
07a756b9 212\r
213 <OutputFile>\r
214 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c\r
215\r
216 <Command>\r
2bcc713e
LG
217 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i\r
218 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i\r
07a756b9 219\r
f285eb16 220[Object-File]\r
07a756b9 221 <InputFile>\r
222 *.obj\r
223 *.o\r
224\r
225 <OutputFile>\r
226 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib\r
227\r
228 <Command.MSFT, Command.INTEL>\r
3b6c90a1 229 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)\r
07a756b9 230\r
231 <Command.GCC>\r
b303ea72 232 "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)\r
fd171542 233 \r
234 <Command.RVCT>\r
235 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)\r
236 \r
2bcc713e 237 <Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC>\r
fd171542 238 # $(OBJECT_FILES_LIST) has wrong paths for cygwin\r
239 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)\r
240\r
241 <Command.XCODE>\r
242 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)\r
07a756b9 243\r
f285eb16 244[Static-Library-File]\r
245 <InputFile>\r
2eab98c1 246 *.lib\r
07a756b9 247\r
f285eb16 248 <ExtraDependency>\r
4bf47781 249 $(MAKE_FILE)\r
9ba67b5c 250\r
07a756b9 251 <OutputFile>\r
252 $(DEBUG_DIR)(+)$(MODULE_NAME).dll\r
253\r
254 <Command.MSFT, Command.INTEL>\r
3b6c90a1 255 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)\r
07a756b9 256\r
257 <Command.GCC>\r
e4ac870f 258 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)\r
3b6c90a1 259 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}\r
a7d37687 260\r
2bcc713e 261 <Command.ARMGCC, Command.ARMLINUXGCC>\r
e4ac870f 262 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)\r
636f2be6 263\r
fd171542 264 <Command.RVCT>\r
265 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)\r
266\r
267 <Command.RVCTCYGWIN>\r
268 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin\r
269 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)\r
270\r
271 <Command.XCODE>\r
272 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)\r
273 \r
274 \r
a7d37687 275[Static-Library-File.USER_DEFINED]\r
276 <InputFile>\r
277 *.lib\r
278\r
279 <ExtraDependency>\r
280 $(MAKE_FILE)\r
281\r
282 <OutputFile>\r
283 $(DEBUG_DIR)(+)$(MODULE_NAME)\r
284\r
285 <Command.MSFT, Command.INTEL>\r
3b6c90a1 286 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)\r
a7d37687 287\r
288 <Command.GCC>\r
e4ac870f 289 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS)\r
07a756b9 290\r
2bcc713e 291 <Command.ARMGCC, Command.ARMLINUXGCC>\r
e4ac870f 292 "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) --end-group $(DLINK2_FLAGS)\r
636f2be6 293\r
fd171542 294 <Command.RVCT>\r
295 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)\r
296\r
297 <Command.RVCTCYGWIN>\r
298 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin\r
299 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)\r
300\r
301 <Command.XCODE>\r
302 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)\r
303 \r
304 \r
f285eb16 305[Dynamic-Library-File]\r
07a756b9 306 <InputFile>\r
307 ?.dll\r
308\r
309 <OutputFile>\r
310 $(DEBUG_DIR)(+)$(MODULE_NAME).efi\r
311\r
2bcc713e 312 <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC> \r
e56468c0 313 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)\r
52302d4d
LG
314 $(CP) ${dst} $(OUTPUT_DIR)\r
315 $(CP) ${dst} $(BIN_DIR)\r
316 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
97fa0ee9 317 -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR) \r
52302d4d 318 <Command.GCC>\r
4afd3d04
LG
319 $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug\r
320 $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}\r
da92f276
LG
321\r
322 #\r
323 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly\r
324 #\r
0d2711a6 325 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}\r
da92f276
LG
326 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)\r
327\r
e56468c0 328 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)\r
07a756b9 329 $(CP) ${dst} $(OUTPUT_DIR)\r
330 $(CP) ${dst} $(BIN_DIR)\r
331 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
fd171542 332 \r
333 <Command.XCODE>\r
334 # tool to convert Mach-O to PE/COFF\r
335 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff\r
336 # create symbol file for GDB debug\r
337 -$(DSYMUTIL) ${src}\r
e56468c0 338 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)\r
fd171542 339 $(CP) ${dst} $(OUTPUT_DIR)\r
340 $(CP) ${dst} $(BIN_DIR)\r
341 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
07a756b9 342\r
f285eb16 343[Dependency-Expression-File]\r
07a756b9 344 <InputFile>\r
345 ?.dxs, ?.Dxs, ?.DXS\r
346\r
347 <OutputFile>\r
348 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex\r
349\r
9053bc51 350 <ExtraDependency>\r
351 $(MAKE_FILE)\r
352\r
07a756b9 353 <Command>\r
9053bc51 354 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
58ce61eb 355 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
356 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
07a756b9 357\r
f285eb16 358[Acpi-Source-Language-File]\r
07a756b9 359 <InputFile>\r
360 ?.asl, ?.Asl, ?.ASL\r
361\r
362 <OutputFile>\r
ffe084ee 363 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml\r
07a756b9 364\r
f285eb16 365 <ExtraDependency>\r
366 $(MAKE_FILE)\r
367\r
07a756b9 368 <Command.MSFT, Command.INTEL>\r
08dd311f 369 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}\r
64cd21af 370 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
08dd311f
LG
371 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii \r
372 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii\r
07a756b9 373\r
c6094890 374 <Command.GCC>\r
08dd311f 375 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}\r
c6094890 376 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
e4ac870f
LG
377 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii \r
378 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii\r
c6094890 379\r
f0373115
LG
380[C-Code-File.AcpiTable]\r
381 <InputFile>\r
382 ?.c\r
383\r
384 <OutputFile>\r
ffe084ee 385 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi\r
f0373115
LG
386\r
387 <ExtraDependency>\r
388 $(MAKE_FILE)\r
389\r
390 <Command.MSFT, Command.INTEL>\r
6780eef1 391 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}\r
f0373115 392 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
e56468c0 393 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)\r
f0373115 394\r
c6094890 395 <Command.GCC>\r
623471a3 396 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}\r
397 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
e56468c0 398 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)\r
c6094890 399\r
f285eb16 400[Acpi-Table-Code-File]\r
07a756b9 401 <InputFile>\r
f0373115 402 ?.aslc, ?.act\r
07a756b9 403\r
404 <OutputFile>\r
ffe084ee 405 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi\r
07a756b9 406\r
f285eb16 407 <ExtraDependency>\r
408 $(MAKE_FILE)\r
409\r
07a756b9 410 <Command.MSFT, Command.INTEL>\r
6780eef1 411 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}\r
a1c949f3 412 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
e56468c0 413 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)\r
07a756b9 414\r
c6094890 415 <Command.GCC>\r
416 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}\r
417 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
e56468c0 418 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)\r
fd171542 419 \r
420 <Command.XCODE> \r
421 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}\r
422 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
423 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi\r
e56468c0 424 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)\r
fd171542 425 \r
426 \r
f285eb16 427[Masm16-Code-File]\r
07a756b9 428 <InputFile>\r
9358dc21 429 ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16\r
07a756b9 430\r
f285eb16 431 <ExtraDependency>\r
432 $(MAKE_FILE)\r
433\r
07a756b9 434 <OutputFile>\r
435 $(OUTPUT_DIR)(+)${s_base}.com\r
436\r
437 <Command.MSFT, Command.INTEL>\r
4234283c
LG
438 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
439 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
07a756b9 440 cd $(OUTPUT_DIR)(+)${s_dir}\r
4234283c 441 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii\r
07a756b9 442 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,\r
443\r
fd171542 444 <Command.GCC>\r
445 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
446 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
447 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii\r
e4ac870f 448 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group\r
fd171542 449 \r
450 <Command.XCODE>\r
451 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
452 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
453 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii\r
454 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
455 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}\r
456 \r
457\r
abb158de
JJ
458[Nasm-to-Binary-Code-File]\r
459 <InputFile>\r
460 ?.nasmb, ?.NASMB\r
461\r
462 <ExtraDependency>\r
463 $(MAKE_FILE)\r
464\r
465 <OutputFile>\r
466 $(OUTPUT_DIR)(+)${s_base}.bin\r
467\r
468 <Command>\r
469 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
470 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
471 "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii\r
472\r
473\r
a709adfa 474[Microcode-File.USER_DEFINED, Microcode-File.Microcode]\r
07a756b9 475 <InputFile>\r
a709adfa 476 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc\r
07a756b9 477\r
478 <OutputFile>\r
479 $(OUTPUT_DIR)(+)${s_base}.mcb\r
480\r
481 <Command>\r
e56468c0 482 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)\r
07a756b9 483\r
f285eb16 484[Microcode-Binary-File]\r
07a756b9 485 <InputFile>\r
486 *.mcb\r
487\r
52302d4d
LG
488 <ExtraDependency>\r
489 $(MAKE_FILE)\r
490\r
07a756b9 491 <OutputFile>\r
492 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin\r
493\r
494 <Command>\r
e56468c0 495 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)\r
25ab7ab1 496 -$(CP) ${dst} $(BIN_DIR)\r
07a756b9 497\r
f285eb16 498[EFI-Image-File]\r
499 <InputFile>\r
500 ?.efi, ?.Efi, ?.EFI\r
501\r
502 <OutputFile>\r
503\r
504 <Command>\r
505\r
e1b4bd14
LG
506[Unicode-Text-File]\r
507 <InputFile>\r
508 *.uni, *.Uni, *.UNI\r
509\r
510 <OutputFile>\r
511 $(DEBUG_DIR)(+)AutoGen.c\r
512 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h\r
4234283c 513 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk\r
e1b4bd14
LG
514\r
515 <Command>\r
15543340 516\r
517[Efi-Image.UEFI_OPTIONROM]\r
518 <InputFile>\r
519 ?.efi, ?.EFI, ?.Efi\r
520\r
521 <OutputFile>\r
522 $(BIN_DIR)(+)$(MODULE_NAME).rom\r
523\r
524 <Command>\r
de29c94a 525 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src\r
15543340 526\r
b303ea72
LG
527[Unicode-Text-File.UEFI_HII]\r
528 <InputFile>\r
529 *.uni, *.Uni, *.UNI\r
530\r
531 <OutputFile>\r
532 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk\r
533 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h\r
534\r
535 <Command>\r
536\r
537[Visual-Form-Representation-File.UEFI_HII]\r
538 <InputFile>\r
539 ?.vfr\r
540 ?.Vfr\r
541 ?.VFR\r
542\r
543 <ExtraDependency>\r
544 $(MAKE_FILE)\r
545\r
546 <OutputFile>\r
547 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk\r
548\r
549 <Command>\r
b303ea72 550 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
4234283c 551 "$(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
552\r
553[Hii-Binary-Package.UEFI_HII]\r
554 <InputFile>\r
555 *.hpk\r
556\r
08dd311f 557 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>\r
b303ea72
LG
558 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib\r
559\r
08dd311f
LG
560 <OutputFile.XCODE, OutputFile.RVCT, OutputFile.ARMGCC>\r
561 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc\r
562\r
b303ea72 563 <Command.MSFT, Command.INTEL>\r
e56468c0 564 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)\r
b303ea72
LG
565 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc\r
566\r
567 <Command.GCC>\r
e56468c0 568 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)\r
a709adfa 569 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}\r
08dd311f 570 \r
2bcc713e 571 <Command.XCODE, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC> \r
08dd311f
LG
572 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)\r
573 \r
574 \r