1 | #
|
---|
2 | # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
3 | # Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
|
---|
4 | # Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
|
---|
5 | # SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 | #
|
---|
7 |
|
---|
8 | ## Syntax
|
---|
9 | #
|
---|
10 | # "*" is used to indicate that the source files will be processed at the same time.
|
---|
11 | # "?" is used to indicate that the source files will be processed one by one.
|
---|
12 | #
|
---|
13 | # "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
|
---|
14 | # <InputFile[.<ToolChainFamily>]> <EOL>
|
---|
15 | # (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
|
---|
16 | #
|
---|
17 | # <OutputFile[.<ToolChainFamily>]> <EOL>
|
---|
18 | # <FileFullPath>
|
---|
19 | #
|
---|
20 | # <ExtraDependency>
|
---|
21 | # <FileFullPath>
|
---|
22 | #
|
---|
23 | # <Command[.<ToolChainFamily>]> <EOL>
|
---|
24 | # <Command1>
|
---|
25 | # [<Command2>]
|
---|
26 | #
|
---|
27 | # <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK.
|
---|
28 | # Missing <InputFile> will cause an exception and break build.
|
---|
29 | # Missing <Command> will cause that related build target won't be generated but
|
---|
30 | # won't break build.
|
---|
31 | #
|
---|
32 |
|
---|
33 | ## Placeholders for string substitution
|
---|
34 | #
|
---|
35 | # ${src} Source file(s) to be built (full path)
|
---|
36 | # ${s_path} Source file directory (absolute path)
|
---|
37 | # ${s_dir} Source file relative directory within a module
|
---|
38 | # (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
|
---|
39 | # ${s_name} Source file name without path
|
---|
40 | # ${s_base} Source file name without extension and path
|
---|
41 | # ${s_ext} Source file extension
|
---|
42 | #
|
---|
43 | # ${dst} Destination file(s) built from ${src} (full path)
|
---|
44 | # ${d_path} Destination file directory (absolute path)
|
---|
45 | # ${d_name} Destination file name without path
|
---|
46 | # ${d_base} Destination file name without extension and path
|
---|
47 | # ${d_ext} Destination file extension
|
---|
48 | #
|
---|
49 | # (+) Directory separator
|
---|
50 | #
|
---|
51 |
|
---|
52 | ## Macro
|
---|
53 | # $(WORKSPACE) Workspace directory
|
---|
54 | # $(OUTPUT_DIR) Directory for intermediate files for building a module
|
---|
55 | # $(DEBUG_DIR) Directory for files used to debug a module
|
---|
56 | # $(BUILD_DIR) All files for building a platform will be put in this directory
|
---|
57 | # $(BIN_DIR) Common directory for executable files
|
---|
58 | # $(FV_DIR) Directory to store flash image files
|
---|
59 | # $(INC) Search path of current module
|
---|
60 | # $(NASM_INC) Search nasm file path of current module
|
---|
61 | # $(INC_LIST) A file containing search paths of current module
|
---|
62 | # $(LIBS) Static library files of current module
|
---|
63 | # $(<tool>_FLAGS) Tools flags of current module
|
---|
64 | # $(MODULE_NAME) Current module name
|
---|
65 | # $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
|
---|
66 | # in different modules, otherwise its value is same as $(MODULE_NAME)
|
---|
67 | # $(MODULE_TYPE) Current module type
|
---|
68 | # $(MODULE_GUID) Current module guid
|
---|
69 | # $(ARCH) Architecture of current module
|
---|
70 | # $(TOOLCHAIN) Toolchain used to build current module
|
---|
71 | # $(TARGET) Target of current module (DEBUG/RELEASE)
|
---|
72 | # $(<tool>) Path of tool
|
---|
73 | # $(EDK_TOOLS_PATH) Path of build tools
|
---|
74 | # $(<FILE_TYPES>) File list of each file type
|
---|
75 | # (Note: The macro name is derived from file type name. For example,
|
---|
76 | # C-Code-File will have C_CODE_FILES macro.)
|
---|
77 | # $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
|
---|
78 | # (
|
---|
79 | # Note: The macro and file name are derived from file type name.
|
---|
80 | # For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
|
---|
81 | # to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
|
---|
82 | # will be generated only when this macro is used in command line.
|
---|
83 | # This is intended to get over the long command line limitation.
|
---|
84 | # )
|
---|
85 | # $(DEPS_FLAGS) This is a tool flag to have c compiler generate dependent header file list for a source file.
|
---|
86 | # To enable incremental build, this flag must apply to $(CC), $(VFRPP), $(PP), $(ASLCC) and $(ASLPP).
|
---|
87 | #
|
---|
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 | #
|
---|
97 | # Don't change following names of file types and their associated files,
|
---|
98 | # 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 |
|
---|
108 | ## Build Rule Version Number
|
---|
109 | # build_rule_version=0.1
|
---|
110 | #
|
---|
111 |
|
---|
112 | [C-Code-File]
|
---|
113 | <InputFile>
|
---|
114 | ?.c
|
---|
115 | ?.C
|
---|
116 | ?.cc
|
---|
117 | ?.CC
|
---|
118 | ?.cpp
|
---|
119 | ?.Cpp
|
---|
120 | ?.CPP
|
---|
121 |
|
---|
122 | <ExtraDependency>
|
---|
123 | $(MAKE_FILE)
|
---|
124 |
|
---|
125 | <OutputFile>
|
---|
126 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
127 |
|
---|
128 | <Command.MSFT, Command.INTEL>
|
---|
129 | "$(CC)" /Fo${dst} $(DEPS_FLAGS) $(CC_FLAGS) $(INC) ${src}
|
---|
130 |
|
---|
131 | <Command.GCC>
|
---|
132 | "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
|
---|
133 |
|
---|
134 | <Command.XCODE>
|
---|
135 | "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -o ${dst} $(INC) ${src}
|
---|
136 |
|
---|
137 | [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]
|
---|
138 | <InputFile>
|
---|
139 | ?.c
|
---|
140 |
|
---|
141 | <ExtraDependency>
|
---|
142 | $(MAKE_FILE)
|
---|
143 |
|
---|
144 | <OutputFile>
|
---|
145 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
146 |
|
---|
147 | <Command.GCC>
|
---|
148 | "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src}
|
---|
149 |
|
---|
150 | [C-Header-File]
|
---|
151 | <InputFile>
|
---|
152 | *.h, *.H
|
---|
153 |
|
---|
154 | <OutputFile>
|
---|
155 |
|
---|
156 | <Command>
|
---|
157 |
|
---|
158 | [Assembly-Code-File.COMMON.COMMON]
|
---|
159 | <InputFile.MSFT, InputFile.INTEL>
|
---|
160 | ?.asm, ?.Asm, ?.ASM
|
---|
161 |
|
---|
162 | <InputFile.GCC>
|
---|
163 | ?.S, ?.s
|
---|
164 |
|
---|
165 | <ExtraDependency>
|
---|
166 | $(MAKE_FILE)
|
---|
167 |
|
---|
168 | <OutputFile>
|
---|
169 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
170 |
|
---|
171 | <Command.MSFT, Command.INTEL>
|
---|
172 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
173 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
174 | Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
---|
175 | "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
---|
176 |
|
---|
177 | <Command.GCC>
|
---|
178 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
179 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
180 | Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
---|
181 | "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
|
---|
182 |
|
---|
183 | [Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64]
|
---|
184 | # Remove --convert-hex for ARM as it breaks MSFT assemblers
|
---|
185 | <InputFile.MSFT, InputFile.INTEL>
|
---|
186 | ?.asm, ?.Asm, ?.ASM
|
---|
187 |
|
---|
188 | <InputFile.GCC>
|
---|
189 | ?.S, ?.s
|
---|
190 |
|
---|
191 | <ExtraDependency>
|
---|
192 | $(MAKE_FILE)
|
---|
193 |
|
---|
194 | <OutputFile>
|
---|
195 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
196 |
|
---|
197 | <Command.INTEL>
|
---|
198 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
199 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
200 | Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
---|
201 | "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
---|
202 |
|
---|
203 | <Command.MSFT>
|
---|
204 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
205 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
206 | Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
---|
207 | "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
---|
208 |
|
---|
209 | <Command.GCC>
|
---|
210 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
211 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
212 | Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
---|
213 | "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
|
---|
214 |
|
---|
215 | [Nasm-Assembly-Code-File.COMMON.COMMON]
|
---|
216 | <InputFile>
|
---|
217 | ?.nasm
|
---|
218 |
|
---|
219 | <ExtraDependency>
|
---|
220 | $(MAKE_FILE)
|
---|
221 |
|
---|
222 | <OutputFile>
|
---|
223 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
224 |
|
---|
225 | <Command>
|
---|
226 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
227 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
228 | Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
---|
229 | "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
|
---|
230 |
|
---|
231 | [Device-Tree-Source-File]
|
---|
232 | <InputFile>
|
---|
233 | ?.dts
|
---|
234 |
|
---|
235 | <ExtraDependency>
|
---|
236 | $(MAKE_FILE)
|
---|
237 |
|
---|
238 | <OutputFile>
|
---|
239 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dtb
|
---|
240 |
|
---|
241 | <Command.GCC>
|
---|
242 | "$(DTCPP)" $(DTCPP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
|
---|
243 | "$(DTC)" $(DTC_FLAGS) -I dts -O dtb -o ${dst} ${d_path}(+)${s_base}.i
|
---|
244 |
|
---|
245 | [Visual-Form-Representation-File]
|
---|
246 | <InputFile>
|
---|
247 | ?.vfr
|
---|
248 | ?.Vfr
|
---|
249 | ?.VFR
|
---|
250 |
|
---|
251 | <ExtraDependency>
|
---|
252 | $(MAKE_FILE)
|
---|
253 |
|
---|
254 | <OutputFile>
|
---|
255 | $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
|
---|
256 |
|
---|
257 | <Command>
|
---|
258 | "$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
|
---|
259 | "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
|
---|
260 |
|
---|
261 | [Object-File]
|
---|
262 | <InputFile>
|
---|
263 | *.obj
|
---|
264 | *.o
|
---|
265 |
|
---|
266 | <OutputFile>
|
---|
267 | $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
|
---|
268 |
|
---|
269 | <Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
---|
270 | "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
|
---|
271 |
|
---|
272 | <Command.GCC>
|
---|
273 | $(RM) ${dst}
|
---|
274 | "$(SLINK)" cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
|
---|
275 |
|
---|
276 | <Command.XCODE>
|
---|
277 | "$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
|
---|
278 |
|
---|
279 | [Static-Library-File]
|
---|
280 | <InputFile>
|
---|
281 | *.lib
|
---|
282 |
|
---|
283 | <ExtraDependency>
|
---|
284 | $(MAKE_FILE)
|
---|
285 |
|
---|
286 | <OutputFile>
|
---|
287 | $(DEBUG_DIR)(+)$(MODULE_NAME).dll
|
---|
288 |
|
---|
289 | <Command.MSFT, Command.INTEL>
|
---|
290 | "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
---|
291 | "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
---|
292 |
|
---|
293 | <Command.CLANGPDB>
|
---|
294 | "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
---|
295 |
|
---|
296 | <Command.GCC>
|
---|
297 | "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
|
---|
298 | "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
|
---|
299 |
|
---|
300 | <Command.XCODE>
|
---|
301 | "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
---|
302 |
|
---|
303 |
|
---|
304 | [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]
|
---|
305 | <InputFile>
|
---|
306 | *.lib
|
---|
307 |
|
---|
308 | <ExtraDependency>
|
---|
309 | $(MAKE_FILE)
|
---|
310 |
|
---|
311 | <OutputFile>
|
---|
312 | $(DEBUG_DIR)(+)$(MODULE_NAME).dll
|
---|
313 |
|
---|
314 | <Command.GCC>
|
---|
315 | "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(CC_XIPFLAGS) $(DLINK2_FLAGS)
|
---|
316 | "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
|
---|
317 |
|
---|
318 |
|
---|
319 | [Static-Library-File.USER_DEFINED, Static-Library-File.HOST_APPLICATION]
|
---|
320 | <InputFile>
|
---|
321 | *.lib
|
---|
322 |
|
---|
323 | <ExtraDependency>
|
---|
324 | $(MAKE_FILE)
|
---|
325 |
|
---|
326 | <OutputFile>
|
---|
327 | $(DEBUG_DIR)(+)$(MODULE_NAME)
|
---|
328 |
|
---|
329 | <Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
---|
330 | "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
---|
331 |
|
---|
332 | <Command.GCC>
|
---|
333 | "$(DLINK)" $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
|
---|
334 |
|
---|
335 | <Command.XCODE>
|
---|
336 | "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
---|
337 |
|
---|
338 |
|
---|
339 | [Dynamic-Library-File]
|
---|
340 | <InputFile>
|
---|
341 | ?.dll
|
---|
342 |
|
---|
343 | <OutputFile>
|
---|
344 | $(OUTPUT_DIR)(+)$(MODULE_NAME).efi
|
---|
345 | $(OUTPUT_DIR)(+)$(MODULE_NAME).map
|
---|
346 |
|
---|
347 | # vbox: Fixing no-rule-to-make ..\DEBUG\mod.efi
|
---|
348 | # Note! Listing .efi more than once causes trouble in ModuleAutoGen.py::_ApplyBuildRule for
|
---|
349 | # VBoxVgaDxe, so that required hacking as well to make this fix work.
|
---|
350 | <OutputFile.GCC>
|
---|
351 | $(DEBUG_DIR)(+)$(MODULE_NAME).efi
|
---|
352 | $(DEBUG_DIR)(+)$(MODULE_NAME).debug
|
---|
353 | $(DEBUG_DIR)(+)$(MODULE_NAME).efi-tmp
|
---|
354 | $(DEBUG_DIR)(+)$(MODULE_NAME).map
|
---|
355 | $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
---|
356 | $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
|
---|
357 |
|
---|
358 | <Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
---|
359 | "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
|
---|
360 | $(CP) ${dst} $(DEBUG_DIR)
|
---|
361 | $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
---|
362 | -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
---|
363 | -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
|
---|
364 | <Command.GCC>
|
---|
365 | # vbox 2024-11-18 bird: This crap modifies the source file, causing EnglishDxe to spin forever
|
---|
366 | # $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
|
---|
367 | # "$(OBJCOPY)" $(OBJCOPY_STRIPFLAG) ${src}
|
---|
368 | #
|
---|
369 | # #
|
---|
370 | # #The below 2 lines are only needed for UNIXGCC tool chain, which generates PE image directly
|
---|
371 | # #
|
---|
372 | # -"$(OBJCOPY)" $(OBJCOPY_ADDDEBUGFLAG) ${src}
|
---|
373 | # -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
|
---|
374 | #
|
---|
375 | # "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
|
---|
376 | # $(CP) ${dst} $(DEBUG_DIR)
|
---|
377 | # $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
---|
378 | # -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
---|
379 | # Rewritten:
|
---|
380 | $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
|
---|
381 | $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).efi-tmp
|
---|
382 | "$(OBJCOPY)" $(OBJCOPY_STRIPFLAG) $(DEBUG_DIR)(+)$(MODULE_NAME).efi-tmp
|
---|
383 | "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).efi-tmp $(GENFW_FLAGS)
|
---|
384 | $(CP) ${dst} $(DEBUG_DIR)
|
---|
385 | $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
---|
386 | $(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
|
---|
387 | -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).map $(OUTPUT_DIR)
|
---|
388 |
|
---|
389 | <Command.XCODE>
|
---|
390 | # tool to convert Mach-O to PE/COFF
|
---|
391 | "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
|
---|
392 | # create symbol file for GDB debug
|
---|
393 | -$(DSYMUTIL) ${src}
|
---|
394 | "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
|
---|
395 | $(CP) ${dst} $(DEBUG_DIR)
|
---|
396 | $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
---|
397 | -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
---|
398 |
|
---|
399 | [Dependency-Expression-File]
|
---|
400 | <InputFile>
|
---|
401 | ?.dxs, ?.Dxs, ?.DXS
|
---|
402 |
|
---|
403 | <OutputFile>
|
---|
404 | $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
|
---|
405 |
|
---|
406 | <ExtraDependency>
|
---|
407 | $(MAKE_FILE)
|
---|
408 |
|
---|
409 | <Command>
|
---|
410 | "$(PP)" $(DEPS_FLAGS) $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
---|
411 | Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
---|
412 | GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
---|
413 |
|
---|
414 | [Acpi-Source-Language-File]
|
---|
415 | <InputFile>
|
---|
416 | ?.asl, ?.Asl, ?.ASL
|
---|
417 |
|
---|
418 | <OutputFile>
|
---|
419 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
|
---|
420 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
---|
421 |
|
---|
422 | <ExtraDependency>
|
---|
423 | $(MAKE_FILE)
|
---|
424 |
|
---|
425 | <Command.MSFT, Command.INTEL>
|
---|
426 | Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
427 | "$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
---|
428 | Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
---|
429 | "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
|
---|
430 | $(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
---|
431 |
|
---|
432 | <Command.GCC>
|
---|
433 | Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
434 | "$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
---|
435 | Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
---|
436 | "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
|
---|
437 | $(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
---|
438 |
|
---|
439 | [Acpi-Machine-Language-File-to-C.DXE_DRIVER]
|
---|
440 | <InputFile>
|
---|
441 | ?.amli
|
---|
442 |
|
---|
443 | <OutputFile>
|
---|
444 | ${s_path}(+)${s_base}.c
|
---|
445 |
|
---|
446 | <Command>
|
---|
447 | -AmlToC ${src}
|
---|
448 |
|
---|
449 | [C-Code-File.AcpiTable]
|
---|
450 | <InputFile>
|
---|
451 | ?.c
|
---|
452 |
|
---|
453 | <OutputFile>
|
---|
454 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
|
---|
455 |
|
---|
456 | <ExtraDependency>
|
---|
457 | $(MAKE_FILE)
|
---|
458 |
|
---|
459 | <Command.MSFT, Command.INTEL>
|
---|
460 | "$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
461 | "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
462 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
---|
463 |
|
---|
464 | <Command.GCC>
|
---|
465 | "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
466 | "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
467 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
---|
468 |
|
---|
469 | [Acpi-Table-Code-File]
|
---|
470 | <InputFile>
|
---|
471 | ?.aslc, ?.act
|
---|
472 |
|
---|
473 | <OutputFile>
|
---|
474 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
|
---|
475 |
|
---|
476 | <ExtraDependency>
|
---|
477 | $(MAKE_FILE)
|
---|
478 |
|
---|
479 | <Command.MSFT, Command.INTEL>
|
---|
480 | "$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
481 | "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
482 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
---|
483 |
|
---|
484 | <Command.GCC>
|
---|
485 | "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
486 | "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
487 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
---|
488 |
|
---|
489 | <Command.CLANGPDB>
|
---|
490 | "$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
491 | "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
492 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
---|
493 |
|
---|
494 | <Command.XCODE>
|
---|
495 | "$(ASLCC)" $(DEPS_FLAGS) -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
---|
496 | "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
497 | "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff
|
---|
498 | "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff $(GENFW_FLAGS)
|
---|
499 |
|
---|
500 |
|
---|
501 | [Masm16-Code-File]
|
---|
502 | <InputFile>
|
---|
503 | ?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
|
---|
504 |
|
---|
505 | <ExtraDependency>
|
---|
506 | $(MAKE_FILE)
|
---|
507 |
|
---|
508 | <OutputFile>
|
---|
509 | $(OUTPUT_DIR)(+)${s_base}.com
|
---|
510 |
|
---|
511 | <Command.MSFT, Command.INTEL>
|
---|
512 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
513 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
514 | Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
---|
515 | cd $(OUTPUT_DIR)(+)${s_dir}
|
---|
516 | "$(ASM16)" /nologo /c /omf $(ASM16_FLAGS) $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
|
---|
517 | "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
|
---|
518 |
|
---|
519 | <Command.GCC>
|
---|
520 | Trim --asm-file -o {d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
521 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
522 | Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
---|
523 | "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
|
---|
524 | "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
|
---|
525 |
|
---|
526 | <Command.XCODE>
|
---|
527 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
528 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
529 | Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
---|
530 | "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
|
---|
531 | "$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
---|
532 | otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
|
---|
533 |
|
---|
534 |
|
---|
535 | [Nasm-to-Binary-Code-File]
|
---|
536 | <InputFile>
|
---|
537 | ?.nasmb
|
---|
538 |
|
---|
539 | <ExtraDependency>
|
---|
540 | $(MAKE_FILE)
|
---|
541 |
|
---|
542 | <OutputFile>
|
---|
543 | $(OUTPUT_DIR)(+)${s_base}.bin
|
---|
544 |
|
---|
545 | <Command>
|
---|
546 | Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
---|
547 | "$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
---|
548 | Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
---|
549 | "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) $(NASM_INC) -o $dst ${d_path}(+)${s_base}.iii
|
---|
550 | # copy the output file with .com postfix that be same to the output file of .asm16
|
---|
551 | $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com
|
---|
552 |
|
---|
553 | [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
|
---|
554 | <InputFile>
|
---|
555 | ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
|
---|
556 |
|
---|
557 | <OutputFile>
|
---|
558 | $(OUTPUT_DIR)(+)${s_base}.mcb
|
---|
559 |
|
---|
560 | <Command>
|
---|
561 | "$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
|
---|
562 |
|
---|
563 | [Microcode-Binary-File]
|
---|
564 | <InputFile>
|
---|
565 | *.mcb
|
---|
566 |
|
---|
567 | <ExtraDependency>
|
---|
568 | $(MAKE_FILE)
|
---|
569 |
|
---|
570 | <OutputFile>
|
---|
571 | $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
|
---|
572 |
|
---|
573 | <Command>
|
---|
574 | "$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
|
---|
575 | -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
|
---|
576 |
|
---|
577 | [EFI-Image-File]
|
---|
578 | <InputFile>
|
---|
579 | ?.efi, ?.Efi, ?.EFI
|
---|
580 |
|
---|
581 | <OutputFile>
|
---|
582 |
|
---|
583 | <Command>
|
---|
584 |
|
---|
585 | [Unicode-Text-File]
|
---|
586 | <InputFile>
|
---|
587 | *.uni, *.Uni, *.UNI
|
---|
588 |
|
---|
589 | <OutputFile>
|
---|
590 | $(DEBUG_DIR)(+)AutoGen.c
|
---|
591 | $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
|
---|
592 | $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
|
---|
593 |
|
---|
594 | <Command>
|
---|
595 |
|
---|
596 | [Image-Definition-File]
|
---|
597 | <InputFile>
|
---|
598 | *.idf, *.Idf, *.IDF
|
---|
599 |
|
---|
600 | <OutputFile>
|
---|
601 | $(DEBUG_DIR)(+)AutoGen.c
|
---|
602 | $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
|
---|
603 | $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
|
---|
604 |
|
---|
605 | <Command>
|
---|
606 |
|
---|
607 | [Efi-Image.UEFI_OPTIONROM]
|
---|
608 | <InputFile>
|
---|
609 | ?.efi, ?.EFI, ?.Efi
|
---|
610 |
|
---|
611 | <OutputFile>
|
---|
612 | $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
|
---|
613 |
|
---|
614 | <Command>
|
---|
615 | $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
|
---|
616 |
|
---|
617 | [Unicode-Text-File.UEFI_HII]
|
---|
618 | <InputFile>
|
---|
619 | *.uni, *.Uni, *.UNI
|
---|
620 |
|
---|
621 | <OutputFile>
|
---|
622 | $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
|
---|
623 | $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
|
---|
624 |
|
---|
625 | <Command>
|
---|
626 |
|
---|
627 | [Image-Definition-File.UEFI_HII]
|
---|
628 | <InputFile>
|
---|
629 | *.idf, *.Idf, *.IDF
|
---|
630 |
|
---|
631 | <OutputFile>
|
---|
632 | $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
|
---|
633 | $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
|
---|
634 |
|
---|
635 | <Command>
|
---|
636 |
|
---|
637 | [Visual-Form-Representation-File.UEFI_HII]
|
---|
638 | <InputFile>
|
---|
639 | ?.vfr
|
---|
640 | ?.Vfr
|
---|
641 | ?.VFR
|
---|
642 |
|
---|
643 | <ExtraDependency>
|
---|
644 | $(MAKE_FILE)
|
---|
645 |
|
---|
646 | <OutputFile>
|
---|
647 | $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
|
---|
648 |
|
---|
649 | <Command>
|
---|
650 | "$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
---|
651 | "$(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
|
---|
652 |
|
---|
653 | [Hii-Binary-Package.UEFI_HII]
|
---|
654 | <InputFile>
|
---|
655 | *.hpk
|
---|
656 |
|
---|
657 | <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC, OutputFile.CLANGPDB>
|
---|
658 | $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
|
---|
659 |
|
---|
660 | <OutputFile.XCODE>
|
---|
661 | $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
|
---|
662 |
|
---|
663 | <Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
---|
664 | "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|
---|
665 | "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
|
---|
666 |
|
---|
667 | <Command.GCC>
|
---|
668 | "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|
---|
669 | "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
|
---|
670 | <Command.XCODE>
|
---|
671 | "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|
---|