--- /dev/null
+#\r
+# Copyright (c) 2007, Intel Corporation\r
+#\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Filename: build_rule.template\r
+#\r
+\r
+## Syntax\r
+#\r
+# "*" is used to indicate that the source files will be processed at the same time.\r
+# "?" is used to indicate that the source files will be processed one by one.\r
+#\r
+# "[" Build.<File-Type>[.<version>][, Build.<File-Type>[.<version>]] "]" <EOL>\r
+# <InputFile[.<ToolChainFamily>]> <EOL>\r
+# [File-Type =] (?|*).<File-Extension> [(\n|,|;) (?|*).<File-Extension>]\r
+#\r
+# <OutputFile[.<ToolChainFamily>]> <EOL>\r
+# <FileFullPath>\r
+#\r
+# <Command[.<ToolChainFamily>]> <EOL>\r
+# <Command1>\r
+# [<Command2>]\r
+#\r
+\r
+## Placeholders for string substitution\r
+#\r
+# ${src} Source file(s) to be built (full path)\r
+# ${s_path} Source file directory (absolute path)\r
+# ${s_dir} Source file relative directory within a module\r
+# (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)\r
+# ${s_name} Source file name without path\r
+# ${s_base} Source file name without extension and path\r
+# ${s_ext} Source file extension\r
+#\r
+# ${dst} Destination file(s) built from ${src} (full path)\r
+# ${d_path} Destination file directory (absolute path)\r
+# ${d_name} Destination file name without path\r
+# ${d_base} Destination file name without extension and path\r
+# ${d_ext} Destination file extension\r
+#\r
+# (+) Directory separator\r
+#\r
+\r
+## Macro\r
+# $(WORKSPACE) Workspace directory\r
+# $(OUTPUT_DIR) Directory for intermediate files for building a module\r
+# $(DEBUG_DIR) Directory for files used to debug a module\r
+# $(BUILD_DIR) All files for building a platform will be put in this directory\r
+# $(BIN_DIR) Common directory for executable files\r
+# $(FV_DIR) Directory to store flash image files\r
+# $(INC) Search path of current module\r
+# $(LIBS) Static library files of current module\r
+# $(<tool>_FLAGS) Tools flags of current module\r
+# $(MODULE_NAME) Current module name\r
+# $(MODULE_TYPE) Current module type\r
+# $(ARCH) Architecture of current module\r
+# $(TOOLCHAIN) Toolchain used to build current module\r
+# $(TARGET) Target of current module (DEBUG/RELEASE)\r
+# $(<tool>) Path of tool\r
+# $(EDK_TOOLS_PATH) Path of build tools\r
+# $(<FILE_TYPE_LIST>) File list of each file type\r
+# (Note: The macro name is derived from file type name. For example,\r
+# C-Code-File will have C_CODE_FILE_LIST macro.)\r
+#\r
+# $(CP) copy command\r
+# $(MV) move command\r
+# $(RM) delete command\r
+# $(MD) create dir command\r
+# $(RD) remove dir command\r
+#\r
+\r
+## Reserved File-Type\r
+#\r
+# Dont't change following names of file types and their associated files,\r
+# which are also used in tools' code\r
+#\r
+# C-Code-File\r
+# C-Header-File\r
+# Dynamic-Library-File\r
+# Static-Library-File\r
+# Visual-Form-Representation-File\r
+# Unicode-Text-File\r
+#\r
+\r
+[Build.C-Code-File]\r
+ <InputFile>\r
+ ?.c\r
+ ?.C\r
+ ?.cc\r
+ ?.CC\r
+ ?.cpp\r
+ ?.Cpp\r
+ ?.CPP\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}\r
+\r
+ <Command.GCC>\r
+ "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src}\r
+\r
+[Build.C-Header-File]\r
+ <InputFile>\r
+ *.h, *.H\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)$(MODULE_NAME).gch\r
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
+\r
+ <Command>\r
+\r
+\r
+[Build.Assembly-Code-File]\r
+ <InputFile.MSFT, InputFile.INTEL>\r
+ Assembly-Code-File = ?.asm, ?.Asm, ?.ASM\r
+\r
+ <InputFile.GCC>\r
+ ?.S\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
+ Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
+ "$(ASM)" /Fo${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii\r
+\r
+ <Command.GCC>\r
+ "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${src}\r
+\r
+[Build.Iasm-Code-File]\r
+ <InputFile>\r
+ ?.s\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
+ Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
+ "$(ASM)" -o ${dst} $(ASM_FLAGS) ${d_path}(+)${s_base}.iii\r
+\r
+[Build.Visual-Form-Representation-File]\r
+ <InputFile>\r
+ ?.vfr\r
+ ?.Vfr\r
+ ?.VFR\r
+\r
+ <OutputFile>\r
+ $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c\r
+\r
+ <Command>\r
+ "$(PP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
+ Trim --vfr-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
+ -mkdir ${d_path} > NUL 2>&1\r
+ VfrCompile -od ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
+\r
+[Build.Object-File]\r
+ <InputFile>\r
+ *.obj\r
+ *.o\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)$(MODULE_NAME).lib\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} ${src}\r
+\r
+ <Command.GCC>\r
+ "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src}\r
+\r
+#[Build.Object-File, Build.Static-Library-File]\r
+#BUILD_VERSION = 0x00010000\r
+#\r
+# <InputFile>\r
+# Object-File = *.obj\r
+# Static-Library-File = *.lib, *.a\r
+#\r
+# <OutputFile>\r
+# $(OUTPUT_DIR)(+)$(MODULE_NAME).lib\r
+#\r
+# <Command.MSFT>\r
+# "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src}\r
+#\r
+# <Command.GCC>\r
+# "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src1} -( ${src2} -)\r
+#\r
+[Build.Static-Library-File]\r
+ <InputFile>\r
+ ?.lib\r
+ $(LIBS)\r
+ $(MODULE_BUILD_DIR)\Makefile\r
+\r
+ <OutputFile>\r
+ $(DEBUG_DIR)(+)$(MODULE_NAME).dll\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) $(LIBS) ${src}\r
+\r
+ <Command.GCC>\r
+ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -( $(DLINK_SPATH) $(LIBS) ${src} -)\r
+\r
+[Build.Dynamic-Library-File]\r
+ <InputFile>\r
+ ?.dll\r
+\r
+ <OutputFile>\r
+ $(DEBUG_DIR)(+)$(MODULE_NAME).efi\r
+\r
+ <Command>\r
+ GenFw -e $(MODULE_TYPE) -o ${dst} ${src}\r
+ $(CP) ${dst} $(OUTPUT_DIR)\r
+ $(CP) ${dst} $(BIN_DIR)\r
+ -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
+\r
+[Build.Dependency-Expression-File]\r
+ <InputFile>\r
+ ?.dxs, ?.Dxs, ?.DXS\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)$(MODULE_NAME).depex\r
+\r
+ <Command>\r
+# GenDepex -o ${dst} ${src}\r
+\r
+[Build.Acpi-Source-Language-File]\r
+ <InputFile>\r
+ ?.asl, ?.Asl, ?.ASL\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_base}.aml\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
+ "$(ASL)" -p ${dst} ${d_path}(+)${s_base}.i\r
+\r
+[Build.Acpi-Table-Code-File]\r
+ <InputFile>\r
+ ?.aslc\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_base}.acpi\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ "$(CC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(INC) ${src}\r
+ "$(DLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj\r
+ GenFw -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll\r
+\r
+[Build.Masm16-Code-File]\r
+ <InputFile>\r
+ ?.asm16, ?.Asm16, ?.ASM16\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.com\r
+\r
+ <Command.MSFT, Command.INTEL>\r
+ pushd .\r
+ cd $(OUTPUT_DIR)(+)${s_dir}\r
+ "$(ASM)" /nologo /omf ${src} /Bl"$(ASMLINK)" $(ASMLINK_FLAGS)\r
+ -$(CP) ${dst} $(OUTPUT_DIR) & popd\r
+\r
+[Build.Microcode-File]\r
+ <InputFile>\r
+ ?.txt, ?.TXT, ?.Txt\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)${s_base}.mcb\r
+\r
+ <Command>\r
+ GenFw -o ${dst} -m ${src}\r
+\r
+[Build.Microcode-Binary-File]\r
+ <InputFile>\r
+ *.mcb\r
+\r
+ <OutputFile>\r
+ $(OUTPUT_DIR)(+)$(MODULE_NAME).bin\r
+\r
+ <Command>\r
+ GenFw -o ${dst} -j ${src}\r
+\r
+[Build.Unicode-Text-File]\r
+ <InputFile>\r
+ *.uni, *.Uni, *.UNI\r
+\r
+ <OutputFile>\r
+ $(DEBUG_DIR)(+)AutoGen.c\r
+ $(DEBUG_DIR)(+)AutoGen.h\r
+\r
+ <Command>\r
+\r