blob: 107e783d2e193e2032f2c07b925965a5de390bde [file] [log] [blame]
jljusten07a756b2007-10-17 01:54:36 +00001#
lgao4da92f272011-05-11 10:26:49 +00002# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
lgao408dd3112010-10-11 06:26:52 +00003# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
lgao440d841f2010-05-18 05:04:32 +00004# This program and the accompanying materials
jljusten07a756b2007-10-17 01:54:36 +00005# are licensed and made available under the terms and conditions of the BSD License
6# which accompanies this distribution. The full text of the license may be found at
7# http://opensource.org/licenses/bsd-license.php
8
9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11#
jljusten07a756b2007-10-17 01:54:36 +000012
13## Syntax
14#
15# "*" is used to indicate that the source files will be processed at the same time.
16# "?" is used to indicate that the source files will be processed one by one.
17#
jwang36f285eb12008-08-12 07:54:36 +000018# "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
jljusten07a756b2007-10-17 01:54:36 +000019# <InputFile[.<ToolChainFamily>]> <EOL>
jwang36f285eb12008-08-12 07:54:36 +000020# (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
jljusten07a756b2007-10-17 01:54:36 +000021#
22# <OutputFile[.<ToolChainFamily>]> <EOL>
23# <FileFullPath>
24#
jwang36f285eb12008-08-12 07:54:36 +000025# <ExtraDependency>
26# <FileFullPath>
27#
jljusten07a756b2007-10-17 01:54:36 +000028# <Command[.<ToolChainFamily>]> <EOL>
29# <Command1>
30# [<Command2>]
31#
jwang36f285eb12008-08-12 07:54:36 +000032# <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK.
33# Missing <InputFile> will cause an exception and break build.
34# Missing <Command> will cause that related build target won't be generated but
35# won't break build.
36#
jljusten07a756b2007-10-17 01:54:36 +000037
38## Placeholders for string substitution
39#
40# ${src} Source file(s) to be built (full path)
41# ${s_path} Source file directory (absolute path)
42# ${s_dir} Source file relative directory within a module
43# (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
44# ${s_name} Source file name without path
45# ${s_base} Source file name without extension and path
46# ${s_ext} Source file extension
47#
48# ${dst} Destination file(s) built from ${src} (full path)
49# ${d_path} Destination file directory (absolute path)
50# ${d_name} Destination file name without path
51# ${d_base} Destination file name without extension and path
52# ${d_ext} Destination file extension
53#
54# (+) Directory separator
55#
56
57## Macro
58# $(WORKSPACE) Workspace directory
59# $(OUTPUT_DIR) Directory for intermediate files for building a module
60# $(DEBUG_DIR) Directory for files used to debug a module
61# $(BUILD_DIR) All files for building a platform will be put in this directory
62# $(BIN_DIR) Common directory for executable files
63# $(FV_DIR) Directory to store flash image files
64# $(INC) Search path of current module
jwang36a388ec42008-12-31 06:06:11 +000065# $(INC_LIST) A file containing search pathes of current module
jljusten07a756b2007-10-17 01:54:36 +000066# $(LIBS) Static library files of current module
67# $(<tool>_FLAGS) Tools flags of current module
68# $(MODULE_NAME) Current module name
69# $(MODULE_TYPE) Current module type
lgao4b303ea72009-11-09 11:47:35 +000070# $(MODULE_GUID) Current module guid
jljusten07a756b2007-10-17 01:54:36 +000071# $(ARCH) Architecture of current module
72# $(TOOLCHAIN) Toolchain used to build current module
73# $(TARGET) Target of current module (DEBUG/RELEASE)
74# $(<tool>) Path of tool
75# $(EDK_TOOLS_PATH) Path of build tools
jwang36a388ec42008-12-31 06:06:11 +000076# $(<FILE_TYPES>) File list of each file type
jljusten07a756b2007-10-17 01:54:36 +000077# (Note: The macro name is derived from file type name. For example,
jwang36a388ec42008-12-31 06:06:11 +000078# C-Code-File will have C_CODE_FILES macro.)
79# $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
80# (
81# Note: The macro and file name are derived from file type name.
jwang36a7d37682009-02-16 13:37:23 +000082# For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
jwang36a388ec42008-12-31 06:06:11 +000083# to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
84# will be generated only when this macro is used in command line.
85# This is intended to get over the long command line limitation.
86# )
jljusten07a756b2007-10-17 01:54:36 +000087#
88# $(CP) copy command
89# $(MV) move command
90# $(RM) delete command
91# $(MD) create dir command
92# $(RD) remove dir command
93#
94
95## Reserved File-Type
96#
jwang36d78f8ac2007-12-25 09:17:00 +000097# Don't change following names of file types and their associated files,
jljusten07a756b2007-10-17 01:54:36 +000098# which are also used in tools' code
99#
100# C-Code-File
101# C-Header-File
102# Dynamic-Library-File
103# Static-Library-File
104# Visual-Form-Representation-File
105# Unicode-Text-File
106#
107
lgao464b26092012-04-10 07:18:20 +0000108## Build Rule Version Number
109# build_rule_version=0.1
110#
111
jwang36f285eb12008-08-12 07:54:36 +0000112[C-Code-File]
jljusten07a756b2007-10-17 01:54:36 +0000113 <InputFile>
114 ?.c
115 ?.C
116 ?.cc
117 ?.CC
118 ?.cpp
119 ?.Cpp
120 ?.CPP
jwang36f285eb12008-08-12 07:54:36 +0000121
122 <ExtraDependency>
jwang3623fdff82008-06-05 07:36:19 +0000123 $(MAKE_FILE)
jljusten07a756b2007-10-17 01:54:36 +0000124
125 <OutputFile>
126 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
127
128 <Command.MSFT, Command.INTEL>
129 "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
130
vanjefffd171542009-09-11 03:14:43 +0000131 <Command.GCC, Command.RVCT>
132 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
133 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
eric_tian3b6c90a2009-04-13 12:50:50 +0000134 "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
jljusten07a756b2007-10-17 01:54:36 +0000135
lgao42bcc7132011-11-25 06:21:03 +0000136 <Command.ARMGCC, Command.ARMLINUXGCC>
lgao4636f2be2010-03-12 10:54:01 +0000137 "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
138
139
jwang36f285eb12008-08-12 07:54:36 +0000140[C-Header-File]
jljusten07a756b2007-10-17 01:54:36 +0000141 <InputFile>
142 *.h, *.H
143
144 <OutputFile>
jljusten07a756b2007-10-17 01:54:36 +0000145
146 <Command>
147
148
jwang36f285eb12008-08-12 07:54:36 +0000149[Assembly-Code-File.COMMON.COMMON]
vanjefffd171542009-09-11 03:14:43 +0000150 <InputFile.MSFT, InputFile.INTEL, InputFile.RVCT>
jwang36f285eb12008-08-12 07:54:36 +0000151 ?.asm, ?.Asm, ?.ASM
jljusten07a756b2007-10-17 01:54:36 +0000152
153 <InputFile.GCC>
eric_tian3b6c90a2009-04-13 12:50:50 +0000154 ?.S, ?.s
jwang36f285eb12008-08-12 07:54:36 +0000155
156 <ExtraDependency>
jwang3623fdff82008-06-05 07:36:19 +0000157 $(MAKE_FILE)
jljusten07a756b2007-10-17 01:54:36 +0000158
159 <OutputFile>
160 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
161
162 <Command.MSFT, Command.INTEL>
163 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
164 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
lgao4ffe084e2008-09-10 06:51:00 +0000165 "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii
jljusten07a756b2007-10-17 01:54:36 +0000166
vanjefffd171542009-09-11 03:14:43 +0000167 <Command.GCC, Command.RVCT>
jljusten07a756b2007-10-17 01:54:36 +0000168 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
169 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
vanjefffd171542009-09-11 03:14:43 +0000170 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
171 "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
jljusten07a756b2007-10-17 01:54:36 +0000172
jwang36f285eb12008-08-12 07:54:36 +0000173[Assembly-Code-File.COMMON.IPF]
jljusten07a756b2007-10-17 01:54:36 +0000174 <InputFile>
175 ?.s
jwang36f285eb12008-08-12 07:54:36 +0000176
177 <ExtraDependency>
jwang3623fdff82008-06-05 07:36:19 +0000178 $(MAKE_FILE)
jljusten07a756b2007-10-17 01:54:36 +0000179
180 <OutputFile>
181 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
182
183 <Command.MSFT, Command.INTEL>
184 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
185 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
vanjefffd171542009-09-11 03:14:43 +0000186 # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
187 "$(ASM)" $(ASM_FLAGS) -o ${dst} ${d_path}(+)${s_base}.iii
jljusten07a756b2007-10-17 01:54:36 +0000188
jwang36f285eb12008-08-12 07:54:36 +0000189[Visual-Form-Representation-File]
jljusten07a756b2007-10-17 01:54:36 +0000190 <InputFile>
191 ?.vfr
192 ?.Vfr
193 ?.VFR
jwang36f285eb12008-08-12 07:54:36 +0000194
195 <ExtraDependency>
jwang3623fdff82008-06-05 07:36:19 +0000196 $(MAKE_FILE)
jljusten07a756b2007-10-17 01:54:36 +0000197
198 <OutputFile>
199 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
200
201 <Command>
lgao42bcc7132011-11-25 06:21:03 +0000202 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
203 "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
jljusten07a756b2007-10-17 01:54:36 +0000204
jwang36f285eb12008-08-12 07:54:36 +0000205[Object-File]
jljusten07a756b2007-10-17 01:54:36 +0000206 <InputFile>
207 *.obj
208 *.o
209
210 <OutputFile>
211 $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
212
213 <Command.MSFT, Command.INTEL>
eric_tian3b6c90a2009-04-13 12:50:50 +0000214 "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
jljusten07a756b2007-10-17 01:54:36 +0000215
216 <Command.GCC>
lgao4b303ea72009-11-09 11:47:35 +0000217 "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
vanjefffd171542009-09-11 03:14:43 +0000218
219 <Command.RVCT>
220 "$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
221
lgao42bcc7132011-11-25 06:21:03 +0000222 <Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC>
vanjefffd171542009-09-11 03:14:43 +0000223 # $(OBJECT_FILES_LIST) has wrong paths for cygwin
224 "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
225
226 <Command.XCODE>
227 "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
jljusten07a756b2007-10-17 01:54:36 +0000228
jwang36f285eb12008-08-12 07:54:36 +0000229[Static-Library-File]
230 <InputFile>
jwang362eab98c2008-12-31 05:53:26 +0000231 *.lib
jljusten07a756b2007-10-17 01:54:36 +0000232
jwang36f285eb12008-08-12 07:54:36 +0000233 <ExtraDependency>
jwang364bf47782007-11-08 03:57:35 +0000234 $(MAKE_FILE)
jljusten9ba67b52007-10-29 18:34:07 +0000235
jljusten07a756b2007-10-17 01:54:36 +0000236 <OutputFile>
237 $(DEBUG_DIR)(+)$(MODULE_NAME).dll
238
239 <Command.MSFT, Command.INTEL>
eric_tian3b6c90a2009-04-13 12:50:50 +0000240 "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
jljusten07a756b2007-10-17 01:54:36 +0000241
242 <Command.GCC>
lgao4b303ea72009-11-09 11:47:35 +0000243 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
eric_tian3b6c90a2009-04-13 12:50:50 +0000244 "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
jwang36a7d37682009-02-16 13:37:23 +0000245
lgao42bcc7132011-11-25 06:21:03 +0000246 <Command.ARMGCC, Command.ARMLINUXGCC>
lgao442342832011-08-26 07:46:26 +0000247 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS)
lgao4636f2be2010-03-12 10:54:01 +0000248
vanjefffd171542009-09-11 03:14:43 +0000249 <Command.RVCT>
250 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
251
252 <Command.RVCTCYGWIN>
253 #$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
254 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
255
256 <Command.XCODE>
257 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
258
259
jwang36a7d37682009-02-16 13:37:23 +0000260[Static-Library-File.USER_DEFINED]
261 <InputFile>
262 *.lib
263
264 <ExtraDependency>
265 $(MAKE_FILE)
266
267 <OutputFile>
268 $(DEBUG_DIR)(+)$(MODULE_NAME)
269
270 <Command.MSFT, Command.INTEL>
eric_tian3b6c90a2009-04-13 12:50:50 +0000271 "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
jwang36a7d37682009-02-16 13:37:23 +0000272
273 <Command.GCC>
eric_tian3b6c90a2009-04-13 12:50:50 +0000274 "$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
jljusten07a756b2007-10-17 01:54:36 +0000275
lgao42bcc7132011-11-25 06:21:03 +0000276 <Command.ARMGCC, Command.ARMLINUXGCC>
lgao442342832011-08-26 07:46:26 +0000277 "$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS)
lgao4636f2be2010-03-12 10:54:01 +0000278
vanjefffd171542009-09-11 03:14:43 +0000279 <Command.RVCT>
280 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
281
282 <Command.RVCTCYGWIN>
283 #$(STATIC_LIBRARY_FILES_LIST) has the wrong paths for cygwin
284 "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) $(DLINK2_FLAGS)
285
286 <Command.XCODE>
287 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
288
289
jwang36f285eb12008-08-12 07:54:36 +0000290[Dynamic-Library-File]
jljusten07a756b2007-10-17 01:54:36 +0000291 <InputFile>
292 ?.dll
293
294 <OutputFile>
295 $(DEBUG_DIR)(+)$(MODULE_NAME).efi
296
lgao42bcc7132011-11-25 06:21:03 +0000297 <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
qhuang8e56468c2010-09-06 01:58:00 +0000298 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
lgao452302d42010-02-28 23:39:39 +0000299 $(CP) ${dst} $(OUTPUT_DIR)
300 $(CP) ${dst} $(BIN_DIR)
301 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
302
303 <Command.GCC>
lgao4da92f272011-05-11 10:26:49 +0000304 $(OBJCOPY) --only-keep-debug ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
lgao452302d42010-02-28 23:39:39 +0000305 $(OBJCOPY) --strip-unneeded ${src}
lgao4da92f272011-05-11 10:26:49 +0000306
307 #
308 #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
309 #
lgao40d2711a2011-10-29 06:59:30 +0000310 -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
lgao4da92f272011-05-11 10:26:49 +0000311 -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
312
qhuang8e56468c2010-09-06 01:58:00 +0000313 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
jljusten07a756b2007-10-17 01:54:36 +0000314 $(CP) ${dst} $(OUTPUT_DIR)
315 $(CP) ${dst} $(BIN_DIR)
316 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
vanjefffd171542009-09-11 03:14:43 +0000317
318 <Command.XCODE>
319 # tool to convert Mach-O to PE/COFF
320 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
321 # create symbol file for GDB debug
322 -$(DSYMUTIL) ${src}
qhuang8e56468c2010-09-06 01:58:00 +0000323 "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
vanjefffd171542009-09-11 03:14:43 +0000324 $(CP) ${dst} $(OUTPUT_DIR)
325 $(CP) ${dst} $(BIN_DIR)
326 -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
jljusten07a756b2007-10-17 01:54:36 +0000327
jwang36f285eb12008-08-12 07:54:36 +0000328[Dependency-Expression-File]
jljusten07a756b2007-10-17 01:54:36 +0000329 <InputFile>
330 ?.dxs, ?.Dxs, ?.DXS
331
332 <OutputFile>
333 $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
334
qhuang89053bc52010-06-28 09:33:10 +0000335 <ExtraDependency>
336 $(MAKE_FILE)
337
jljusten07a756b2007-10-17 01:54:36 +0000338 <Command>
qhuang89053bc52010-06-28 09:33:10 +0000339 "$(PP)" $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
jwang3658ce61e2007-12-22 16:58:04 +0000340 Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
341 GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
jljusten07a756b2007-10-17 01:54:36 +0000342
jwang36f285eb12008-08-12 07:54:36 +0000343[Acpi-Source-Language-File]
jljusten07a756b2007-10-17 01:54:36 +0000344 <InputFile>
345 ?.asl, ?.Asl, ?.ASL
346
347 <OutputFile>
lgao4ffe084e2008-09-10 06:51:00 +0000348 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
jljusten07a756b2007-10-17 01:54:36 +0000349
jwang36f285eb12008-08-12 07:54:36 +0000350 <ExtraDependency>
351 $(MAKE_FILE)
352
jljusten07a756b2007-10-17 01:54:36 +0000353 <Command.MSFT, Command.INTEL>
lgao408dd3112010-10-11 06:26:52 +0000354 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
lgao464cd21a2008-11-17 02:12:36 +0000355 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
lgao408dd3112010-10-11 06:26:52 +0000356 Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
357 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
jljusten07a756b2007-10-17 01:54:36 +0000358
jljustenc6094892009-03-29 18:42:14 +0000359 <Command.GCC>
lgao408dd3112010-10-11 06:26:52 +0000360 Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
jljustenc6094892009-03-29 18:42:14 +0000361 "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
lgao438d49982009-06-17 09:34:46 +0000362 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
jljustenc6094892009-03-29 18:42:14 +0000363
lgao4f0373112008-09-01 01:18:00 +0000364[C-Code-File.AcpiTable]
365 <InputFile>
366 ?.c
367
368 <OutputFile>
lgao4ffe084e2008-09-10 06:51:00 +0000369 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
lgao4f0373112008-09-01 01:18:00 +0000370
371 <ExtraDependency>
372 $(MAKE_FILE)
373
374 <Command.MSFT, Command.INTEL>
lgao46780eef2010-11-15 02:51:34 +0000375 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
lgao4f0373112008-09-01 01:18:00 +0000376 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
qhuang8e56468c2010-09-06 01:58:00 +0000377 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
lgao4f0373112008-09-01 01:18:00 +0000378
jljustenc6094892009-03-29 18:42:14 +0000379 <Command.GCC>
eric_tian623471a2009-04-14 03:20:33 +0000380 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
381 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
qhuang8e56468c2010-09-06 01:58:00 +0000382 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
jljustenc6094892009-03-29 18:42:14 +0000383
jwang36f285eb12008-08-12 07:54:36 +0000384[Acpi-Table-Code-File]
jljusten07a756b2007-10-17 01:54:36 +0000385 <InputFile>
lgao4f0373112008-09-01 01:18:00 +0000386 ?.aslc, ?.act
jljusten07a756b2007-10-17 01:54:36 +0000387
388 <OutputFile>
lgao4ffe084e2008-09-10 06:51:00 +0000389 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
jljusten07a756b2007-10-17 01:54:36 +0000390
jwang36f285eb12008-08-12 07:54:36 +0000391 <ExtraDependency>
392 $(MAKE_FILE)
393
jljusten07a756b2007-10-17 01:54:36 +0000394 <Command.MSFT, Command.INTEL>
lgao46780eef2010-11-15 02:51:34 +0000395 "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
lgao4a1c949f2008-08-21 13:11:01 +0000396 "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
qhuang8e56468c2010-09-06 01:58:00 +0000397 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
jljusten07a756b2007-10-17 01:54:36 +0000398
jljustenc6094892009-03-29 18:42:14 +0000399 <Command.GCC>
400 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
401 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
qhuang8e56468c2010-09-06 01:58:00 +0000402 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
vanjefffd171542009-09-11 03:14:43 +0000403
404 <Command.XCODE>
405 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(INC) ${src}
406 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
407 "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
qhuang8e56468c2010-09-06 01:58:00 +0000408 "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi $(GENFW_FLAGS)
vanjefffd171542009-09-11 03:14:43 +0000409
410
jwang36f285eb12008-08-12 07:54:36 +0000411[Masm16-Code-File]
jljusten07a756b2007-10-17 01:54:36 +0000412 <InputFile>
413 ?.asm16, ?.Asm16, ?.ASM16
414
jwang36f285eb12008-08-12 07:54:36 +0000415 <ExtraDependency>
416 $(MAKE_FILE)
417
jljusten07a756b2007-10-17 01:54:36 +0000418 <OutputFile>
419 $(OUTPUT_DIR)(+)${s_base}.com
420
421 <Command.MSFT, Command.INTEL>
lgao442342832011-08-26 07:46:26 +0000422 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
423 Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
jljusten07a756b2007-10-17 01:54:36 +0000424 cd $(OUTPUT_DIR)(+)${s_dir}
lgao442342832011-08-26 07:46:26 +0000425 "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
jljusten07a756b2007-10-17 01:54:36 +0000426 "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
427
vanjefffd171542009-09-11 03:14:43 +0000428 <Command.GCC>
429 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
430 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
431 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
lgao442342832011-08-26 07:46:26 +0000432 "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj -\)
vanjefffd171542009-09-11 03:14:43 +0000433
434 <Command.XCODE>
435 "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
436 Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
437 "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
438 "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
439 otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
440
441
lgao4a709adf2009-12-29 06:16:53 +0000442[Microcode-File.USER_DEFINED, Microcode-File.Microcode]
jljusten07a756b2007-10-17 01:54:36 +0000443 <InputFile>
lgao4a709adf2009-12-29 06:16:53 +0000444 ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
jljusten07a756b2007-10-17 01:54:36 +0000445
446 <OutputFile>
447 $(OUTPUT_DIR)(+)${s_base}.mcb
448
449 <Command>
qhuang8e56468c2010-09-06 01:58:00 +0000450 "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
jljusten07a756b2007-10-17 01:54:36 +0000451
jwang36f285eb12008-08-12 07:54:36 +0000452[Microcode-Binary-File]
jljusten07a756b2007-10-17 01:54:36 +0000453 <InputFile>
454 *.mcb
455
lgao452302d42010-02-28 23:39:39 +0000456 <ExtraDependency>
457 $(MAKE_FILE)
458
jljusten07a756b2007-10-17 01:54:36 +0000459 <OutputFile>
460 $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
461
462 <Command>
qhuang8e56468c2010-09-06 01:58:00 +0000463 "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
lgao425ab7ab2008-04-18 03:08:20 +0000464 -$(CP) ${dst} $(BIN_DIR)
jljusten07a756b2007-10-17 01:54:36 +0000465
jwang36f285eb12008-08-12 07:54:36 +0000466[EFI-Image-File]
467 <InputFile>
468 ?.efi, ?.Efi, ?.EFI
469
470 <OutputFile>
471
472 <Command>
473
lgao4e1b4bd12008-12-25 03:22:58 +0000474[Unicode-Text-File]
475 <InputFile>
476 *.uni, *.Uni, *.UNI
477
478 <OutputFile>
479 $(DEBUG_DIR)(+)AutoGen.c
480 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
lgao442342832011-08-26 07:46:26 +0000481 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
lgao4e1b4bd12008-12-25 03:22:58 +0000482
483 <Command>
jwang3615543342009-05-03 06:40:59 +0000484
485[Efi-Image.UEFI_OPTIONROM]
486 <InputFile>
487 ?.efi, ?.EFI, ?.Efi
488
489 <OutputFile>
490 $(BIN_DIR)(+)$(MODULE_NAME).rom
491
492 <Command>
lgao4de29c942009-05-05 07:31:56 +0000493 $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
jwang3615543342009-05-03 06:40:59 +0000494
lgao4b303ea72009-11-09 11:47:35 +0000495[Unicode-Text-File.UEFI_HII]
496 <InputFile>
497 *.uni, *.Uni, *.UNI
498
499 <OutputFile>
500 $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
501 $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
502
503 <Command>
504
505[Visual-Form-Representation-File.UEFI_HII]
506 <InputFile>
507 ?.vfr
508 ?.Vfr
509 ?.VFR
510
511 <ExtraDependency>
512 $(MAKE_FILE)
513
514 <OutputFile>
515 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
516
517 <Command>
lgao4b303ea72009-11-09 11:47:35 +0000518 "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
lgao442342832011-08-26 07:46:26 +0000519 "$(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
lgao4b303ea72009-11-09 11:47:35 +0000520
521[Hii-Binary-Package.UEFI_HII]
522 <InputFile>
523 *.hpk
524
lgao408dd3112010-10-11 06:26:52 +0000525 <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC>
lgao4b303ea72009-11-09 11:47:35 +0000526 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
527
lgao408dd3112010-10-11 06:26:52 +0000528 <OutputFile.XCODE, OutputFile.RVCT, OutputFile.ARMGCC>
529 $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
530
lgao4b303ea72009-11-09 11:47:35 +0000531 <Command.MSFT, Command.INTEL>
qhuang8e56468c2010-09-06 01:58:00 +0000532 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
lgao4b303ea72009-11-09 11:47:35 +0000533 "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
534
535 <Command.GCC>
qhuang8e56468c2010-09-06 01:58:00 +0000536 "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
lgao4a709adf2009-12-29 06:16:53 +0000537 "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
lgao408dd3112010-10-11 06:26:52 +0000538
lgao42bcc7132011-11-25 06:21:03 +0000539 <Command.XCODE, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
lgao408dd3112010-10-11 06:26:52 +0000540 GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
541
542