Enhanced the build_rule format and merged updates from edk2 trunk
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 12 Aug 2008 07:20:59 +0000 (07:20 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 12 Aug 2008 07:20:59 +0000 (07:20 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1301 7335b38e-4728-0410-8992-fb3ffe349368

Conf/build_rule.template
Conf/tools_def.template

index e981caa..385f020 100644 (file)
@@ -1,5 +1,5 @@
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007-2008, 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
 # "*" 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
+# "[" <File-Type>[.<Build-Type>][.<Arch>][, <File-Type>[.<Build-Type>][.<Arch>]] "]" <EOL>\r
 #   <InputFile[.<ToolChainFamily>]> <EOL>\r
-#       [File-Type =] (?|*).<File-Extension> [(\n|,|;) (?|*).<File-Extension>]\r
+#       (?|*).<File-Extension> [(\n|,) (?|*).<File-Extension>]\r
 #\r
 #   <OutputFile[.<ToolChainFamily>]> <EOL>\r
 #       <FileFullPath>\r
 #\r
+#   <ExtraDependency>\r
+#       <FileFullPath>\r
+#\r
 #   <Command[.<ToolChainFamily>]> <EOL>\r
 #       <Command1>\r
 #       [<Command2>]\r
 #\r
+# <Build-Type> is the MODULE_TYPE in EDK2 or COMPONENT_TYPE  in EDK.\r
+# Missing <InputFile> will cause an exception and break build.\r
+# Missing <Command> will cause that related build target won't be generated but\r
+#   won't break build.\r
+#\r
 \r
 ## Placeholders for string substitution\r
 #\r
@@ -89,7 +97,7 @@
 #   Unicode-Text-File\r
 #\r
 \r
-[Build.C-Code-File]\r
+[C-Code-File]\r
     <InputFile>\r
         ?.c\r
         ?.C\r
         ?.cpp\r
         ?.Cpp\r
         ?.CPP\r
+\r
+    <ExtraDependency>\r
         $(MAKE_FILE)\r
 \r
     <OutputFile>\r
     <Command.GCC>\r
         "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src}\r
 \r
-[Build.C-Header-File]\r
+[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
+[Assembly-Code-File.COMMON.COMMON]\r
     <InputFile.MSFT, InputFile.INTEL>\r
-        Assembly-Code-File = ?.asm, ?.Asm, ?.ASM\r
-        $(MAKE_FILE)\r
+        ?.asm, ?.Asm, ?.ASM\r
 \r
     <InputFile.GCC>\r
         ?.S\r
+\r
+    <ExtraDependency>\r
         $(MAKE_FILE)\r
 \r
     <OutputFile>\r
         Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
         "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii\r
 \r
-[Build.Iasm-Code-File]\r
+[Assembly-Code-File.COMMON.IPF]\r
     <InputFile>\r
         ?.s\r
+\r
+    <ExtraDependency>\r
         $(MAKE_FILE)\r
 \r
     <OutputFile>\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
+[Visual-Form-Representation-File]\r
     <InputFile>\r
         ?.vfr\r
         ?.Vfr\r
         ?.VFR\r
+\r
+    <ExtraDependency>\r
         $(MAKE_FILE)\r
 \r
     <OutputFile>\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 -l --no-pre-processing --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
+        "$(VFR)" $(VFR_FLAGS) --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
 \r
-[Build.Object-File]\r
+[Object-File]\r
     <InputFile>\r
         *.obj\r
         *.o\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.MSFT, InputFile.Intel>\r
+[Static-Library-File]\r
+    <InputFile>\r
         ?.lib\r
-        $(LIBS)\r
-        $(MAKE_FILE)\r
 \r
-    <InputFile.GCC>\r
-        ?.lib\r
+    <ExtraDependency>\r
         $(LIBS)\r
         $(MAKE_FILE)\r
 \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
+        "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\) $(DLINK2_FLAGS)\r
 \r
-[Build.Dynamic-Library-File]\r
+[Dynamic-Library-File]\r
     <InputFile>\r
         ?.dll\r
 \r
         $(CP) ${dst} $(BIN_DIR)\r
         -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
 \r
-[Build.Dependency-Expression-File]\r
+[Dependency-Expression-File]\r
     <InputFile>\r
         ?.dxs, ?.Dxs, ?.DXS\r
 \r
         Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i\r
         GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii\r
 \r
-[Build.Acpi-Source-Language-File]\r
+[Acpi-Source-Language-File]\r
     <InputFile>\r
         ?.asl, ?.Asl, ?.ASL\r
 \r
     <OutputFile>\r
         $(OUTPUT_DIR)(+)${s_base}.aml\r
 \r
+    <ExtraDependency>\r
+        $(MAKE_FILE)\r
+\r
     <Command.MSFT, Command.INTEL>\r
         "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
         "$(ASL)" -p ${dst} $(ASL_FLAGS) ${d_path}(+)${s_base}.i\r
 \r
-[Build.Acpi-Table-Code-File]\r
+[Acpi-Table-Code-File]\r
     <InputFile>\r
         ?.aslc\r
 \r
     <OutputFile>\r
         $(OUTPUT_DIR)(+)${s_base}.acpi\r
 \r
+    <ExtraDependency>\r
+        $(MAKE_FILE)\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
+[Masm16-Code-File]\r
     <InputFile>\r
         ?.asm16, ?.Asm16, ?.ASM16\r
 \r
+    <ExtraDependency>\r
+        $(MAKE_FILE)\r
+\r
     <OutputFile>\r
         $(OUTPUT_DIR)(+)${s_base}.com\r
 \r
         "$(ASM)" /nologo /c /omf /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${src}\r
         "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,,\r
 \r
-[Build.Microcode-File]\r
+[Microcode-File]\r
     <InputFile>\r
         ?.txt, ?.TXT, ?.Txt\r
 \r
     <Command>\r
         GenFw -o ${dst} -m ${src}\r
 \r
-[Build.Microcode-Binary-File]\r
+[Microcode-Binary-File]\r
     <InputFile>\r
         *.mcb\r
 \r
         GenFw -o ${dst} -j ${src}\r
         -$(CP) ${dst} $(BIN_DIR)\r
 \r
-[Build.Unicode-Text-File]\r
+[Unicode-Text-File]\r
     <InputFile>\r
         *.uni, *.Uni, *.UNI\r
 \r
 \r
     <Command>\r
 \r
+[EFI-Image-File]\r
+    <InputFile>\r
+        ?.efi, ?.Efi, ?.EFI\r
+\r
+    <OutputFile>\r
+\r
+    <Command>\r
+\r
index 7cbffbf..8b52138 100644 (file)
@@ -151,7 +151,7 @@ DEFINE ASL_BIN = C:\ASL
       *_VS2003_IA32_PP_FLAGS             = /nologo /E /TC /FIAutoGen.h\r
       *_VS2003_IA32_VFRPP_FLAGS          = /nologo /E /TC /DVFRCOMPILE /FIAutoGen.h\r
   DEBUG_VS2003_IA32_CC_FLAGS             = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm\r
-RELEASE_VS2003_IA32_CC_FLAGS             = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- \r
+RELEASE_VS2003_IA32_CC_FLAGS             = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX-\r
   DEBUG_VS2003_IA32_PCH_FLAGS            = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Fp$(DEST_DIR_OUTPUT)/AutoGen.h.gch /Yc /TC /Zi /Gm\r
 RELEASE_VS2003_IA32_PCH_FLAGS            = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Fp$(DEST_DIR_OUTPUT)/AutoGen.h.gch /Yc /TC\r
   DEBUG_VS2003_IA32_ASM_FLAGS            = /nologo /c /WX /W3 /coff /Cx /Zd /Zi\r
@@ -195,9 +195,9 @@ RELEASE_VS2003_IA32_DLINK_FLAGS          = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
 \r
   DEBUG_VS2005PRO_IA32_CC_FLAGS          = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
 RELEASE_VS2005PRO_IA32_CC_FLAGS          = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF\r
-  DEBUG_VS2005PRO_IA32_ASM_FLAGS         = /nologo /c /WX /W3 /Cx /coff /Zd /Zi  \r
+  DEBUG_VS2005PRO_IA32_ASM_FLAGS         = /nologo /c /WX /W3 /Cx /coff /Zd /Zi\r
 RELEASE_VS2005PRO_IA32_ASM_FLAGS         = /nologo /c /WX /W3 /Cx /coff /Zd\r
-  DEBUG_VS2005PRO_IA32_DLINK_FLAGS       = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG   \r
+  DEBUG_VS2005PRO_IA32_DLINK_FLAGS       = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG\r
 RELEASE_VS2005PRO_IA32_DLINK_FLAGS       = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text\r
       *_VS2005PRO_IA32_ASMLINK_FLAGS     = /nologo /tiny\r
 \r
@@ -215,7 +215,7 @@ RELEASE_VS2005PRO_IA32_DLINK_FLAGS       = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
 *_VS2005PRO_X64_DLINK_PATH          = DEF(VS2005PRO_BINX64)\link.exe\r
 *_VS2005PRO_X64_ASMLINK_PATH        = DEF(VS2005PRO_BINX64)\link.exe\r
 \r
-  DEBUG_VS2005PRO_X64_CC_FLAGS           = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm \r
+  DEBUG_VS2005PRO_X64_CC_FLAGS           = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
 RELEASE_VS2005PRO_X64_CC_FLAGS           = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF\r
   DEBUG_VS2005PRO_X64_ASM_FLAGS          = /nologo /c /WX /W3 /Cx /Zd /Zi\r
 RELEASE_VS2005PRO_X64_ASM_FLAGS          = /nologo /c /WX /W3 /Cx /Zd\r
@@ -256,9 +256,9 @@ RELEASE_VS2005PRO_X64_DLINK_FLAGS        = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
       *_VS2005TEAMSUITE_IA32_MAKE_FLAGS  = /nologo\r
   DEBUG_VS2005TEAMSUITE_IA32_CC_FLAGS    = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm\r
 RELEASE_VS2005TEAMSUITE_IA32_CC_FLAGS    = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF\r
-  DEBUG_VS2005TEAMSUITE_IA32_ASM_FLAGS   = /nologo /c /WX /W3 /Cx /coff /Zd /Zi  \r
+  DEBUG_VS2005TEAMSUITE_IA32_ASM_FLAGS   = /nologo /c /WX /W3 /Cx /coff /Zd /Zi\r
 RELEASE_VS2005TEAMSUITE_IA32_ASM_FLAGS   = /nologo /c /WX /W3 /Cx /coff /Zd\r
-  DEBUG_VS2005TEAMSUITE_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG   \r
+  DEBUG_VS2005TEAMSUITE_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG\r
 RELEASE_VS2005TEAMSUITE_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text\r
       *_VS2005TEAMSUITE_IA32_ASMLINK_FLAGS= /nologo /tiny\r
 \r
@@ -275,7 +275,7 @@ RELEASE_VS2005TEAMSUITE_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
 *_VS2005TEAMSUITE_X64_SLINK_PATH    = DEF(VS2005TEAMSUITE_BINX64)\lib.exe\r
 *_VS2005TEAMSUITE_X64_DLINK_PATH    = DEF(VS2005TEAMSUITE_BINX64)\link.exe\r
 \r
-  DEBUG_VS2005TEAMSUITE_X64_CC_FLAGS     = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm \r
+  DEBUG_VS2005TEAMSUITE_X64_CC_FLAGS     = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
 RELEASE_VS2005TEAMSUITE_X64_CC_FLAGS     = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF\r
   DEBUG_VS2005TEAMSUITE_X64_ASM_FLAGS    = /nologo /c /WX /W3 /Cx /Zd /Zi\r
 RELEASE_VS2005TEAMSUITE_X64_ASM_FLAGS    = /nologo /c /WX /W3 /Cx /Zd\r
@@ -459,6 +459,7 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_CYGWINGCC_*_DLINK_FLAGS                = -nostdlib -O2 --gc-sections --dll --export-all-symbols --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20\r
 *_CYGWINGCC_*_ASM_FLAGS                  = -c -x assembler -imacros AutoGen.h\r
 *_CYGWINGCC_*_PP_FLAGS                   = -E -x assembler-with-cpp -include AutoGen.h\r
+*_CYGWINGCC_*_APP_FLAGS                  = -E -x assembler\r
 *_CYGWINGCC_*_VFRPP_FLAGS                = -x c -E -P -DVFRCOMPILE --include AutoGen.h\r
 \r
 ##################\r
@@ -469,6 +470,7 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_CYGWINGCC_IA32_DLINK_PATH         = DEF(CYGWIN_BIN32)/ld\r
 *_CYGWINGCC_IA32_ASM_PATH           = DEF(CYGWIN_BIN32)/gcc\r
 *_CYGWINGCC_IA32_PP_PATH            = DEF(CYGWIN_BIN32)/gcc\r
+*_CYGWINGCC_IA32_APP_PATH           = DEF(CYGWIN_BIN32)/gcc\r
 *_CYGWINGCC_IA32_VFRPP_PATH         = DEF(CYGWIN_BIN32)/gcc\r
 \r
 *_CYGWINGCC_IA32_CC_FLAGS           = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h\r
@@ -481,6 +483,7 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_CYGWINGCC_X64_DLINK_PATH          = DEF(CYGWIN_BINX64)/ld\r
 *_CYGWINGCC_X64_ASM_PATH            = DEF(CYGWIN_BINX64)/gcc\r
 *_CYGWINGCC_X64_PP_PATH             = DEF(CYGWIN_BINX64)/gcc\r
+*_CYGWINGCC_X64_APP_PATH            = DEF(CYGWIN_BINX64)/gcc\r
 *_CYGWINGCC_X64_VFRPP_PATH          = DEF(CYGWIN_BINX64)/gcc\r
 \r
 *_CYGWINGCC_X64_CC_FLAGS            = -Os -fshort-wchar -fno-strict-aliasing -mno-red-zone -Wall -Werror -c -include AutoGen.h -D_EFI_P64\r
@@ -497,13 +500,16 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_ELFGCC_IA32_CC_PATH               = DEF(ELFGCC_BIN)/gcc\r
 *_ELFGCC_IA32_SLINK_PATH            = DEF(ELFGCC_BIN)/ar\r
 *_ELFGCC_IA32_DLINK_PATH            = DEF(ELFGCC_BIN)/ld\r
+*_ELFGCC_IA32_DLINK2_PATH           = DEF(ELFGCC_BIN)/ld\r
 *_ELFGCC_IA32_ASM_PATH              = DEF(ELFGCC_BIN)/gcc\r
 *_ELFGCC_IA32_PP_PATH               = DEF(ELFGCC_BIN)/gcc\r
 *_ELFGCC_IA32_VFRPP_PATH            = DEF(ELFGCC_BIN)/gcc\r
+*_ELFGCC_*_MAKE_PATH                    = make\r
 \r
 *_ELFGCC_IA32_CC_FLAGS                   = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings\r
-*_ELFGCC_*_DLINK_FLAGS                   = -melf_i386 -nostdlib -n -q -Ttext 0x220 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)\r
-*_ELFGCC_*_ASM_FLAGS                     = -m32 -c -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
+*_ELFGCC_*_DLINK_FLAGS                   = -melf_i386 -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)\r
+#*_ELFGCC_*_DLINK_FLAGS                   = -melf_i386 -nostdlib -n -q -Ttext 0x220 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)\r
+*_ELFGCC_*_ASM_FLAGS                     = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
 *_ELFGCC_*_PP_FLAGS                      = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h\r
 *_ELFGCC_*_VFRPP_FLAGS                   = -x c -E -P -DVFRCOMPILE --include AutoGen.h\r
 \r
@@ -661,7 +667,7 @@ RELEASE_ICC_IPF_DLINK_FLAGS              = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 \r
 *_MYTOOLS_*_ASL_PATH                = DEF(ASL_BIN)\iasl.exe\r
 \r
-*_MYTOOLS_*_ASL_FLAGS                    = \r
+*_MYTOOLS_*_ASL_FLAGS                    =\r
 *_MYTOOLS_*_MAKE_FLAGS                   = /nologo\r
 *_MYTOOLS_*_VFRPP_FLAGS                  = /nologo /E /TC /DVFRCOMPILE /FIAutoGen.h\r
 *_MYTOOLS_*_APP_FLAGS                    = /nologo /E /TC\r
@@ -689,7 +695,7 @@ RELEASE_MYTOOLS_*_ASM16_FLAGS     = /nologo /c /WX /W3 /coff /Cx /Zd
 *_MYTOOLS_IA32_APP_PATH             = DEF(VS2005TEAMSUITE_BIN)\cl.exe\r
 *_MYTOOLS_IA32_ASM_PATH             = DEF(VS2005TEAMSUITE_BIN)\ml.exe\r
 \r
-  DEBUG_MYTOOLS_IA32_CC_FLAGS            = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm \r
+  DEBUG_MYTOOLS_IA32_CC_FLAGS            = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
 RELEASE_MYTOOLS_IA32_CC_FLAGS            = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF\r
   DEBUG_MYTOOLS_IA32_ASM_FLAGS           = /nologo /c /WX /W3 /coff /Cx /Zd /Zi\r
 RELEASE_MYTOOLS_IA32_ASM_FLAGS           = /nologo /c /WX /W3 /coff /Cx /Zd\r
@@ -711,7 +717,7 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS         = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
 *_MYTOOLS_X64_APP_PATH              = DEF(VS2005TEAMSUITE_BINX64)\cl.exe\r
 *_MYTOOLS_X64_ASM_PATH              = DEF(VS2005TEAMSUITE_BINX64)\ml64.exe\r
 \r
-  DEBUG_MYTOOLS_X64_CC_FLAGS             = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm \r
+  DEBUG_MYTOOLS_X64_CC_FLAGS             = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
 RELEASE_MYTOOLS_X64_CC_FLAGS             = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF\r
   DEBUG_MYTOOLS_X64_ASM_FLAGS            = /nologo /c /WX /W3 /Cx /Zd /Zi\r
 RELEASE_MYTOOLS_X64_ASM_FLAGS            = /nologo /c /WX /W3 /Cx /Zd\r
@@ -734,7 +740,7 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS          = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
       *_MYTOOLS_IPF_ASM_OUTPUT           = "-o "\r
 \r
   DEBUG_MYTOOLS_IPF_CC_FLAGS             = /nologo /c /WX /GS- /X /W4 /Gy /Ox /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zx /QIPF_fr32 /Zi\r
-RELEASE_MYTOOLS_IPF_CC_FLAGS             = /nologo /c /WX /GS- /X /W4 /Gy /Ox /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zx /QIPF_fr32 \r
+RELEASE_MYTOOLS_IPF_CC_FLAGS             = /nologo /c /WX /GS- /X /W4 /Gy /Ox /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zx /QIPF_fr32\r
   DEBUG_MYTOOLS_IPF_ASM_FLAGS            = -N us -X explicit -M ilp64 -N so -W4 -d debug\r
 RELEASE_MYTOOLS_IPF_ASM_FLAGS            = -N us -X explicit -M ilp64 -N so -W4\r
   DEBUG_MYTOOLS_IPF_DLINK_FLAGS          = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF /OPT:ICF=10 /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG\r
@@ -760,3 +766,8 @@ RELEASE_MYTOOLS_IPF_DLINK_FLAGS          = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_MYTOOLS_EBC_SLINK_FLAGS                = /lib /NOLOGO /MACHINE:EBC\r
 *_MYTOOLS_EBC_DLINK_FLAGS                = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER\r
 \r
+##################\r
+# VfrCompiler definitions\r
+##################\r
+*_*_*_VFR_PATH                      = VfrCompile\r
+*_*_*_VFR_FLAGS                     = -l -n\r