# @param AutoGenH The TemplateString object for header file\r
#\r
def CreateGuidDefinitionCode(Info, AutoGenC, AutoGenH):\r
- if Info.IsLibrary:\r
- return\r
-\r
if Info.ModuleType in ["USER_DEFINED", "BASE"]:\r
GuidType = "GUID"\r
else:\r
GuidType = "EFI_GUID"\r
\r
if Info.GuidList:\r
- AutoGenC.Append("\n// Guids\n")\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append("\n// Guids\n")\r
AutoGenH.Append("\n// Guids\n")\r
#\r
# GUIDs\r
#\r
for Key in Info.GuidList:\r
- AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key]))\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key]))\r
AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
\r
## Create code for protocol\r
# @param AutoGenH The TemplateString object for header file\r
#\r
def CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH):\r
- if Info.IsLibrary:\r
- return\r
-\r
if Info.ModuleType in ["USER_DEFINED", "BASE"]:\r
GuidType = "GUID"\r
else:\r
GuidType = "EFI_GUID"\r
\r
if Info.ProtocolList:\r
- AutoGenC.Append("\n// Protocols\n")\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append("\n// Protocols\n")\r
AutoGenH.Append("\n// Protocols\n")\r
#\r
# Protocol GUIDs\r
#\r
for Key in Info.ProtocolList:\r
- AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key]))\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key]))\r
AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
\r
## Create code for PPI\r
# @param AutoGenH The TemplateString object for header file\r
#\r
def CreatePpiDefinitionCode(Info, AutoGenC, AutoGenH):\r
- if Info.IsLibrary:\r
- return\r
-\r
if Info.ModuleType in ["USER_DEFINED", "BASE"]:\r
GuidType = "GUID"\r
else:\r
GuidType = "EFI_GUID"\r
\r
if Info.PpiList:\r
- AutoGenC.Append("\n// PPIs\n")\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append("\n// PPIs\n")\r
AutoGenH.Append("\n// PPIs\n")\r
#\r
# PPI GUIDs\r
#\r
for Key in Info.PpiList:\r
- AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key]))\r
+ if not Info.IsLibrary:\r
+ AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key]))\r
AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
\r
## Create code for PCD\r