diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-08-12 07:54:36 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-08-12 07:54:36 +0000 |
commit | f285eb1628e0e31470c127db83a890d57b9c6b86 (patch) | |
tree | f51c517171cfac99d23821b5a52d58e1b07cc692 /BaseTools/Conf/build_rule.template | |
parent | 584125bcba104b165a9886fb90d73fed03c6ec55 (diff) | |
download | edk2-platforms-f285eb1628e0e31470c127db83a890d57b9c6b86.tar.xz |
1. Enhanced the format of build_rule.txt to allow module type and arch information.
2. Enhanced Trim to convert ASL style of include to C style of include
3. Enhanced Trim to convert some EDK coding convention to EDK2 ECP convention
4. Added warning message when encountering unrecognized content in DSC/DEC/INF File
5. Enhanced the GenDepex to ignore everything outside DEPENDENCY_STANT and DEPENDENCY_END in dxs file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5634 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf/build_rule.template')
-rw-r--r-- | BaseTools/Conf/build_rule.template | 97 |
1 files changed, 54 insertions, 43 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index c6cde8f2e5..385f020270 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-2008, 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.<File-Type>[.<version>][, Build.<File-Type>[.<version>]] "]" <EOL>
+# "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>
# <InputFile[.<ToolChainFamily>]> <EOL>
-# [File-Type =] (?|*).<File-Extension> [(\n|,|;) (?|*).<File-Extension>]
+# (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]
#
# <OutputFile[.<ToolChainFamily>]> <EOL>
# <FileFullPath>
#
+# <ExtraDependency>
+# <FileFullPath>
+#
# <Command[.<ToolChainFamily>]> <EOL>
# <Command1>
# [<Command2>]
#
+# <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.
+#
## Placeholders for string substitution
#
@@ -89,7 +97,7 @@ # Unicode-Text-File
#
-[Build.C-Code-File]
+[C-Code-File]
<InputFile>
?.c
?.C
@@ -98,6 +106,8 @@ ?.cpp
?.Cpp
?.CPP
+
+ <ExtraDependency>
$(MAKE_FILE)
<OutputFile>
@@ -109,24 +119,23 @@ <Command.GCC>
"$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src}
-[Build.C-Header-File]
+[C-Header-File]
<InputFile>
*.h, *.H
<OutputFile>
- $(OUTPUT_DIR)(+)$(MODULE_NAME).gch
- $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
<Command>
-[Build.Assembly-Code-File]
+[Assembly-Code-File.COMMON.COMMON]
<InputFile.MSFT, InputFile.INTEL>
- Assembly-Code-File = ?.asm, ?.Asm, ?.ASM
- $(MAKE_FILE)
+ ?.asm, ?.Asm, ?.ASM
<InputFile.GCC>
?.S
+
+ <ExtraDependency>
$(MAKE_FILE)
<OutputFile>
@@ -142,9 +151,11 @@ 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]
<InputFile>
?.s
+
+ <ExtraDependency>
$(MAKE_FILE)
<OutputFile>
@@ -155,11 +166,13 @@ 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]
<InputFile>
?.vfr
?.Vfr
?.VFR
+
+ <ExtraDependency>
$(MAKE_FILE)
<OutputFile>
@@ -171,7 +184,7 @@ -mkdir ${d_path} > NUL 2>&1
"$(VFR)" $(VFR_FLAGS) --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
-[Build.Object-File]
+[Object-File]
<InputFile>
*.obj
*.o
@@ -185,30 +198,11 @@ <Command.GCC>
"$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src}
-#[Build.Object-File, Build.Static-Library-File]
-#BUILD_VERSION = 0x00010000
-#
-# <InputFile>
-# Object-File = *.obj
-# Static-Library-File = *.lib, *.a
-#
-# <OutputFile>
-# $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
-#
-# <Command.MSFT>
-# "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src}
-#
-# <Command.GCC>
-# "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src1} -( ${src2} -)
-#
-[Build.Static-Library-File]
- <InputFile.MSFT, InputFile.Intel>
+[Static-Library-File]
+ <InputFile>
?.lib
- $(LIBS)
- $(MAKE_FILE)
- <InputFile.GCC>
- ?.lib
+ <ExtraDependency>
$(LIBS)
$(MAKE_FILE)
@@ -221,7 +215,7 @@ <Command.GCC>
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\) $(DLINK2_FLAGS)
-[Build.Dynamic-Library-File]
+[Dynamic-Library-File]
<InputFile>
?.dll
@@ -234,7 +228,7 @@ $(CP) ${dst} $(BIN_DIR)
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
-[Build.Dependency-Expression-File]
+[Dependency-Expression-File]
<InputFile>
?.dxs, ?.Dxs, ?.DXS
@@ -246,33 +240,42 @@ 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]
<InputFile>
?.asl, ?.Asl, ?.ASL
<OutputFile>
$(OUTPUT_DIR)(+)${s_base}.aml
+ <ExtraDependency>
+ $(MAKE_FILE)
+
<Command.MSFT, Command.INTEL>
"$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
"$(ASL)" -p ${dst} $(ASL_FLAGS) ${d_path}(+)${s_base}.i
-[Build.Acpi-Table-Code-File]
+[Acpi-Table-Code-File]
<InputFile>
?.aslc
<OutputFile>
$(OUTPUT_DIR)(+)${s_base}.acpi
+ <ExtraDependency>
+ $(MAKE_FILE)
+
<Command.MSFT, Command.INTEL>
"$(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
GenFw -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll
-[Build.Masm16-Code-File]
+[Masm16-Code-File]
<InputFile>
?.asm16, ?.Asm16, ?.ASM16
+ <ExtraDependency>
+ $(MAKE_FILE)
+
<OutputFile>
$(OUTPUT_DIR)(+)${s_base}.com
@@ -281,7 +284,7 @@ "$(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]
<InputFile>
?.txt, ?.TXT, ?.Txt
@@ -291,7 +294,7 @@ <Command>
GenFw -o ${dst} -m ${src}
-[Build.Microcode-Binary-File]
+[Microcode-Binary-File]
<InputFile>
*.mcb
@@ -302,7 +305,7 @@ GenFw -o ${dst} -j ${src}
-$(CP) ${dst} $(BIN_DIR)
-[Build.Unicode-Text-File]
+[Unicode-Text-File]
<InputFile>
*.uni, *.Uni, *.UNI
@@ -312,3 +315,11 @@ <Command>
+[EFI-Image-File]
+ <InputFile>
+ ?.efi, ?.Efi, ?.EFI
+
+ <OutputFile>
+
+ <Command>
+
|