X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FConf%2Fbuild_rule.template;h=50640be6f475bc75b3ad1c5906f3c0f6c4fd5eca;hb=920d2c23a160b14b13283944477bb9e164884274;hp=c6cde8f2e5a4ff27204fd7806a21afb738759f54;hpb=30962c7752a74a566292be527b9c4e73e8494c8c;p=mirror_edk2.git diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index c6cde8f2e5..50640be6f4 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 # @@ -56,6 +64,7 @@ # $(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 @@ -89,7 +106,7 @@ # Unicode-Text-File # -[Build.C-Code-File] +[C-Code-File] ?.c ?.C @@ -98,6 +115,8 @@ ?.cpp ?.Cpp ?.CPP + + $(MAKE_FILE) @@ -108,25 +127,25 @@ "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src} + "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst} -[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 - $(MAKE_FILE) + ?.asm, ?.Asm, ?.ASM - ?.S + ?.S, ?.s + + $(MAKE_FILE) @@ -135,16 +154,18 @@ "$(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 "$(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) @@ -155,23 +176,26 @@ 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 + -$(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 @@ -180,48 +204,45 @@ $(OUTPUT_DIR)(+)$(MODULE_NAME).lib - "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} ${src} + "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST) - "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src} + "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST) -#[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] - - ?.lib - $(LIBS) - $(MAKE_FILE) +[Static-Library-File] + + *.lib - - ?.lib - $(LIBS) + $(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_LIST) + + + "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS) + "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst} + +[Static-Library-File.USER_DEFINED] + + *.lib + + + $(MAKE_FILE) + + + $(DEBUG_DIR)(+)$(MODULE_NAME) + + + "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) - "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\) $(DLINK2_FLAGS) + "$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS) -[Build.Dynamic-Library-File] +[Dynamic-Library-File] ?.dll @@ -234,7 +255,7 @@ $(CP) ${dst} $(BIN_DIR) -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR) -[Build.Dependency-Expression-File] +[Dependency-Expression-File] ?.dxs, ?.Dxs, ?.DXS @@ -246,33 +267,73 @@ 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 - "$(ASL)" -p ${dst} $(ASL_FLAGS) ${d_path}(+)${s_base}.i + 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)" $(ASL_FLAGS)${dst} $(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)" $(ASL_FLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii -[Build.Acpi-Table-Code-File] +[C-Code-File.AcpiTable] - ?.aslc + ?.c - $(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 + + + "$(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 -[Build.Masm16-Code-File] +[Acpi-Table-Code-File] + + ?.aslc, ?.act + + + $(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)" -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_base}.com @@ -281,9 +342,9 @@ "$(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 @@ -291,7 +352,7 @@ GenFw -o ${dst} -m ${src} -[Build.Microcode-Binary-File] +[Microcode-Binary-File] *.mcb @@ -299,16 +360,34 @@ $(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 + + + +[Efi-Image.UEFI_OPTIONROM] + + ?.efi, ?.EFI, ?.Efi + + + $(BIN_DIR)(+)$(MODULE_NAME).rom + $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src