X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FConf%2Fbuild_rule.template;h=ecc5d461b9212b6612180a69564675053ab95dc0;hb=2ab2aad18b5c4d61c34125ce17aae52048e6ba3f;hp=1fa52284381d4165ac2d3b58dee15d929af89687;hpb=8083432c1b4a24fbcca4481a82f2a8dae81ca907;p=mirror_edk2.git diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index 1fa5228438..ecc5d461b9 100644 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, Intel Corporation +# Copyright (c) 2007-2009, Intel Corporation # # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -17,17 +17,25 @@ # "*" 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. # -# "[" Build.[.][, Build.[.]] "]" -# ]> -# [File-Type =] (?|*). [(\n|,|;) (?|*).] +# "[" [.][.][, [.][.]] "]" +# ]> +# (?|*). [(\n|,) (?|*).] # -# ]> +# ]> # # -# ]> +# +# +# +# ]> # # [] # +# is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK. +# Missing will cause an exception and break build. +# Missing will cause that related build target won't be generated but +# won't break build. +# ## Placeholders for string substitution # @@ -50,12 +58,13 @@ ## Macro # $(WORKSPACE) Workspace directory -# $(OUTPUT_DIR) Directory for intermediate files for building a module +# $(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 +# $(INC_LIST) A file containing search pathes of current module # $(LIBS) Static library files of current module # $(_FLAGS) Tools flags of current module # $(MODULE_NAME) Current module name @@ -65,9 +74,17 @@ # $(TARGET) Target of current module (DEBUG/RELEASE) # $() Path of tool # $(EDK_TOOLS_PATH) Path of build tools -# $() File list of each file type +# $() File list of each file type # (Note: The macro name is derived from file type name. For example, -# C-Code-File will have C_CODE_FILE_LIST macro.) +# C-Code-File will have C_CODE_FILES macro.) +# $() 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. +# For example, C-Code-File will have C_CODE_FILES_LIST macro pointing +# 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. +# ) # # $(CP) copy command # $(MV) move command @@ -78,7 +95,7 @@ ## Reserved File-Type # -# Dont't change following names of file types and their associated files, +# Don't change following names of file types and their associated files, # which are also used in tools' code # # C-Code-File @@ -89,7 +106,7 @@ # Unicode-Text-File # -[Build.C-Code-File] +[C-Code-File] ?.c ?.C @@ -99,6 +116,9 @@ ?.Cpp ?.CPP + + $(MAKE_FILE) + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj @@ -108,62 +128,73 @@ "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src} -[Build.C-Header-File] +[C-Header-File] *.h, *.H - $(OUTPUT_DIR)(+)$(MODULE_NAME).gch - $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj -[Build.Assembly-Code-File] +[Assembly-Code-File.COMMON.COMMON] - Assembly-Code-File = ?.asm, ?.Asm, ?.ASM + ?.asm, ?.Asm, ?.ASM ?.S + + $(MAKE_FILE) + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i - "$(ASM)" /Fo${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii - "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${src} + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i + "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii -[Build.Iasm-Code-File] +[Assembly-Code-File.COMMON.IPF] ?.s + + $(MAKE_FILE) + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj - "$(APP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - "$(ASM)" -o ${dst} $(ASM_FLAGS) ${d_path}(+)${s_base}.i + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i + "$(ASM)" -o ${dst} $(ASM_FLAGS) ${d_path}(+)${s_base}.iii -[Build.Visual-Form-Representation-File] +[Visual-Form-Representation-File] ?.vfr ?.Vfr ?.VFR + + $(MAKE_FILE) + $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c - "$(PP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i + -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1 + "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i Trim --vfr-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i - -mkdir ${d_path} > NUL 2>&1 - VfrCompile -od ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii + -$(MD) ${d_path} > NUL 2>&1 + "$(VFR)" $(VFR_FLAGS) --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii -[Build.Object-File] +[Object-File] *.obj *.o @@ -172,41 +203,44 @@ $(OUTPUT_DIR)(+)$(MODULE_NAME).lib - "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} ${src} + "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} $(OBJECT_FILES) - "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src} + "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) $(OBJECT_FILES) -#[Build.Object-File, Build.Static-Library-File] -#BUILD_VERSION = 0x00010000 -# -# -# Object-File = *.obj -# Static-Library-File = *.lib, *.a -# -# -# $(OUTPUT_DIR)(+)$(MODULE_NAME).lib -# -# -# "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src} -# -# -# "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src1} -( ${src2} -) -# -[Build.Static-Library-File] +[Static-Library-File] - ?.lib + *.lib + + + $(MAKE_FILE) $(DEBUG_DIR)(+)$(MODULE_NAME).dll - "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) $(LIBS) ${src} + "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) + + + "$(DLINK)" -o ${dst} -Map $(DEBUG_DIR)(+)$(MODULE_NAME).map $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS) + +[Static-Library-File.USER_DEFINED] + + *.lib + + + $(MAKE_FILE) + + + $(DEBUG_DIR)(+)$(MODULE_NAME) + + + "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) - "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -( $(DLINK_SPATH) $(LIBS) ${src} -) + "$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS) -[Build.Dynamic-Library-File] +[Dynamic-Library-File] ?.dll @@ -219,56 +253,96 @@ $(CP) ${dst} $(BIN_DIR) -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR) -[Build.Dependency-Expression-File] +[Dependency-Expression-File] ?.dxs, ?.Dxs, ?.DXS $(OUTPUT_DIR)(+)$(MODULE_NAME).depex - -# GenDepex -o ${dst} ${src} + + "$(PP)" $(CC_FLAGS) $(APP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i + 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 -[Build.Acpi-Source-Language-File] +[Acpi-Source-Language-File] ?.asl, ?.Asl, ?.ASL - $(OUTPUT_DIR)(+)${s_base}.aml + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.aml + + + $(MAKE_FILE) - "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i - "$(ASL)" -p ${dst} ${d_path}(+)${s_base}.iii + Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i ${src} + "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii + "$(ASL)" -p ${dst} $(ASL_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii + + + Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i ${src} + "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii + "$(ASL)" -p ${dst} $(ASL_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii + +[C-Code-File.AcpiTable] + + ?.c + + + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi + + + $(MAKE_FILE) + + + "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} + "$(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 + + + "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} + "$(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 -[Build.Acpi-Table-Code-File] +[Acpi-Table-Code-File] - ?.aslc + ?.aslc, ?.act - $(OUTPUT_DIR)(+)${s_base}.acpi + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.acpi + + + $(MAKE_FILE) - - "$(CC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(INC) ${src} - "$(DLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj + + "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} + "$(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 -[Build.Masm16-Code-File] + + "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} + "$(ASLDLINK)" -o $(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 + +[Masm16-Code-File] ?.asm16, ?.Asm16, ?.ASM16 + + $(MAKE_FILE) + - $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.com + $(OUTPUT_DIR)(+)${s_base}.com - pushd . cd $(OUTPUT_DIR)(+)${s_dir} - "$(ASM)" /nologo /omf ${src} /Bl"$(ASMLINK)" $(ASMLINK_FLAGS) - -$(CP) ${dst} $(OUTPUT_DIR) & popd + "$(ASM)" /nologo /c /omf /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${src} + "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,, -[Build.Microcode-File] +[Microcode-File] - ?.txt, ?.TXT, ?.Txt + ?.txt, ?.TXT, ?.Txt, ?.mut $(OUTPUT_DIR)(+)${s_base}.mcb @@ -276,7 +350,7 @@ GenFw -o ${dst} -m ${src} -[Build.Microcode-Binary-File] +[Microcode-Binary-File] *.mcb @@ -284,15 +358,23 @@ $(OUTPUT_DIR)(+)$(MODULE_NAME).bin - GenFw -o ${dst} -j ${src} + GenFw -o ${dst} -j $(MICROCODE_BINARY_FILES) + -$(CP) ${dst} $(BIN_DIR) -[Build.Unicode-Text-File] +[EFI-Image-File] + + ?.efi, ?.Efi, ?.EFI + + + + + +[Unicode-Text-File] *.uni, *.Uni, *.UNI $(DEBUG_DIR)(+)AutoGen.c - $(DEBUG_DIR)(+)AutoGen.h + $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h -