2007-10-17 03:54:36 +02:00
|
|
|
#
|
2018-08-09 03:25:09 +02:00
|
|
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
2010-10-11 08:26:52 +02:00
|
|
|
# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
|
2020-02-05 15:52:03 +01:00
|
|
|
# Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
|
2019-04-04 01:03:11 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2007-10-17 03:54:36 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
## Syntax
|
|
|
|
#
|
|
|
|
# "*" is used to indicate that the source files will be processed at the same time.
|
|
|
|
# "?" is used to indicate that the source files will be processed one by one.
|
|
|
|
#
|
2008-08-12 09:54:36 +02:00
|
|
|
# "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
|
2007-10-17 03:54:36 +02:00
|
|
|
# <InputFile[.<ToolChainFamily>]> <EOL>
|
2008-08-12 09:54:36 +02:00
|
|
|
# (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
|
2007-10-17 03:54:36 +02:00
|
|
|
#
|
|
|
|
# <OutputFile[.<ToolChainFamily>]> <EOL>
|
|
|
|
# <FileFullPath>
|
|
|
|
#
|
2008-08-12 09:54:36 +02:00
|
|
|
# <ExtraDependency>
|
|
|
|
# <FileFullPath>
|
|
|
|
#
|
2007-10-17 03:54:36 +02:00
|
|
|
# <Command[.<ToolChainFamily>]> <EOL>
|
|
|
|
# <Command1>
|
|
|
|
# [<Command2>]
|
|
|
|
#
|
2008-08-12 09:54:36 +02:00
|
|
|
# <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK.
|
|
|
|
# Missing <InputFile> will cause an exception and break build.
|
|
|
|
# Missing <Command> will cause that related build target won't be generated but
|
|
|
|
# won't break build.
|
|
|
|
#
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
## Placeholders for string substitution
|
|
|
|
#
|
|
|
|
# ${src} Source file(s) to be built (full path)
|
|
|
|
# ${s_path} Source file directory (absolute path)
|
|
|
|
# ${s_dir} Source file relative directory within a module
|
|
|
|
# (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
|
|
|
|
# ${s_name} Source file name without path
|
|
|
|
# ${s_base} Source file name without extension and path
|
|
|
|
# ${s_ext} Source file extension
|
|
|
|
#
|
|
|
|
# ${dst} Destination file(s) built from ${src} (full path)
|
|
|
|
# ${d_path} Destination file directory (absolute path)
|
|
|
|
# ${d_name} Destination file name without path
|
|
|
|
# ${d_base} Destination file name without extension and path
|
|
|
|
# ${d_ext} Destination file extension
|
|
|
|
#
|
|
|
|
# (+) Directory separator
|
|
|
|
#
|
|
|
|
|
|
|
|
## Macro
|
|
|
|
# $(WORKSPACE) Workspace directory
|
|
|
|
# $(OUTPUT_DIR) Directory for intermediate files for building a module
|
|
|
|
# $(DEBUG_DIR) Directory for files used to debug a module
|
|
|
|
# $(BUILD_DIR) All files for building a platform will be put in this directory
|
|
|
|
# $(BIN_DIR) Common directory for executable files
|
|
|
|
# $(FV_DIR) Directory to store flash image files
|
|
|
|
# $(INC) Search path of current module
|
2018-12-14 02:47:12 +01:00
|
|
|
# $(NASM_INC) Search nasm file path of current module
|
2019-02-06 08:44:39 +01:00
|
|
|
# $(INC_LIST) A file containing search paths of current module
|
2007-10-17 03:54:36 +02:00
|
|
|
# $(LIBS) Static library files of current module
|
|
|
|
# $(<tool>_FLAGS) Tools flags of current module
|
|
|
|
# $(MODULE_NAME) Current module name
|
2015-06-10 09:50:59 +02:00
|
|
|
# $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
|
|
|
|
# in different modules, otherwise its value is same as $(MODULE_NAME)
|
2007-10-17 03:54:36 +02:00
|
|
|
# $(MODULE_TYPE) Current module type
|
2009-11-09 12:47:35 +01:00
|
|
|
# $(MODULE_GUID) Current module guid
|
2007-10-17 03:54:36 +02:00
|
|
|
# $(ARCH) Architecture of current module
|
|
|
|
# $(TOOLCHAIN) Toolchain used to build current module
|
|
|
|
# $(TARGET) Target of current module (DEBUG/RELEASE)
|
|
|
|
# $(<tool>) Path of tool
|
|
|
|
# $(EDK_TOOLS_PATH) Path of build tools
|
2008-12-31 07:06:11 +01:00
|
|
|
# $(<FILE_TYPES>) File list of each file type
|
2007-10-17 03:54:36 +02:00
|
|
|
# (Note: The macro name is derived from file type name. For example,
|
2008-12-31 07:06:11 +01:00
|
|
|
# C-Code-File will have C_CODE_FILES macro.)
|
|
|
|
# $(<FILE_TYPES_LIST>) Macro point to a file containing list of files of a file type
|
|
|
|
# (
|
|
|
|
# Note: The macro and file name are derived from file type name.
|
2009-02-16 14:37:23 +01:00
|
|
|
# For example, C-Code-File will have C_CODE_FILES_LIST macro pointing
|
2008-12-31 07:06:11 +01:00
|
|
|
# to $(OUTPUT_DIR)/c_code_files.lst. The list file and macro name
|
|
|
|
# will be generated only when this macro is used in command line.
|
|
|
|
# This is intended to get over the long command line limitation.
|
|
|
|
# )
|
2019-12-02 09:25:32 +01:00
|
|
|
# $(DEPS_FLAGS) This is a tool flag to have c compiler generate dependent header file list for a source file.
|
|
|
|
# To enable incremental build, this flag must apply to $(CC), $(VFRPP), $(PP), $(ASLCC) and $(ASLPP).
|
2007-10-17 03:54:36 +02:00
|
|
|
#
|
|
|
|
# $(CP) copy command
|
|
|
|
# $(MV) move command
|
|
|
|
# $(RM) delete command
|
|
|
|
# $(MD) create dir command
|
|
|
|
# $(RD) remove dir command
|
|
|
|
#
|
|
|
|
|
|
|
|
## Reserved File-Type
|
|
|
|
#
|
2007-12-25 10:17:00 +01:00
|
|
|
# Don't change following names of file types and their associated files,
|
2007-10-17 03:54:36 +02:00
|
|
|
# which are also used in tools' code
|
|
|
|
#
|
|
|
|
# C-Code-File
|
|
|
|
# C-Header-File
|
|
|
|
# Dynamic-Library-File
|
|
|
|
# Static-Library-File
|
|
|
|
# Visual-Form-Representation-File
|
|
|
|
# Unicode-Text-File
|
|
|
|
#
|
|
|
|
|
2012-04-10 09:18:20 +02:00
|
|
|
## Build Rule Version Number
|
|
|
|
# build_rule_version=0.1
|
|
|
|
#
|
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[C-Code-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
?.c
|
|
|
|
?.C
|
|
|
|
?.cc
|
|
|
|
?.CC
|
|
|
|
?.cpp
|
|
|
|
?.Cpp
|
|
|
|
?.CPP
|
2008-08-12 09:54:36 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
2008-06-05 09:36:19 +02:00
|
|
|
$(MAKE_FILE)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
|
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(CC)" /Fo${dst} $(DEPS_FLAGS) $(CC_FLAGS) $(INC) ${src}
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2015-08-12 07:25:48 +02:00
|
|
|
<Command.XCODE>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -o ${dst} $(INC) ${src}
|
2010-03-12 11:54:01 +01:00
|
|
|
|
2016-08-08 12:33:06 +02:00
|
|
|
[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]
|
2016-01-11 09:50:39 +01:00
|
|
|
<InputFile>
|
|
|
|
?.c
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<Command.GCC>
|
2022-12-08 17:22:11 +01:00
|
|
|
"$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src}
|
2016-01-11 09:50:39 +01:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[C-Header-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
*.h, *.H
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Assembly-Code-File.COMMON.COMMON]
|
2022-05-03 20:48:20 +02:00
|
|
|
<InputFile.MSFT, InputFile.INTEL>
|
2008-08-12 09:54:36 +02:00
|
|
|
?.asm, ?.Asm, ?.ASM
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<InputFile.GCC>
|
2009-04-13 14:50:50 +02:00
|
|
|
?.S, ?.s
|
2008-08-12 09:54:36 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
2008-06-05 09:36:19 +02:00
|
|
|
$(MAKE_FILE)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
|
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
|
2018-01-12 14:33:31 +01:00
|
|
|
|
2018-02-23 10:50:03 +01:00
|
|
|
[Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64]
|
2018-01-12 14:33:31 +01:00
|
|
|
# Remove --convert-hex for ARM as it breaks MSFT assemblers
|
2022-05-03 20:48:20 +02:00
|
|
|
<InputFile.MSFT, InputFile.INTEL>
|
2018-01-12 14:33:31 +01:00
|
|
|
?.asm, ?.Asm, ?.ASM
|
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<InputFile.GCC>
|
2018-01-12 14:33:31 +01:00
|
|
|
?.S, ?.s
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
|
|
|
|
<Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
2018-01-12 14:33:31 +01:00
|
|
|
|
|
|
|
<Command.MSFT>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iiii
|
2018-01-12 14:33:31 +01:00
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2014-09-01 19:22:51 +02:00
|
|
|
[Nasm-Assembly-Code-File.COMMON.COMMON]
|
|
|
|
<InputFile>
|
2015-06-02 01:21:00 +02:00
|
|
|
?.nasm
|
2014-09-01 19:22:51 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
|
|
|
|
<Command>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
2018-12-14 02:47:12 +01:00
|
|
|
"$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2017-08-29 15:21:02 +02:00
|
|
|
[Device-Tree-Source-File]
|
|
|
|
<InputFile>
|
|
|
|
?.dts
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dtb
|
|
|
|
|
|
|
|
<Command.GCC>
|
2018-02-27 18:47:06 +01:00
|
|
|
"$(DTCPP)" $(DTCPP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
|
2018-01-05 10:24:22 +01:00
|
|
|
"$(DTC)" $(DTC_FLAGS) -I dts -O dtb -o ${dst} ${d_path}(+)${s_base}.i
|
2017-08-29 15:21:02 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Visual-Form-Representation-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
?.vfr
|
|
|
|
?.Vfr
|
|
|
|
?.VFR
|
2008-08-12 09:54:36 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
2008-06-05 09:36:19 +02:00
|
|
|
$(MAKE_FILE)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
|
|
|
|
|
|
|
|
<Command>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
|
2011-11-25 07:21:03 +01:00
|
|
|
"$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Object-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
*.obj
|
|
|
|
*.o
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME).lib
|
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
2009-04-13 14:50:50 +02:00
|
|
|
"$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2018-08-09 03:25:09 +02:00
|
|
|
$(RM) ${dst}
|
2016-08-03 11:43:03 +02:00
|
|
|
"$(SLINK)" cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
|
2009-09-11 05:14:43 +02:00
|
|
|
|
|
|
|
<Command.XCODE>
|
|
|
|
"$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Static-Library-File]
|
|
|
|
<InputFile>
|
2008-12-31 06:53:26 +01:00
|
|
|
*.lib
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
<ExtraDependency>
|
2007-11-08 04:57:35 +01:00
|
|
|
$(MAKE_FILE)
|
2007-10-29 19:34:07 +01:00
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME).dll
|
|
|
|
|
|
|
|
<Command.MSFT, Command.INTEL>
|
2017-08-24 06:38:01 +02:00
|
|
|
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
2009-04-13 14:50:50 +02:00
|
|
|
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<Command.CLANGPDB>
|
2019-10-17 08:55:46 +02:00
|
|
|
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
|
|
|
|
2016-07-23 10:19:46 +02:00
|
|
|
<Command.GCC>
|
2016-08-02 16:31:26 +02:00
|
|
|
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
|
2016-07-23 10:19:46 +02:00
|
|
|
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
|
|
|
|
|
2009-09-11 05:14:43 +02:00
|
|
|
<Command.XCODE>
|
|
|
|
"$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
|
|
|
|
|
|
|
|
BaseTools: Add VS2022 XIPFLAGS
BaseTools has a limitation that modules in FVs that are force rebased
must have the same file and section alignment. This is intended for
XIP modules.
VS2019 and previous VS toolchains did not set 4k section alignment,
but VS2022 does, in order for memory protections to be applied to
images. This causes issues when building SEC and PEI modules on
VS2022 as the file alignment is 0x20 but the section alignment
is 0x1000, so BaseTools will fail to generate the FV. One option
is to set the file alignment to 0x1000 for all of these files, but
that is a large waste of space and is not feasible on some platforms
that have limited flash space. The other option is to selectively
set 0x20 as the section alignment for SEC and PEI modules, which is
the approach GCC ARM/AARCH64 took.
This is only an issue for building 64-bit PEI on x86 currently, as
other architectures are not supported by VS2022 in edk2 yet. For IA32,
the section alignment is set to 0x20 and so it matches the file
alignment, however x64 PEI uses the X64 DLINK flags which have 0x1000
set. For other architectures that don't have the PEI/DXE architecture
split, this is also an issue.
This commit is required to use VS2022 as the default CI in edk2, as
OvmfPkgX64.dsc will fail to build. Any platform with 64-bit PEI also
requires this.
This commit also updates CryptoPkg.dsc and SecurityPkg.dsc as they
are setting custom section alignments.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-03 23:44:02 +01:00
|
|
|
[Static-Library-File.SEC, Static-Library-File.PEI_CORE, Static-Library-File.PEIM]
|
2016-07-27 12:08:20 +02:00
|
|
|
<InputFile>
|
|
|
|
*.lib
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME).dll
|
|
|
|
|
BaseTools: Add VS2022 XIPFLAGS
BaseTools has a limitation that modules in FVs that are force rebased
must have the same file and section alignment. This is intended for
XIP modules.
VS2019 and previous VS toolchains did not set 4k section alignment,
but VS2022 does, in order for memory protections to be applied to
images. This causes issues when building SEC and PEI modules on
VS2022 as the file alignment is 0x20 but the section alignment
is 0x1000, so BaseTools will fail to generate the FV. One option
is to set the file alignment to 0x1000 for all of these files, but
that is a large waste of space and is not feasible on some platforms
that have limited flash space. The other option is to selectively
set 0x20 as the section alignment for SEC and PEI modules, which is
the approach GCC ARM/AARCH64 took.
This is only an issue for building 64-bit PEI on x86 currently, as
other architectures are not supported by VS2022 in edk2 yet. For IA32,
the section alignment is set to 0x20 and so it matches the file
alignment, however x64 PEI uses the X64 DLINK flags which have 0x1000
set. For other architectures that don't have the PEI/DXE architecture
split, this is also an issue.
This commit is required to use VS2022 as the default CI in edk2, as
OvmfPkgX64.dsc will fail to build. Any platform with 64-bit PEI also
requires this.
This commit also updates CryptoPkg.dsc and SecurityPkg.dsc as they
are setting custom section alignments.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-03 23:44:02 +01:00
|
|
|
<Command.MSFT>
|
|
|
|
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_XIPFLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
|
|
|
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
|
|
|
|
2016-08-11 12:57:53 +02:00
|
|
|
<Command.GCC>
|
|
|
|
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(CC_XIPFLAGS) $(DLINK2_FLAGS)
|
2016-07-27 12:08:20 +02:00
|
|
|
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
|
|
|
|
|
|
|
|
|
2019-07-01 08:19:13 +02:00
|
|
|
[Static-Library-File.USER_DEFINED, Static-Library-File.HOST_APPLICATION]
|
2009-02-16 14:37:23 +01:00
|
|
|
<InputFile>
|
|
|
|
*.lib
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME)
|
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
2009-04-13 14:50:50 +02:00
|
|
|
"$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
|
2009-02-16 14:37:23 +01:00
|
|
|
|
2016-07-23 10:19:46 +02:00
|
|
|
<Command.GCC>
|
|
|
|
"$(DLINK)" $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
|
|
|
|
|
2009-09-11 05:14:43 +02:00
|
|
|
<Command.XCODE>
|
|
|
|
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
|
|
|
|
|
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Dynamic-Library-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
?.dll
|
|
|
|
|
|
|
|
<OutputFile>
|
2019-04-03 04:17:02 +02:00
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME).efi
|
2022-04-07 19:04:20 +02:00
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME).map
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
|
2019-04-03 04:17:02 +02:00
|
|
|
$(CP) ${dst} $(DEBUG_DIR)
|
2015-06-10 09:50:59 +02:00
|
|
|
$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
2010-03-01 00:39:39 +01:00
|
|
|
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
2014-08-28 15:53:34 +02:00
|
|
|
-$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2013-08-23 04:18:16 +02:00
|
|
|
$(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
|
2023-04-24 15:39:59 +02:00
|
|
|
"$(OBJCOPY)" $(OBJCOPY_STRIPFLAG) ${src}
|
2011-05-11 12:26:49 +02:00
|
|
|
|
|
|
|
#
|
2019-02-06 08:44:39 +01:00
|
|
|
#The below 2 lines are only needed for UNIXGCC tool chain, which generates PE image directly
|
2011-05-11 12:26:49 +02:00
|
|
|
#
|
2023-04-24 15:39:59 +02:00
|
|
|
-"$(OBJCOPY)" $(OBJCOPY_ADDDEBUGFLAG) ${src}
|
2015-06-10 09:50:59 +02:00
|
|
|
-$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
|
2011-05-11 12:26:49 +02:00
|
|
|
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
|
2019-04-03 04:17:02 +02:00
|
|
|
$(CP) ${dst} $(DEBUG_DIR)
|
2015-06-10 09:50:59 +02:00
|
|
|
$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
2007-10-17 03:54:36 +02:00
|
|
|
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
2009-09-11 05:14:43 +02:00
|
|
|
|
|
|
|
<Command.XCODE>
|
|
|
|
# tool to convert Mach-O to PE/COFF
|
|
|
|
"$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
|
|
|
|
# create symbol file for GDB debug
|
|
|
|
-$(DSYMUTIL) ${src}
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
|
2019-04-03 04:17:02 +02:00
|
|
|
$(CP) ${dst} $(DEBUG_DIR)
|
2015-06-10 09:50:59 +02:00
|
|
|
$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
|
2009-09-11 05:14:43 +02:00
|
|
|
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Dependency-Expression-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
?.dxs, ?.Dxs, ?.DXS
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME).depex
|
|
|
|
|
2010-06-28 11:33:10 +02:00
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<Command>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(PP)" $(DEPS_FLAGS) $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
2007-12-22 17:58:04 +01:00
|
|
|
Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
|
|
|
GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Acpi-Source-Language-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
?.asl, ?.Asl, ?.ASL
|
|
|
|
|
|
|
|
<OutputFile>
|
2008-09-10 08:51:00 +02:00
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml
|
BaseTools: Compile AML bytecode arrays into .obj file
The AmlToHex script and Posix/WindowsLike wrappers convert
an AML file to a .hex file, containing a C array storing
AML bytecode. This ".hex" file can then be included in a
C file, allowing to access the AML bytecode from this C
file.
The EDK2 build system doesn't allow to a depict dependency
orders between files of different languages. For instance,
in a module containing a ".c" file and a ".asl", the ".c"
file may or may not be built prior to the ".asl" file.
This prevents any inclusion of a generated ".hex" in a
".c" file since this later ".hex" file may or may not
have been created yet.
This patch modifies the AmlToC script to generate a C file
instead of a ".hex" file.
It also adds the generation of an intermediate ".amli" file
when compiling an ASL file, and adds a rule to convert this
".amli" to a C file.
This allows to generate a C file containing the AML bytecode
from an ASL file. This C file will then be handled by the EDK2
build system to generate an object file.
Thus, no file inclusion will be required anymore. The C file
requiring the AML bytecode as a C array, and the ASL file,
will be compiled independently. The C array must be defined
as an external symbol. The linker is resolving the
reference to the C array symbol.
To summarize, the flow goes as:
-1. ASL file is compiled to AML;
-2. AML file is copied to a ".amli" intermediate file;
-3. EDK2 build system applies the rule relevant to ".amli"
files. This is, calling the "AmlToC" script, generating
a C file from the ".amli" file;
-4. EDK2 build system applies the rule relevant to C files.
This is creating an object file.
-5. EDK2 build system links the object file containing the
AML bytecode with the object file requiring it.
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-07-01 16:06:03 +02:00
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
2010-10-11 08:26:52 +02:00
|
|
|
Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
|
|
|
"$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
|
BaseTools: Compile AML bytecode arrays into .obj file
The AmlToHex script and Posix/WindowsLike wrappers convert
an AML file to a .hex file, containing a C array storing
AML bytecode. This ".hex" file can then be included in a
C file, allowing to access the AML bytecode from this C
file.
The EDK2 build system doesn't allow to a depict dependency
orders between files of different languages. For instance,
in a module containing a ".c" file and a ".asl", the ".c"
file may or may not be built prior to the ".asl" file.
This prevents any inclusion of a generated ".hex" in a
".c" file since this later ".hex" file may or may not
have been created yet.
This patch modifies the AmlToC script to generate a C file
instead of a ".hex" file.
It also adds the generation of an intermediate ".amli" file
when compiling an ASL file, and adds a rule to convert this
".amli" to a C file.
This allows to generate a C file containing the AML bytecode
from an ASL file. This C file will then be handled by the EDK2
build system to generate an object file.
Thus, no file inclusion will be required anymore. The C file
requiring the AML bytecode as a C array, and the ASL file,
will be compiled independently. The C array must be defined
as an external symbol. The linker is resolving the
reference to the C array symbol.
To summarize, the flow goes as:
-1. ASL file is compiled to AML;
-2. AML file is copied to a ".amli" intermediate file;
-3. EDK2 build system applies the rule relevant to ".amli"
files. This is, calling the "AmlToC" script, generating
a C file from the ".amli" file;
-4. EDK2 build system applies the rule relevant to C files.
This is creating an object file.
-5. EDK2 build system links the object file containing the
AML bytecode with the object file requiring it.
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-07-01 16:06:03 +02:00
|
|
|
$(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(ASLPP)" $(DEPS_FLAGS) $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
2014-07-01 09:10:10 +02:00
|
|
|
Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
|
|
|
|
"$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
|
BaseTools: Compile AML bytecode arrays into .obj file
The AmlToHex script and Posix/WindowsLike wrappers convert
an AML file to a .hex file, containing a C array storing
AML bytecode. This ".hex" file can then be included in a
C file, allowing to access the AML bytecode from this C
file.
The EDK2 build system doesn't allow to a depict dependency
orders between files of different languages. For instance,
in a module containing a ".c" file and a ".asl", the ".c"
file may or may not be built prior to the ".asl" file.
This prevents any inclusion of a generated ".hex" in a
".c" file since this later ".hex" file may or may not
have been created yet.
This patch modifies the AmlToC script to generate a C file
instead of a ".hex" file.
It also adds the generation of an intermediate ".amli" file
when compiling an ASL file, and adds a rule to convert this
".amli" to a C file.
This allows to generate a C file containing the AML bytecode
from an ASL file. This C file will then be handled by the EDK2
build system to generate an object file.
Thus, no file inclusion will be required anymore. The C file
requiring the AML bytecode as a C array, and the ASL file,
will be compiled independently. The C array must be defined
as an external symbol. The linker is resolving the
reference to the C array symbol.
To summarize, the flow goes as:
-1. ASL file is compiled to AML;
-2. AML file is copied to a ".amli" intermediate file;
-3. EDK2 build system applies the rule relevant to ".amli"
files. This is, calling the "AmlToC" script, generating
a C file from the ".amli" file;
-4. EDK2 build system applies the rule relevant to C files.
This is creating an object file.
-5. EDK2 build system links the object file containing the
AML bytecode with the object file requiring it.
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-07-01 16:06:03 +02:00
|
|
|
$(CP) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.amli
|
|
|
|
|
|
|
|
[Acpi-Machine-Language-File-to-C.DXE_DRIVER]
|
|
|
|
<InputFile>
|
|
|
|
?.amli
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
${s_path}(+)${s_base}.c
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
-AmlToC ${src}
|
2009-03-29 20:42:14 +02:00
|
|
|
|
2008-09-01 03:18:00 +02:00
|
|
|
[C-Code-File.AcpiTable]
|
|
|
|
<InputFile>
|
|
|
|
?.c
|
|
|
|
|
|
|
|
<OutputFile>
|
2008-09-10 08:51:00 +02:00
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
|
2008-09-01 03:18:00 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2008-09-01 03:18:00 +02:00
|
|
|
"$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
2008-09-01 03:18:00 +02:00
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2009-04-14 05:20:33 +02:00
|
|
|
"$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
2009-03-29 20:42:14 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Acpi-Table-Code-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
2008-09-01 03:18:00 +02:00
|
|
|
?.aslc, ?.act
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
<OutputFile>
|
2008-09-10 08:51:00 +02:00
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2008-08-21 15:11:01 +02:00
|
|
|
"$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2022-10-04 04:03:54 +02:00
|
|
|
"$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
2019-10-17 08:55:46 +02:00
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<Command.CLANGPDB>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2019-10-17 08:55:46 +02:00
|
|
|
"$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
|
|
|
|
2009-09-11 05:14:43 +02:00
|
|
|
<Command.XCODE>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(ASLCC)" $(DEPS_FLAGS) -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLAGS) $(DEPS_FLAGS) $(INC) ${src}
|
2009-09-11 05:14:43 +02:00
|
|
|
"$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
2018-11-02 16:17:07 +01:00
|
|
|
"$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff
|
|
|
|
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff $(GENFW_FLAGS)
|
2009-09-11 05:14:43 +02:00
|
|
|
|
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Masm16-Code-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
2014-08-29 20:34:04 +02:00
|
|
|
?.asm16, ?.Asm16, ?.ASM16, ?.s16, ?.S16
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_base}.com
|
|
|
|
|
|
|
|
<Command.MSFT, Command.INTEL>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
2007-10-17 03:54:36 +02:00
|
|
|
cd $(OUTPUT_DIR)(+)${s_dir}
|
2020-09-25 09:38:22 +02:00
|
|
|
"$(ASM16)" /nologo /c /omf $(ASM16_FLAGS) $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii
|
2007-10-17 03:54:36 +02:00
|
|
|
"$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,
|
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o {d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
2009-09-11 05:14:43 +02:00
|
|
|
"$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
|
2014-07-01 09:10:10 +02:00
|
|
|
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) $(LIBS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj --end-group
|
2009-09-11 05:14:43 +02:00
|
|
|
|
|
|
|
<Command.XCODE>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
2009-09-11 05:14:43 +02:00
|
|
|
"$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
|
|
|
|
"$(SLINK)" $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
|
|
|
otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
|
|
|
|
|
|
|
|
|
2014-08-19 01:03:17 +02:00
|
|
|
[Nasm-to-Binary-Code-File]
|
|
|
|
<InputFile>
|
2015-06-02 01:21:00 +02:00
|
|
|
?.nasmb
|
2014-08-19 01:03:17 +02:00
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_base}.bin
|
|
|
|
|
|
|
|
<Command>
|
2019-12-02 09:25:32 +01:00
|
|
|
Trim --asm-file -o ${d_path}(+)${s_base}.i -i $(INC_LIST) ${src}
|
|
|
|
"$(PP)" $(DEPS_FLAGS) $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.ii
|
|
|
|
Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.ii
|
|
|
|
"$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) $(NASM_INC) -o $dst ${d_path}(+)${s_base}.iii
|
2015-06-08 11:44:57 +02:00
|
|
|
# copy the output file with .com postfix that be same to the output file of .asm16
|
|
|
|
$(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com
|
2014-08-19 01:03:17 +02:00
|
|
|
|
2009-12-29 07:16:53 +01:00
|
|
|
[Microcode-File.USER_DEFINED, Microcode-File.Microcode]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
2009-12-29 07:16:53 +01:00
|
|
|
?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc
|
2007-10-17 03:54:36 +02:00
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_base}.mcb
|
|
|
|
|
|
|
|
<Command>
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -m ${src} $(GENFW_FLAGS)
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[Microcode-Binary-File]
|
2007-10-17 03:54:36 +02:00
|
|
|
<InputFile>
|
|
|
|
*.mcb
|
|
|
|
|
2010-03-01 00:39:39 +01:00
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
2007-10-17 03:54:36 +02:00
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME).bin
|
|
|
|
|
|
|
|
<Command>
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
|
2015-06-10 09:50:59 +02:00
|
|
|
-$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
|
2007-10-17 03:54:36 +02:00
|
|
|
|
2008-08-12 09:54:36 +02:00
|
|
|
[EFI-Image-File]
|
|
|
|
<InputFile>
|
|
|
|
?.efi, ?.Efi, ?.EFI
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
|
2008-12-25 04:22:58 +01:00
|
|
|
[Unicode-Text-File]
|
|
|
|
<InputFile>
|
|
|
|
*.uni, *.Uni, *.UNI
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)AutoGen.c
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
|
2011-08-26 09:46:26 +02:00
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
|
2008-12-25 04:22:58 +01:00
|
|
|
|
|
|
|
<Command>
|
2009-05-03 08:40:59 +02:00
|
|
|
|
2016-09-21 04:39:11 +02:00
|
|
|
[Image-Definition-File]
|
|
|
|
<InputFile>
|
|
|
|
*.idf, *.Idf, *.IDF
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)AutoGen.c
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
|
2009-05-03 08:40:59 +02:00
|
|
|
[Efi-Image.UEFI_OPTIONROM]
|
|
|
|
<InputFile>
|
|
|
|
?.efi, ?.EFI, ?.Efi
|
|
|
|
|
|
|
|
<OutputFile>
|
2015-06-10 09:50:59 +02:00
|
|
|
$(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
|
2009-05-03 08:40:59 +02:00
|
|
|
|
|
|
|
<Command>
|
2009-05-05 09:31:56 +02:00
|
|
|
$(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
|
2009-05-03 08:40:59 +02:00
|
|
|
|
2009-11-09 12:47:35 +01:00
|
|
|
[Unicode-Text-File.UEFI_HII]
|
|
|
|
<InputFile>
|
|
|
|
*.uni, *.Uni, *.UNI
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
|
2016-09-21 04:39:11 +02:00
|
|
|
[Image-Definition-File.UEFI_HII]
|
|
|
|
<InputFile>
|
|
|
|
*.idf, *.Idf, *.IDF
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
|
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
|
|
|
|
|
|
|
|
<Command>
|
|
|
|
|
2009-11-09 12:47:35 +01:00
|
|
|
[Visual-Form-Representation-File.UEFI_HII]
|
|
|
|
<InputFile>
|
|
|
|
?.vfr
|
|
|
|
?.Vfr
|
|
|
|
?.VFR
|
|
|
|
|
|
|
|
<ExtraDependency>
|
|
|
|
$(MAKE_FILE)
|
|
|
|
|
|
|
|
<OutputFile>
|
|
|
|
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
|
|
|
|
|
|
|
|
<Command>
|
2019-12-02 09:25:32 +01:00
|
|
|
"$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
|
2011-08-26 09:46:26 +02:00
|
|
|
"$(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
|
2009-11-09 12:47:35 +01:00
|
|
|
|
|
|
|
[Hii-Binary-Package.UEFI_HII]
|
|
|
|
<InputFile>
|
|
|
|
*.hpk
|
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC, OutputFile.CLANGPDB>
|
2009-11-09 12:47:35 +01:00
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
|
|
|
|
|
2022-05-03 20:48:20 +02:00
|
|
|
<OutputFile.XCODE>
|
2010-10-11 08:26:52 +02:00
|
|
|
$(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
|
|
|
|
|
2019-11-14 09:00:53 +01:00
|
|
|
<Command.MSFT, Command.INTEL, Command.CLANGPDB>
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|
2009-11-09 12:47:35 +01:00
|
|
|
"$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
|
|
|
|
|
2019-02-11 03:16:39 +01:00
|
|
|
<Command.GCC>
|
2010-09-06 03:58:00 +02:00
|
|
|
"$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|
2009-12-29 07:16:53 +01:00
|
|
|
"$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
|
2023-05-10 00:36:04 +02:00
|
|
|
<Command.XCODE>
|
2021-06-02 10:11:42 +02:00
|
|
|
"$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
|