## @file\r
# Create makefile for MS nmake and GNU make\r
#\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
# 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
#\r
clean:\r
\t${BEGIN}${clean_command}\r
-\t${END}\r
+\t${END}\t$(RM) AutoGenTimeStamp\r
\r
#\r
# clean all generated files\r
${BEGIN}\t${cleanall_command}\r
${END}\t$(RM) *.pdb *.idb > NUL 2>&1\r
\t$(RM) $(BIN_DIR)${separator}$(MODULE_NAME).efi\r
+\t$(RM) AutoGenTimeStamp\r
\r
#\r
# clean all dependent libraries built\r
if 'IMAGE_ENTRY_POINT' not in self._AutoGenObject.Macros.keys():\r
self._AutoGenObject.Macros['IMAGE_ENTRY_POINT'] = ImageEntryPoint\r
\r
+ PCI_COMPRESS_Flag = False\r
+ for k, v in self._AutoGenObject.Module.Defines.iteritems():\r
+ if 'PCI_COMPRESS' == k and 'TRUE' == v:\r
+ PCI_COMPRESS_Flag = True\r
+\r
# tools definitions\r
ToolsDef = []\r
IncPrefix = self._INC_FLAG_[self._AutoGenObject.ToolChainFamily]\r
# Remove duplicated include path, if any\r
if Attr == "FLAGS":\r
Value = RemoveDupOption(Value, IncPrefix, self._AutoGenObject.IncludePathList)\r
+ if Tool == "OPTROM" and PCI_COMPRESS_Flag:\r
+ ValueList = Value.split()\r
+ if ValueList:\r
+ for i, v in enumerate(ValueList):\r
+ if '-e' == v:\r
+ ValueList[i] = '-ec'\r
+ Value = ' '.join(ValueList)\r
+\r
ToolsDef.append("%s_%s = %s" % (Tool, Attr, Value))\r
ToolsDef.append("")\r
\r
break\r
else:\r
break\r
- RespDict[Key] = Value\r
+\r
+ if self._AutoGenObject.ToolChainFamily == 'GCC':\r
+ RespDict[Key] = Value.replace('\\', '/')\r
+ else:\r
+ RespDict[Key] = Value\r
for Target in BuildTargets:\r
for i, SingleCommand in enumerate(BuildTargets[Target].Commands):\r
if FlagDict[Flag]['Macro'] in SingleCommand:\r
if File.Ext == '.h':\r
ForceIncludedFile.append(File)\r
SourceFileList = []\r
+ OutPutFileList = []\r
for Target in self._AutoGenObject.IntroTargetList:\r
SourceFileList.extend(Target.Inputs)\r
+ OutPutFileList.extend(Target.Outputs)\r
+\r
+ if OutPutFileList:\r
+ for Item in OutPutFileList:\r
+ if Item in SourceFileList:\r
+ SourceFileList.remove(Item)\r
\r
self.FileDependency = self.GetFileDependency(\r
SourceFileList,\r
if not self.FileDependency[File]:\r
self.FileDependency[File] = ['$(FORCE_REBUILD)']\r
continue\r
+\r
+ self._AutoGenObject.AutoGenDepSet |= set(self.FileDependency[File])\r
+\r
# skip non-C files\r
if File.Ext not in [".c", ".C"] or File.Name == "AutoGen.c":\r
continue\r
## For creating makefile targets for dependent libraries\r
def ProcessDependentLibrary(self):\r
for LibraryAutoGen in self._AutoGenObject.LibraryAutoGenList:\r
- self.LibraryBuildDirectoryList.append(self.PlaceMacro(LibraryAutoGen.BuildDir, self.Macros))\r
+ if not LibraryAutoGen.IsBinaryModule:\r
+ self.LibraryBuildDirectoryList.append(self.PlaceMacro(LibraryAutoGen.BuildDir, self.Macros))\r
\r
## Return a list containing source file's dependencies\r
#\r
if GlobalData.BuildOptionPcd:\r
for index, option in enumerate(GlobalData.gCommand):\r
if "--pcd" == option and GlobalData.gCommand[index+1]:\r
- ExtraOption += " --pcd " + GlobalData.gCommand[index+1]\r
+ pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')\r
+ if pcdValue.startswith('H'):\r
+ pcdValue = 'H' + '"' + pcdValue[1:] + '"'\r
+ ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
+ elif pcdValue.startswith('L'):\r
+ pcdValue = 'L' + '"' + pcdValue[1:] + '"'\r
+ ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
+ else:\r
+ ExtraOption += " --pcd " + GlobalData.gCommand[index+1]\r
\r
MakefileName = self._FILE_NAME_[self._FileType]\r
SubBuildCommandList = []\r