From 1636265248b52b15f6cafc128a050eaea0df2220 Mon Sep 17 00:00:00 2001 From: Stephen Wilson Date: Thu, 10 Mar 2011 03:08:28 +0000 Subject: [PATCH] Add Makefile support for the Platform plugins. This patch supports building the Linux platform plugin, and should also support the MacOSX plugin as well (the MacOSX side has not been tested, unfortunately). A small typo was corrected in lldb.cpp to initialize the new platform code on Linux. llvm-svn: 127393 --- lldb/lib/Makefile | 6 +++-- lldb/source/Plugins/Makefile | 3 ++- lldb/source/Plugins/Platform/Linux/Makefile | 14 ++++++++++++ lldb/source/Plugins/Platform/MacOSX/Makefile | 15 ++++++++++++ lldb/source/Plugins/Platform/Makefile | 24 ++++++++++++++++++++ lldb/source/lldb.cpp | 2 +- 6 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 lldb/source/Plugins/Platform/Linux/Makefile create mode 100644 lldb/source/Plugins/Platform/MacOSX/Makefile create mode 100644 lldb/source/Plugins/Platform/Makefile diff --git a/lldb/lib/Makefile b/lldb/lib/Makefile index c6f726a12dd4..5cb956e0caa7 100644 --- a/lldb/lib/Makefile +++ b/lldb/lib/Makefile @@ -65,12 +65,14 @@ ifeq ($(HOST_OS),Darwin) lldbPluginObjectContainerUniversalMachO.a \ lldbPluginObjectFileMachO.a \ lldbPluginProcessGDBRemote.a \ - lldbPluginSymbolVendorMacOSX.a + lldbPluginSymbolVendorMacOSX.a \ + lldbPluginPlatformMacOSX.a endif ifeq ($(HOST_OS),Linux) USEDLIBS += lldbPluginProcessLinux.a \ - lldbPluginDynamicLoaderLinux.a + lldbPluginDynamicLoaderLinux.a \ + lldbPluginPlatformLinux.a endif include $(LEVEL)/Makefile.common diff --git a/lldb/source/Plugins/Makefile b/lldb/source/Plugins/Makefile index 58591f88daa8..fd864449c0c3 100644 --- a/lldb/source/Plugins/Makefile +++ b/lldb/source/Plugins/Makefile @@ -14,7 +14,8 @@ include $(LLDB_LEVEL)/../../Makefile.config DIRS := ABI/MacOSX-i386 ABI/SysV-x86_64 Disassembler/llvm \ ObjectContainer/BSD-Archive ObjectFile/ELF SymbolFile/DWARF \ - SymbolFile/Symtab Process/Utility DynamicLoader/Static + SymbolFile/Symtab Process/Utility DynamicLoader/Static \ + Platform ifeq ($(HOST_OS),Darwin) DIRS += DynamicLoader/MacOSX-DYLD ObjectContainer/Universal-Mach-O \ diff --git a/lldb/source/Plugins/Platform/Linux/Makefile b/lldb/source/Plugins/Platform/Linux/Makefile new file mode 100644 index 000000000000..2877fddf0bcd --- /dev/null +++ b/lldb/source/Plugins/Platform/Linux/Makefile @@ -0,0 +1,14 @@ +##===- source/Plugins/Platform/Linux/Makefile --------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LLDB_LEVEL := ../../../.. +LIBRARYNAME := lldbPluginPlatformLinux +BUILD_ARCHIVE = 1 + +include $(LLDB_LEVEL)/Makefile diff --git a/lldb/source/Plugins/Platform/MacOSX/Makefile b/lldb/source/Plugins/Platform/MacOSX/Makefile new file mode 100644 index 000000000000..3e61dc982bd6 --- /dev/null +++ b/lldb/source/Plugins/Platform/MacOSX/Makefile @@ -0,0 +1,15 @@ +##===- source/Plugins/Platform/MacOSX/Makefile -------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LLDB_LEVEL := ../../../.. +LIBRARYNAME := lldbPluginPlatformMacOSX +BUILD_ARCHIVE = 1 + +include $(LLDB_LEVEL)/Makefile + diff --git a/lldb/source/Plugins/Platform/Makefile b/lldb/source/Plugins/Platform/Makefile new file mode 100644 index 000000000000..dce1fa5c8bb0 --- /dev/null +++ b/lldb/source/Plugins/Platform/Makefile @@ -0,0 +1,24 @@ +##===- source/Plugins/Platform/Makefile --------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LLDB_LEVEL := ../../.. + +include $(LLDB_LEVEL)/../../Makefile.config + +DIRS := + +ifeq ($(HOST_OS),Darwin) + DIRS += MacOSX +endif + +ifeq ($(HOST_OS),Linux) + DIRS += Linux +endif + +include $(LLDB_LEVEL)/Makefile diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp index 80961532929e..e1b54e923a80 100644 --- a/lldb/source/lldb.cpp +++ b/lldb/source/lldb.cpp @@ -104,7 +104,7 @@ lldb_private::Initialize () PlatformMacOSX::Initialize(); #endif #if defined (__linux__) - ProcessLinux::Initialize(); + PlatformLinux::Initialize(); ProcessLinux::Initialize(); DynamicLoaderLinuxDYLD::Initialize(); #endif