[lldb-dev] [PATCH] Compiling lldb on Linux

Eli Friedman eli.friedman at gmail.com
Wed Jul 7 15:29:34 PDT 2010


On Wed, Jul 7, 2010 at 11:43 AM, Greg Clayton <gclayton at apple.com> wrote:
> Eli, did you have some Makefile changes that I can use to get swig generation going so I can see the issue you were running into?

Here's the precise version which doesn't link.

-Eli
-------------- next part --------------
Index: include/lldb/Makefile
===================================================================
--- include/lldb/Makefile	(revision 0)
+++ include/lldb/Makefile	(revision 0)
@@ -0,0 +1,31 @@
+LEVEL = ../../../..
+DIRS :=
+
+include $(LEVEL)/Makefile.common
+
+install-local::
+	$(Echo) Installing Clang include files
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
+	$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include/clang" ; then \
+	  cd $(PROJ_SRC_ROOT)/tools/clang/include && \
+	  for  hdr in `find clang -type f '!' '(' -name '*~' \
+	      -o -name '.#*' -o -name '*.in' -o -name '*.txt' \
+	      -o -name 'Makefile' -o -name '*.td' -o -name '*.orig' ')' -print \
+              | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
+	    instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+	    if test \! -d "$$instdir" ; then \
+	      $(EchoCmd) Making install directory $$instdir ; \
+	      $(MKDIR) $$instdir ;\
+	    fi ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+	$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang" ; then \
+	  cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
+	  for hdr in `find clang -type f '!' '(' -name 'Makefile' ')' -print \
+            | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+endif
Index: include/Makefile
===================================================================
--- include/Makefile	(revision 0)
+++ include/Makefile	(revision 0)
@@ -0,0 +1,13 @@
+##===- include/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 := ..
+DIRS := lldb
+
+include $(LLDB_LEVEL)/Makefile
Index: scripts/generate-vers.pl
===================================================================
--- scripts/generate-vers.pl	(revision 0)
+++ scripts/generate-vers.pl	(revision 0)
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+sub usage()
+{
+  print "Usage: generate-vers.pl /path/toproject.pbxproj";
+  exit(0);
+}
+
+(scalar @ARGV == 1) or usage();
+
+open $pbxproj, $ARGV[0] or die "Couldn't open ".$ARGV[0];
+
+$current_project_version = None;
+$product_name = None;
+
+while ($line = <$pbxproj>)
+{
+  chomp ($line);
+  
+  if ($current_project_version == None &&
+      $line =~ /CURRENT_PROJECT_VERSION = ([0-9]+)/)
+  {
+    $current_project_version = $1;
+  }
+  
+  if ($product_name == None &&
+      $line =~ /productName = ([^;]+)/)
+  {
+    $product_name = $1;
+  }
+}
+
+if (!$product_name || !$current_project_version)
+{
+  print "Couldn't get needed information from the .pbxproj";
+  exit(-1);
+}
+
+$uppercase_name = uc $product_name;
+$lowercase_name = lc $product_name;
+
+close $pbxproj;
+
+$file_string = " const unsigned char ".$uppercase_name."VersionString[] __attribute__ ((used)) = \"@(#)PROGRAM:".$uppercase_name."  PROJECT:".$lowercase_name."-".$current_project_version."\" \"\\n\"; const double ".$uppercase_name."VersionNumber __attribute__ ((used)) = (double)".$current_project_version.".;\n";
+
+print $file_string;

Property changes on: scripts/generate-vers.pl
___________________________________________________________________
Added: svn:executable
   + *

Index: tools/driver/Makefile
===================================================================
--- tools/driver/Makefile	(revision 0)
+++ tools/driver/Makefile	(revision 0)
@@ -0,0 +1,34 @@
+##===- tools/driver/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 := ../..
+
+TOOLNAME = lldb
+
+LD.Flags += -ledit -lpython2.6
+
+# Include this here so we can get the configuration of the targets that have
+# been configured for construction. We have to do this early so we can set up
+# LINK_COMPONENTS before including Makefile.rules
+include $(LLDB_LEVEL)/../../Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
+                   ipo selectiondag jit
+
+USEDLIBS = lldbGenerated.a lldbAPI.a lldbInitAndLog.a lldbPluginDisassemblerLLVM.a \
+           lldbPluginObjectFileELF.a lldbPluginObjectContainerBSDArchive.a \
+           lldbPluginSymbolFileDWARF.a lldbPluginSymbolFileSymtab.a \
+           lldbPluginSymbolVendorMacOSX.a
+USEDLIBS += lldbTarget.a lldbInterpreter.a lldbCommands.a lldbBreakpoint.a \
+            lldbCore.a lldbSymbol.a lldbExpression.a lldbUtility.a
+USEDLIBS += lldbHostLinux.a lldbHostPosix.a
+USEDLIBS += clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
+            clangChecker.a clangAnalysis.a clangRewrite.a  clangAST.a \
+            clangParse.a clangLex.a clangBasic.a
+USEDLIBS += EnhancedDisassembly.a
+include $(LLDB_LEVEL)/Makefile
Index: tools/Makefile
===================================================================
--- tools/Makefile	(revision 0)
+++ tools/Makefile	(revision 0)
@@ -0,0 +1,13 @@
+##===- source/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 := ..
+DIRS := driver
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolVendor/MacOSX/Makefile
===================================================================
--- source/Plugins/SymbolVendor/MacOSX/Makefile	(revision 0)
+++ source/Plugins/SymbolVendor/MacOSX/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolVendor/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 := lldbPluginSymbolVendorMacOSX
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolFile/Symtab/Makefile
===================================================================
--- source/Plugins/SymbolFile/Symtab/Makefile	(revision 0)
+++ source/Plugins/SymbolFile/Symtab/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/Symtab/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 := lldbPluginSymbolFileSymtab
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolFile/DWARF/Makefile
===================================================================
--- source/Plugins/SymbolFile/DWARF/Makefile	(revision 0)
+++ source/Plugins/SymbolFile/DWARF/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/DWARF/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 := lldbPluginSymbolFileDWARF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectFile/ELF/Makefile
===================================================================
--- source/Plugins/ObjectFile/ELF/Makefile	(revision 0)
+++ source/Plugins/ObjectFile/ELF/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectFile/ELF/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 := lldbPluginObjectFileELF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectContainer/BSD-Archive/Makefile
===================================================================
--- source/Plugins/ObjectContainer/BSD-Archive/Makefile	(revision 0)
+++ source/Plugins/ObjectContainer/BSD-Archive/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/BSD-Archive/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 := lldbPluginObjectContainerBSDArchive
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectContainer/Universal-Mach-O/Makefile
===================================================================
--- source/Plugins/ObjectContainer/Universal-Mach-O/Makefile	(revision 0)
+++ source/Plugins/ObjectContainer/Universal-Mach-O/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/Universal-Mach-O/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 := lldbPluginObjectContainerUniversalMachO
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ABI/SysV-x86_64/Makefile
===================================================================
--- source/Plugins/ABI/SysV-x86_64/Makefile	(revision 0)
+++ source/Plugins/ABI/SysV-x86_64/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/SysV-x86_64/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 := lldbPluginABISysV_x86_64
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ABI/MacOSX-i386/Makefile
===================================================================
--- source/Plugins/ABI/MacOSX-i386/Makefile	(revision 0)
+++ source/Plugins/ABI/MacOSX-i386/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/MacOSX-i386/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 := lldbPluginABIMacOSX_i386
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Disassembler/llvm/Makefile
===================================================================
--- source/Plugins/Disassembler/llvm/Makefile	(revision 0)
+++ source/Plugins/Disassembler/llvm/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/Disassembler/llvm/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 := lldbPluginDisassemblerLLVM
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Makefile
===================================================================
--- source/Plugins/Makefile	(revision 0)
+++ source/Plugins/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/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 := ../..
+# DynamicLoader/MacOSX-DYLD ObjectContainer/Universal-Mach-O ObjectFile/Mach-O Process/gdb-remote Process/MacOSX-User Process/Utility
+DIRS := ABI/MacOSX-i386 ABI/SysV-x86_64 Disassembler/llvm  ObjectContainer/BSD-Archive ObjectFile/ELF  SymbolFile/DWARF SymbolFile/Symtab SymbolVendor/MacOSX
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Process/gdb-remote/Makefile
===================================================================
--- source/Plugins/Process/gdb-remote/Makefile	(revision 0)
+++ source/Plugins/Process/gdb-remote/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/Process/gdb-remote/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 := lldbPluginProcessGDBRemote
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Target/Makefile
===================================================================
--- source/Target/Makefile	(revision 0)
+++ source/Target/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Target/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 := lldbTarget
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Core/Makefile
===================================================================
--- source/Core/Makefile	(revision 0)
+++ source/Core/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Core/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 := lldbCore
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Breakpoint/Makefile
===================================================================
--- source/Breakpoint/Makefile	(revision 0)
+++ source/Breakpoint/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Breakpoint/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 := lldbBreakpoint
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Generated/Makefile
===================================================================
--- source/Generated/Makefile	(revision 0)
+++ source/Generated/Makefile	(revision 0)
@@ -0,0 +1,22 @@
+##===- source/Generated/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 := lldbGenerated
+BUILD_ARCHIVE = 1
+
+BUILT_SOURCES = LLDB_vers.c LLDBWrapPython.cpp
+
+include $(LLDB_LEVEL)/Makefile
+
+LLDB_vers.c: $(PROJ_SRC_DIR)/../../scripts/generate-vers.pl $(PROJ_SRC_DIR)/../../lldb.xcodeproj/project.pbxproj
+	$(PROJ_SRC_DIR)/../../scripts/generate-vers.pl $(PROJ_SRC_DIR)/../../lldb.xcodeproj/project.pbxproj > $(PROJ_OBJ_DIR)/LLDB_vers.c
+
+LLDBWrapPython.cpp: $(PROJ_SRC_DIR)/../../scripts/lldb.swig
+	swig -c++ -shadow -python -I$(PROJ_SRC_DIR)/../../include -I./. -outdir $(PROJ_OBJ_DIR) -o $(PROJ_OBJ_DIR)/LLDBWrapPython.cpp $(PROJ_SRC_DIR)/../../scripts/lldb.swig
Index: source/Expression/Makefile
===================================================================
--- source/Expression/Makefile	(revision 0)
+++ source/Expression/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Expression/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 := lldbExpression
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Commands/Makefile
===================================================================
--- source/Commands/Makefile	(revision 0)
+++ source/Commands/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Commands/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 := lldbCommands
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Interpreter/Makefile
===================================================================
--- source/Interpreter/Makefile	(revision 0)
+++ source/Interpreter/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Interpreter/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 := lldbInterpreter
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Utility/Makefile
===================================================================
--- source/Utility/Makefile	(revision 0)
+++ source/Utility/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Utility/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 := lldbUtility
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Symbol/Makefile
===================================================================
--- source/Symbol/Makefile	(revision 0)
+++ source/Symbol/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Symbol/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 := lldbSymbol
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/API/Makefile
===================================================================
--- source/API/Makefile	(revision 0)
+++ source/API/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/API/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 := lldbAPI
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/linux/Makefile
===================================================================
--- source/Host/linux/Makefile	(revision 0)
+++ source/Host/linux/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Host/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 := lldbHostLinux
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/posix/Makefile
===================================================================
--- source/Host/posix/Makefile	(revision 0)
+++ source/Host/posix/Makefile	(revision 0)
@@ -0,0 +1,14 @@
+##===- source/Host/posix/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 := lldbHostPosix
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/Makefile
===================================================================
--- source/Host/Makefile	(revision 0)
+++ source/Host/Makefile	(revision 0)
@@ -0,0 +1,13 @@
+##===- source/Host/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 := ../..
+DIRS := linux posix
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Makefile
===================================================================
--- source/Makefile	(revision 0)
+++ source/Makefile	(revision 0)
@@ -0,0 +1,15 @@
+##===- source/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 := ..
+DIRS := API Breakpoint Commands Core Expression Host Interpreter Plugins Symbol Target Utility
+LIBRARYNAME := lldbInitAndLog
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: Makefile
===================================================================
--- Makefile	(revision 0)
+++ Makefile	(revision 0)
@@ -0,0 +1,84 @@
+##===- Makefile --------------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+# If LLDB_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef LLDB_LEVEL
+
+IS_TOP_LEVEL := 1
+LLDB_LEVEL := .
+DIRS := include source tools
+
+PARALLEL_DIRS :=
+endif
+
+###
+# Common Makefile code, shared by all LLDB Makefiles.
+
+# Set LLVM source root level.
+LEVEL := $(LLDB_LEVEL)/../..
+
+# Include LLVM common makefile.
+include $(LEVEL)/Makefile.common
+
+# Set common LLDB build flags.
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/../clang/include
+CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/../clang/include
+CPP.Flags += -I/usr/include/python2.6
+ifdef LLDB_VENDOR
+CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
+endif
+
+# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
+# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
+# GCC's have false positive warnings with it on Linux (which prove a pain to
+# fix). For example:
+#   http://gcc.gnu.org/PR41874
+#   http://gcc.gnu.org/PR41838
+#
+# We can revisit this when LLVM/Clang support it.
+CXX.Flags += -fno-strict-aliasing
+
+###
+# LLDB Top Level specific stuff.
+
+ifeq ($(IS_TOP_LEVEL),1)
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+	$(Verb) if [ ! -f test/Makefile ]; then \
+	  $(MKDIR) test; \
+	  $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
+	fi
+endif
+
+test::
+	@ $(MAKE) -C test
+
+report::
+	@ $(MAKE) -C test report
+
+clean::
+	@ $(MAKE) -C test clean
+
+tags::
+	$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
+	  grep -v /lib/Headers | grep -v /test/`
+
+cscope.files:
+	find tools lib include -name '*.cpp' \
+	                    -or -name '*.def' \
+	                    -or -name '*.td' \
+	                    -or -name '*.h' > cscope.files
+
+.PHONY: test report clean cscope.files
+
+endif


More information about the lldb-dev mailing list