Add Android.mk support for building LLDB on Linux host.

This change adds support for building LLDB with the following
build command from the top level:

make FORCE_BUILD_LLVM_COMPONENTS=true ANDROID_BUILD_LLDB=true lldb

There are known issues with the google linux host gcc 4.6.2+ variant
currently used to build host executables.  A follow up change will
apply a temporary work-around that will be used until either the
compiler is fixed or a new compiler is used.

Change-Id: I18451f73cbe2264074cd8fba6397680855352a93
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..19b780a
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,33 @@
+# Don't build LLDB unless we explicitly ask for it.
+# This guard will be removed once lldb is working
+# against Android devices.
+ifeq (true,$(ANDROID_BUILD_LLDB))
+
+LOCAL_PATH := $(call my-dir)
+LLDB_ROOT_PATH := $(LOCAL_PATH)
+
+include $(CLEAR_VARS)
+
+subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
+  source \
+  source/API \
+  source/Breakpoint \
+  source/Commands \
+  source/Core \
+  source/DataFormatters \
+  source/Expression \
+  source/Host \
+  source/Interpreter \
+  source/Plugins \
+  source/Symbol \
+  source/Target \
+  source/Utility \
+  tools/driver \
+  ))
+
+include $(LOCAL_PATH)/lldb.mk
+include $(LOCAL_PATH)/host_shared_lldb.mk
+
+include $(subdirs)
+
+endif # don't build LLDB unless forced to
diff --git a/host_shared_lldb.mk b/host_shared_lldb.mk
new file mode 100644
index 0000000..9fec7bb
--- /dev/null
+++ b/host_shared_lldb.mk
@@ -0,0 +1,80 @@
+# Don't build the library unless forced to.
+ifeq (true,$(ANDROID_BUILD_LLDB))
+# Don't build the library in unbundled branches.
+ifeq (,$(TARGET_BUILD_APPS))
+
+LOCAL_PATH:= $(call my-dir)
+
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_MODULE:= liblldb
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+	liblldbInitAndLog \
+	liblldbAPI \
+	liblldbBreakpoint \
+	liblldbCommands \
+	liblldbCore \
+	liblldbDataFormatters \
+	liblldbExpression \
+	liblldbHostCommon \
+	liblldbHostLinux \
+	liblldbInterpreter \
+	liblldbPluginABIMacOSX_arm \
+	liblldbPluginABIMacOSX_i386 \
+	liblldbPluginABISysV_x86_64 \
+	liblldbPluginDisassemblerLLVM \
+	liblldbPluginDynamicLoaderMacOSX \
+	liblldbPluginDynamicLoaderPOSIX \
+	liblldbPluginDynamicLoaderStatic \
+	liblldbPluginEmulateInstructionARM \
+	liblldbPluginLanguageRuntimeCPlusPlusItaniumABI \
+	liblldbPluginLanguageRuntimeObjCAppleObjCRuntime \
+	liblldbPluginObjectContainerBSDArchive \
+	liblldbPluginObjectFileELF \
+	liblldbPluginObjectFilePECOFF \
+	liblldbPluginOperatingSystemPython \
+	liblldbPluginPlatformFreeBSD \
+	liblldbPluginPlatformGDBServer \
+	liblldbPluginPlatformLinux \
+	liblldbPluginPlatformMacOSX \
+	liblldbPluginProcessElfCore \
+	liblldbPluginProcessGDBRemote \
+	liblldbPluginProcessLinux \
+	liblldbPluginProcessPOSIX \
+	liblldbPluginSymbolFileDWARF \
+	liblldbPluginSymbolFileSymtab \
+	liblldbPluginSymbolVendorELF \
+	liblldbPluginUnwindAssemblyInstEmulation \
+	liblldbPluginUnwindAssemblyx86 \
+	liblldbPluginUtility \
+	liblldbSymbol \
+	liblldbTarget \
+	liblldbUtility
+
+LOCAL_SHARED_LIBRARIES := \
+	libLLVM \
+	libclang
+
+ifeq ($(HOST_OS),windows)
+  LOCAL_LDLIBS := -limagehlp -lpsapi
+else
+  LOCAL_LDLIBS := \
+	-ldl \
+	-lm \
+	-lpthread \
+	-lrt \
+	-lutil \
+	-lz
+endif
+
+PYTHON_BASE_PATH := prebuilts/python/linux-x86/2.7.5
+LOCAL_LDLIBS += $(PYTHON_BASE_PATH)/lib/libpython2.7.a
+
+include $(LLDB_BUILD_MK)
+include $(BUILD_HOST_SHARED_LIBRARY)
+
+endif # don't build in unbundled branches
+endif # don't build unless forced to
diff --git a/lldb-build.mk b/lldb-build.mk
new file mode 100644
index 0000000..558b0a8
--- /dev/null
+++ b/lldb-build.mk
@@ -0,0 +1,47 @@
+# clang populates much of what we need
+LOCAL_CFLAGS := \
+	-fvisibility-inlines-hidden \
+	-Wno-missing-field-initializers \
+	-Wno-sequence-point \
+	-Wno-sign-compare \
+	-Wno-uninitialized \
+	-Wno-unused-function \
+	-Wno-unused-variable \
+	$(LOCAL_CFLAGS)
+
+# TODO change this when clang or gcc > 2.6 support is added
+CPLUSPLUS_STANDARD := -std=c++0x
+
+LOCAL_CPPFLAGS := \
+	$(CPLUSPLUS_STANDARD) \
+	$(LOCAL_CPPFLAGS)
+
+PYTHON_BASE_PATH := prebuilts/python/linux-x86/2.7.5
+PYTHON_INCLUDE_PATH := $(PYTHON_BASE_PATH)/include/python2.7
+
+LOCAL_C_INCLUDES := \
+	$(PYTHON_INCLUDE_PATH) \
+	$(LLDB_ROOT_PATH)/include \
+	$(LLDB_ROOT_PATH)/source \
+	$(LLDB_ROOT_PATH)/source/Utility \
+	$(LLDB_ROOT_PATH)/source/Plugins/Process/Utility \
+	$(LLDB_ROOT_PATH)/source/Plugins/Process/POSIX \
+	$(LOCAL_C_INCLUDES)
+
+LLVM_ROOT_PATH := external/llvm
+include $(LLVM_ROOT_PATH)/llvm.mk
+
+CLANG_ROOT_PATH := external/clang
+include $(CLANG_ROOT_PATH)/clang.mk
+
+ifneq ($(LLVM_HOST_BUILD_MK),)
+include $(LLVM_HOST_BUILD_MK)
+endif
+
+ifneq ($(CLANG_HOST_BUILD_MK),)
+include $(CLANG_HOST_BUILD_MK)
+endif
+
+# strip out flags from clang/llvm that we know we don't handle
+LOCAL_CFLAGS := $(subst -pedantic,,$(LOCAL_CFLAGS))
+LOCAL_CPPFLAGS := $(subst -pedantic,,$(LOCAL_CPPFLAGS))
diff --git a/lldb.mk b/lldb.mk
new file mode 100644
index 0000000..ac92894
--- /dev/null
+++ b/lldb.mk
@@ -0,0 +1,5 @@
+ifeq ($(LLDB_ROOT_PATH),)
+$(error Must set variable LLDB_ROOT_PATH before including this! $(LOCAL_PATH))
+endif
+
+LLDB_BUILD_MK := $(LLDB_ROOT_PATH)/lldb-build.mk
diff --git a/source/API/Android.mk b/source/API/Android.mk
new file mode 100644
index 0000000..79b820b
--- /dev/null
+++ b/source/API/Android.mk
@@ -0,0 +1,69 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_API_SRC_FILES := \
+  SBAddress.cpp \
+  SBBlock.cpp \
+  SBBreakpoint.cpp \
+  SBBreakpointLocation.cpp \
+  SBBroadcaster.cpp \
+  SBCommandInterpreter.cpp \
+  SBCommandReturnObject.cpp \
+  SBCommunication.cpp \
+  SBCompileUnit.cpp \
+  SBData.cpp \
+  SBDebugger.cpp \
+  SBDeclaration.cpp \
+  SBError.cpp \
+  SBEvent.cpp \
+  SBExpressionOptions.cpp \
+  SBFileSpec.cpp \
+  SBFileSpecList.cpp \
+  SBFrame.cpp \
+  SBFunction.cpp \
+  SBHostOS.cpp \
+  SBInputReader.cpp \
+  SBInstruction.cpp \
+  SBInstructionList.cpp \
+  SBLineEntry.cpp \
+  SBListener.cpp \
+  SBModule.cpp \
+  SBModuleSpec.cpp \
+  SBProcess.cpp \
+  SBSection.cpp \
+  SBSourceManager.cpp \
+  SBStream.cpp \
+  SBStringList.cpp \
+  SBSymbolContext.cpp \
+  SBSymbolContextList.cpp \
+  SBSymbol.cpp \
+  SBTarget.cpp \
+  SBThread.cpp \
+  SBTypeCategory.cpp \
+  SBType.cpp \
+  SBTypeFilter.cpp \
+  SBTypeFormat.cpp \
+  SBTypeNameSpecifier.cpp \
+  SBTypeSummary.cpp \
+  SBTypeSynthetic.cpp \
+  SBValue.cpp \
+  SBValueList.cpp \
+  SBWatchpoint.cpp
+
+LOCAL_SRC_FILES := $(lldb_API_SRC_FILES)
+
+LOCAL_MODULE:= liblldbAPI
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Android.mk b/source/Android.mk
new file mode 100644
index 0000000..bd92711
--- /dev/null
+++ b/source/Android.mk
@@ -0,0 +1,23 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_InitAndLog_SRC_FILES := \
+  lldb.cpp \
+  lldb-log.cpp
+
+LOCAL_SRC_FILES := $(lldb_InitAndLog_SRC_FILES)
+
+LOCAL_MODULE:= liblldbInitAndLog
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Breakpoint/Android.mk b/source/Breakpoint/Android.mk
new file mode 100644
index 0000000..d478db8
--- /dev/null
+++ b/source/Breakpoint/Android.mk
@@ -0,0 +1,42 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Breakpoint_SRC_FILES := \
+  Breakpoint.cpp \
+  BreakpointID.cpp \
+  BreakpointIDList.cpp \
+  BreakpointList.cpp \
+  BreakpointLocationCollection.cpp \
+  BreakpointLocation.cpp \
+  BreakpointLocationList.cpp \
+  BreakpointOptions.cpp \
+  BreakpointResolverAddress.cpp \
+  BreakpointResolver.cpp \
+  BreakpointResolverFileLine.cpp \
+  BreakpointResolverFileRegex.cpp \
+  BreakpointResolverName.cpp \
+  BreakpointSite.cpp \
+  BreakpointSiteList.cpp \
+  StoppointCallbackContext.cpp \
+  Stoppoint.cpp \
+  StoppointLocation.cpp \
+  Watchpoint.cpp \
+  WatchpointList.cpp \
+  WatchpointOptions.cpp
+
+LOCAL_SRC_FILES := $(lldb_Breakpoint_SRC_FILES)
+
+LOCAL_MODULE:= liblldbBreakpoint
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Commands/Android.mk b/source/Commands/Android.mk
new file mode 100644
index 0000000..4003c4e
--- /dev/null
+++ b/source/Commands/Android.mk
@@ -0,0 +1,48 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Commands_SRC_FILES := \
+  CommandCompletions.cpp \
+  CommandObjectApropos.cpp \
+  CommandObjectArgs.cpp \
+  CommandObjectBreakpointCommand.cpp \
+  CommandObjectBreakpoint.cpp \
+  CommandObjectCommands.cpp \
+  CommandObjectDisassemble.cpp \
+  CommandObjectExpression.cpp \
+  CommandObjectFrame.cpp \
+  CommandObjectHelp.cpp \
+  CommandObjectLog.cpp \
+  CommandObjectMemory.cpp \
+  CommandObjectMultiword.cpp \
+  CommandObjectPlatform.cpp \
+  CommandObjectPlugin.cpp \
+  CommandObjectProcess.cpp \
+  CommandObjectQuit.cpp \
+  CommandObjectRegister.cpp \
+  CommandObjectSettings.cpp \
+  CommandObjectSource.cpp \
+  CommandObjectSyntax.cpp \
+  CommandObjectTarget.cpp \
+  CommandObjectThread.cpp \
+  CommandObjectType.cpp \
+  CommandObjectVersion.cpp \
+  CommandObjectWatchpointCommand.cpp \
+  CommandObjectWatchpoint.cpp
+
+LOCAL_SRC_FILES := $(lldb_Commands_SRC_FILES)
+
+LOCAL_MODULE:= liblldbCommands
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Core/Android.mk b/source/Core/Android.mk
new file mode 100644
index 0000000..46b6017
--- /dev/null
+++ b/source/Core/Android.mk
@@ -0,0 +1,92 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Core_SRC_FILES := \
+  Address.cpp \
+  AddressRange.cpp \
+  AddressResolver.cpp \
+  AddressResolverFileLine.cpp \
+  AddressResolverName.cpp \
+  ArchSpec.cpp \
+  Baton.cpp \
+  Broadcaster.cpp \
+  Communication.cpp \
+  Connection.cpp \
+  ConnectionFileDescriptor.cpp \
+  ConnectionMachPort.cpp \
+  ConnectionSharedMemory.cpp \
+  ConstString.cpp \
+  DataBufferHeap.cpp \
+  DataBufferMemoryMap.cpp \
+  DataEncoder.cpp \
+  DataExtractor.cpp \
+  Debugger.cpp \
+  Disassembler.cpp \
+  DynamicLoader.cpp \
+  EmulateInstruction.cpp \
+  Error.cpp \
+  Event.cpp \
+  FileLineResolver.cpp \
+  FileSpecList.cpp \
+  History.cpp \
+  InputReader.cpp \
+  InputReaderEZ.cpp \
+  InputReaderStack.cpp \
+  Language.cpp \
+  Listener.cpp \
+  Log.cpp \
+  Mangled.cpp \
+  ModuleChild.cpp \
+  Module.cpp \
+  ModuleList.cpp \
+  Opcode.cpp \
+  PluginManager.cpp \
+  RegisterValue.cpp \
+  RegularExpression.cpp \
+  Scalar.cpp \
+  SearchFilter.cpp \
+  Section.cpp \
+  SourceManager.cpp \
+  State.cpp \
+  StreamAsynchronousIO.cpp \
+  StreamCallback.cpp \
+  Stream.cpp \
+  StreamFile.cpp \
+  StreamString.cpp \
+  StringList.cpp \
+  Timer.cpp \
+  UserID.cpp \
+  UserSettingsController.cpp \
+  UUID.cpp \
+  Value.cpp \
+  ValueObjectCast.cpp \
+  ValueObjectChild.cpp \
+  ValueObjectConstResultChild.cpp \
+  ValueObjectConstResult.cpp \
+  ValueObjectConstResultImpl.cpp \
+  ValueObject.cpp \
+  ValueObjectDynamicValue.cpp \
+  ValueObjectList.cpp \
+  ValueObjectMemory.cpp \
+  ValueObjectRegister.cpp \
+  ValueObjectSyntheticFilter.cpp \
+  ValueObjectVariable.cpp \
+  VMRange.cpp
+
+LOCAL_SRC_FILES := $(lldb_Core_SRC_FILES)
+
+LOCAL_MODULE:= liblldbCore
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/DataFormatters/Android.mk b/source/DataFormatters/Android.mk
new file mode 100644
index 0000000..e7276a6
--- /dev/null
+++ b/source/DataFormatters/Android.mk
@@ -0,0 +1,41 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_DataFormatters_SRC_FILES := \
+  CF.cpp \
+  Cocoa.cpp \
+  CXXFormatterFunctions.cpp \
+  DataVisualization.cpp \
+  FormatCache.cpp \
+  FormatClasses.cpp \
+  FormatManager.cpp \
+  LibCxx.cpp \
+  LibCxxList.cpp \
+  LibCxxMap.cpp \
+  LibStdcpp.cpp \
+  NSArray.cpp \
+  NSDictionary.cpp \
+  NSSet.cpp \
+  TypeCategory.cpp \
+  TypeCategoryMap.cpp \
+  TypeFormat.cpp \
+  TypeSummary.cpp \
+  TypeSynthetic.cpp
+
+LOCAL_SRC_FILES := $(lldb_DataFormatters_SRC_FILES)
+
+LOCAL_MODULE:= liblldbDataFormatters
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Expression/Android.mk b/source/Expression/Android.mk
new file mode 100644
index 0000000..46858a2
--- /dev/null
+++ b/source/Expression/Android.mk
@@ -0,0 +1,46 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  AttrParsedAttrList.inc \
+  Attrs.inc \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DiagnosticFrontendKinds.inc \
+  DiagnosticSemaKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Expression_SRC_FILES := \
+  ASTDumper.cpp \
+  ASTResultSynthesizer.cpp \
+  ASTStructExtractor.cpp \
+  ClangASTSource.cpp \
+  ClangExpressionDeclMap.cpp \
+  ClangExpressionParser.cpp \
+  ClangExpressionVariable.cpp \
+  ClangFunction.cpp \
+  ClangPersistentVariables.cpp \
+  ClangUserExpression.cpp \
+  ClangUtilityFunction.cpp \
+  DWARFExpression.cpp \
+  ExpressionSourceCode.cpp \
+  IRDynamicChecks.cpp \
+  IRExecutionUnit.cpp \
+  IRForTarget.cpp \
+  IRInterpreter.cpp \
+  IRMemoryMap.cpp \
+  Materializer.cpp
+
+LOCAL_SRC_FILES := $(lldb_Expression_SRC_FILES)
+
+LOCAL_MODULE:= liblldbExpression
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Host/Android.mk b/source/Host/Android.mk
new file mode 100644
index 0000000..a621f3f
--- /dev/null
+++ b/source/Host/Android.mk
@@ -0,0 +1,21 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+dirs := common
+
+ifeq ($(HOST_OS),darwin)
+dirs += macosx
+endif
+
+ifeq ($(HOST_OS),linux)
+dirs += linux
+endif
+
+ifneq (,$(filter $(HOST_OS), freebsd))
+dirs += freebsd
+endif
+
+subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, $(dirs)))
+
+include $(subdirs)
diff --git a/source/Host/common/Android.mk b/source/Host/common/Android.mk
new file mode 100644
index 0000000..05e579c
--- /dev/null
+++ b/source/Host/common/Android.mk
@@ -0,0 +1,31 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_HostCommon_SRC_FILES := \
+  Condition.cpp \
+  DynamicLibrary.cpp \
+  File.cpp \
+  FileSpec.cpp \
+  Host.cpp \
+  Mutex.cpp \
+  SocketAddress.cpp \
+  Symbols.cpp \
+  Terminal.cpp \
+  TimeValue.cpp
+
+LOCAL_SRC_FILES := $(lldb_HostCommon_SRC_FILES)
+
+LOCAL_MODULE:= liblldbHostCommon
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Host/freebsd/Android.mk b/source/Host/freebsd/Android.mk
new file mode 100644
index 0000000..4c31ccd
--- /dev/null
+++ b/source/Host/freebsd/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+ TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_HostFreeBSD_SRC_FILES := \
+  Host.cpp
+
+LOCAL_SRC_FILES := $(lldb_HostFreeBSD_SRC_FILES)
+
+LOCAL_MODULE:= liblldbHostFreeBSD
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Host/linux/Android.mk b/source/Host/linux/Android.mk
new file mode 100644
index 0000000..55da4bd
--- /dev/null
+++ b/source/Host/linux/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+ TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_HostLinux_SRC_FILES := \
+  Host.cpp
+
+LOCAL_SRC_FILES := $(lldb_HostLinux_SRC_FILES)
+
+LOCAL_MODULE:= liblldbHostLinux
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Host/macosx/Android.mk b/source/Host/macosx/Android.mk
new file mode 100644
index 0000000..5df135f
--- /dev/null
+++ b/source/Host/macosx/Android.mk
@@ -0,0 +1,27 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_HostMacOSX_SRC_FILES := \
+  Host.mm \
+  Symbols.cpp
+
+lldb_HostMacOSX_CFCPP_SRC_FILES := \
+	$(addprefix cfcpp/,$(notdir $(wildcard $(LOCAL_PATH)/cfcpp/*.cpp)))
+
+LOCAL_SRC_FILES := $(lldb_HostMacOSX_SRC_FILES) \
+	$(lldb_HostMacOSX_CFCPP_SRC_FILES)
+
+LOCAL_MODULE:= liblldbHostMacOSX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Interpreter/Android.mk b/source/Interpreter/Android.mk
new file mode 100644
index 0000000..ff0e21d
--- /dev/null
+++ b/source/Interpreter/Android.mk
@@ -0,0 +1,74 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  Args.cpp \
+  CommandHistory.cpp \
+  CommandInterpreter.cpp \
+  CommandObject.cpp \
+  CommandObjectRegexCommand.cpp \
+  CommandObjectScript.cpp \
+  CommandReturnObject.cpp \
+  OptionGroupArchitecture.cpp \
+  OptionGroupBoolean.cpp \
+  OptionGroupFile.cpp \
+  OptionGroupFormat.cpp \
+  OptionGroupOutputFile.cpp \
+  OptionGroupPlatform.cpp \
+  OptionGroupString.cpp \
+  OptionGroupUInt64.cpp \
+  OptionGroupUUID.cpp \
+  OptionGroupValueObjectDisplay.cpp \
+  OptionGroupVariable.cpp \
+  OptionGroupWatchpoint.cpp \
+  Options.cpp \
+  OptionValueArch.cpp \
+  OptionValueArgs.cpp \
+  OptionValueArray.cpp \
+  OptionValueBoolean.cpp \
+  OptionValue.cpp \
+  OptionValueDictionary.cpp \
+  OptionValueEnumeration.cpp \
+  OptionValueFileSpec.cpp \
+  OptionValueFileSpecLIst.cpp \
+  OptionValueFormat.cpp \
+  OptionValuePathMappings.cpp \
+  OptionValueProperties.cpp \
+  OptionValueRegex.cpp \
+  OptionValueSInt64.cpp \
+  OptionValueString.cpp \
+  OptionValueUInt64.cpp \
+  OptionValueUUID.cpp \
+  Property.cpp \
+  PythonDataObjects.cpp \
+  ScriptInterpreter.cpp \
+  ScriptInterpreterNone.cpp \
+  ScriptInterpreterPython.cpp
+
+LOCAL_MODULE := liblldbInterpreter
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+
+WRAP_PYTHON_MK := $(LOCAL_PATH)/wrap_python.mk
+include $(WRAP_PYTHON_MK)
+
+# SWIG binding generates a bunch of these, so squelch
+# them.
+LOCAL_CPPFLAGS := \
+	-Wno-cast-qual \
+	-Wno-format \
+	-Wno-unused-but-set-variable \
+	$(LOCAL_CPPFLAGS)
+
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Interpreter/wrap_python.mk b/source/Interpreter/wrap_python.mk
new file mode 100644
index 0000000..a1b7c85
--- /dev/null
+++ b/source/Interpreter/wrap_python.mk
@@ -0,0 +1,19 @@
+intermediates := $(call local-intermediates-dir)
+
+LOCAL_GENERATED_SOURCES += \
+  $(intermediates)/LLDBWrapPython.cpp
+
+LLDB_ROOT_PATH_ABS := $(abspath $(LLDB_ROOT_PATH))
+
+# setup target-specific variables; otherwise, this evaluates to a
+# device-specific path when we want the host-specific path.
+$(intermediates)/LLDBWrapPython.cpp $(intermediates)/lldb.py: \
+	intermediates_abs := $(abspath .)/$(intermediates)
+
+$(intermediates)/LLDBWrapPython.cpp $(intermediates)/lldb.py: $(LLDB_ROOT_PATH)/scripts/Python/modify-python-lldb.py \
+                            $(LLDB_ROOT_PATH)/scripts/Python/edit-swig-python-wrapper-file.py \
+                            $(wildcard $(LLDB_ROOT_PATH)/scripts/Python/interface/*.i)
+	@echo "Generating LLDBWrapPython.cpp"
+	$(hide) mkdir -p $(intermediates)
+	$(hide) "$(LLDB_ROOT_PATH_ABS)/scripts/build-swig-wrapper-classes.sh" "$(LLDB_ROOT_PATH_ABS)" "$(intermediates_abs)" "$(intermediates_abs)" "$(intermediates_abs)" -m
+	$(hide) "$(LLDB_ROOT_PATH_ABS)/scripts/finish-swig-wrapper-classes.sh" "$(LLDB_ROOT_PATH_ABS)" "$(intermediates_abs)" "$(intermediates_abs)" "$(intermediates_abs)" -m
diff --git a/source/Plugins/ABI/MacOSX-arm/Android.mk b/source/Plugins/ABI/MacOSX-arm/Android.mk
new file mode 100644
index 0000000..3e2eb9a
--- /dev/null
+++ b/source/Plugins/ABI/MacOSX-arm/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginABIMacOSX_arm_SRC_FILES := \
+  ABIMacOSX_arm.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginABIMacOSX_arm_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginABIMacOSX_arm
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ABI/MacOSX-i386/Android.mk b/source/Plugins/ABI/MacOSX-i386/Android.mk
new file mode 100644
index 0000000..3460dc7
--- /dev/null
+++ b/source/Plugins/ABI/MacOSX-i386/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginABIMacOSX_i386_SRC_FILES := \
+  ABIMacOSX_i386.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginABIMacOSX_i386_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginABIMacOSX_i386
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ABI/SysV-x86_64/Android.mk b/source/Plugins/ABI/SysV-x86_64/Android.mk
new file mode 100644
index 0000000..76af30b
--- /dev/null
+++ b/source/Plugins/ABI/SysV-x86_64/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginABISysV_x86_64_SRC_FILES := \
+  ABISysV_x86_64.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginABISysV_x86_64_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginABISysV_x86_64
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Android.mk b/source/Plugins/Android.mk
new file mode 100644
index 0000000..b868087
--- /dev/null
+++ b/source/Plugins/Android.mk
@@ -0,0 +1,60 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+dirs := \
+  ABI/MacOSX-arm \
+  ABI/MacOSX-i386 \
+  ABI/SysV-x86_64 \
+  Disassembler/llvm \
+  DynamicLoader/POSIX-DYLD \
+  DynamicLoader/Static \
+  Instruction/ARM \
+  LanguageRuntime/CPlusPlus/ItaniumABI \
+  LanguageRuntime/ObjC/AppleObjCRuntime \
+  ObjectContainer/BSD-Archive \
+  ObjectFile/ELF \
+  ObjectFile/PECOFF \
+  OperatingSystem/Python \
+  Platform/gdb-server \
+  Platform/MacOSX \
+  Platform/Linux \
+  Platform/FreeBSD \
+  Process/gdb-remote \
+  Process/Utility \
+  SymbolFile/DWARF \
+  SymbolFile/Symtab \
+  UnwindAssembly/InstEmulation \
+  UnwindAssembly/x86
+
+ifeq ($(HOST_OS),darwin)
+dirs += \
+  DynamicLoader/Darwin-Kernel \
+  DynamicLoader/MacOSX-DYLD \
+  ObjectContainer/Universal-Mach-O \
+  ObjectFile/Mach-O \
+  Process/mach-core \
+  Process/MacOSX-Kernel \
+  SymbolVendor/MacOSX
+endif
+
+ifeq ($(HOST_OS),linux)
+dirs += \
+  DynamicLoader/MacOSX-DYLD \
+  Process/elf-core \
+  Process/Linux \
+  Process/POSIX \
+  SymbolVendor/ELF
+endif
+
+ifneq (,$(filter $(HOST_OS), freebsd))
+dirs += \
+  Process/elf-core \
+  Process/FreeBSD \
+  Process/POSIX \
+  SymbolVendor/ELF
+endif
+
+subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, $(dirs)))
+
+include $(subdirs)
diff --git a/source/Plugins/Disassembler/llvm/Android.mk b/source/Plugins/Disassembler/llvm/Android.mk
new file mode 100644
index 0000000..b39ebd0
--- /dev/null
+++ b/source/Plugins/Disassembler/llvm/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  DisassemblerLLVMC.cpp
+
+LOCAL_MODULE:= liblldbPluginDisassemblerLLVM
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/DynamicLoader/Darwin-Kernel/Android.mk b/source/Plugins/DynamicLoader/Darwin-Kernel/Android.mk
new file mode 100644
index 0000000..c324514
--- /dev/null
+++ b/source/Plugins/DynamicLoader/Darwin-Kernel/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginDynamicLoaderDarwinKernel_SRC_FILES := \
+  DynamicLoaderDarwinKernel.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginDynamicLoaderDarwinKernel_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginDynamicLoaderDarwinKernel
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/DynamicLoader/MacOSX-DYLD/Android.mk b/source/Plugins/DynamicLoader/MacOSX-DYLD/Android.mk
new file mode 100644
index 0000000..53ddd01
--- /dev/null
+++ b/source/Plugins/DynamicLoader/MacOSX-DYLD/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginDynamicLoaderMacOSX_SRC_FILES := \
+  DynamicLoaderMacOSXDYLD.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginDynamicLoaderMacOSX_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginDynamicLoaderMacOSX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/DynamicLoader/POSIX-DYLD/Android.mk b/source/Plugins/DynamicLoader/POSIX-DYLD/Android.mk
new file mode 100644
index 0000000..5130ba4
--- /dev/null
+++ b/source/Plugins/DynamicLoader/POSIX-DYLD/Android.mk
@@ -0,0 +1,24 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginDynamicLoaderPOSIX_SRC_FILES := \
+  AuxVector.cpp \
+  DYLDRendezvous.cpp \
+  DynamicLoaderPOSIXDYLD.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginDynamicLoaderPOSIX_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginDynamicLoaderPOSIX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/DynamicLoader/Static/Android.mk b/source/Plugins/DynamicLoader/Static/Android.mk
new file mode 100644
index 0000000..139fe80
--- /dev/null
+++ b/source/Plugins/DynamicLoader/Static/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginDynamicLoaderStatic_SRC_FILES := \
+  DynamicLoaderStatic.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginDynamicLoaderStatic_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginDynamicLoaderStatic
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Instruction/ARM/Android.mk b/source/Plugins/Instruction/ARM/Android.mk
new file mode 100644
index 0000000..07d6061
--- /dev/null
+++ b/source/Plugins/Instruction/ARM/Android.mk
@@ -0,0 +1,23 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginEmulateInstructionARM_SRC_FILES := \
+  EmulateInstructionARM.cpp \
+  EmulationStateARM.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginEmulateInstructionARM_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginEmulateInstructionARM
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Android.mk b/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Android.mk
new file mode 100644
index 0000000..d4a5fdb
--- /dev/null
+++ b/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginLanguageRuntimeCPlusPlusItaniumABI_SRC_FILES := \
+  ItaniumABILanguageRuntime.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginLanguageRuntimeCPlusPlusItaniumABI_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginLanguageRuntimeCPlusPlusItaniumABI
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/Android.mk b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/Android.mk
new file mode 100644
index 0000000..7ca41fb
--- /dev/null
+++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/Android.mk
@@ -0,0 +1,28 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginLanguageRuntimeObjCAppleObjCRuntime_SRC_FILES := \
+  AppleObjCRuntime.cpp \
+  AppleObjCRuntimeV1.cpp \
+  AppleObjCRuntimeV2.cpp \
+  AppleObjCTrampolineHandler.cpp \
+  AppleObjCTypeVendor.cpp \
+  AppleThreadPlanStepThroughObjCTrampoline.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginLanguageRuntimeObjCAppleObjCRuntime_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginLanguageRuntimeObjCAppleObjCRuntime
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ObjectContainer/BSD-Archive/Android.mk b/source/Plugins/ObjectContainer/BSD-Archive/Android.mk
new file mode 100644
index 0000000..a731070
--- /dev/null
+++ b/source/Plugins/ObjectContainer/BSD-Archive/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginObjectContainerBSDArchive_SRC_FILES := \
+  ObjectContainerBSDArchive.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginObjectContainerBSDArchive_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginObjectContainerBSDArchive
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ObjectContainer/Universal-Mach-O/Android.mk b/source/Plugins/ObjectContainer/Universal-Mach-O/Android.mk
new file mode 100644
index 0000000..1387c42
--- /dev/null
+++ b/source/Plugins/ObjectContainer/Universal-Mach-O/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginObjectContainerUniversalMachO_SRC_FILES := \
+  ObjectContainerUniversalMachO.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginObjectContainerUniversalMachO_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginObjectContainerUniversalMachO
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ObjectFile/ELF/Android.mk b/source/Plugins/ObjectFile/ELF/Android.mk
new file mode 100644
index 0000000..b378f85
--- /dev/null
+++ b/source/Plugins/ObjectFile/ELF/Android.mk
@@ -0,0 +1,21 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  ELFHeader.cpp \
+  ObjectFileELF.cpp
+
+LOCAL_MODULE := liblldbPluginObjectFileELF
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ObjectFile/Mach-O/Android.mk b/source/Plugins/ObjectFile/Mach-O/Android.mk
new file mode 100644
index 0000000..47ff373
--- /dev/null
+++ b/source/Plugins/ObjectFile/Mach-O/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+lldb_PluginObjectFileMachO_SRC_FILES := \
+  ObjectFileMachO.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginObjectFileMachO_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginObjectFileMachO
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/ObjectFile/PECOFF/Android.mk b/source/Plugins/ObjectFile/PECOFF/Android.mk
new file mode 100644
index 0000000..7262b4a
--- /dev/null
+++ b/source/Plugins/ObjectFile/PECOFF/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  ObjectFilePECOFF.cpp
+
+LOCAL_MODULE := liblldbPluginObjectFilePECOFF
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/OperatingSystem/Python/Android.mk b/source/Plugins/OperatingSystem/Python/Android.mk
new file mode 100644
index 0000000..44bca4a
--- /dev/null
+++ b/source/Plugins/OperatingSystem/Python/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginOperatingSystemPython_SRC_FILES := \
+  OperatingSystemPython.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginOperatingSystemPython_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginOperatingSystemPython
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Platform/FreeBSD/Android.mk b/source/Plugins/Platform/FreeBSD/Android.mk
new file mode 100644
index 0000000..b4abda3
--- /dev/null
+++ b/source/Plugins/Platform/FreeBSD/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginPlatformFreeBSD_SRC_FILES := \
+  PlatformFreeBSD.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginPlatformFreeBSD_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginPlatformFreeBSD
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Platform/Linux/Android.mk b/source/Plugins/Platform/Linux/Android.mk
new file mode 100644
index 0000000..545a14a
--- /dev/null
+++ b/source/Plugins/Platform/Linux/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginPlatformLinux_SRC_FILES := \
+  PlatformLinux.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginPlatformLinux_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginPlatformLinux
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Platform/MacOSX/Android.mk b/source/Plugins/Platform/MacOSX/Android.mk
new file mode 100644
index 0000000..d2ddd5f
--- /dev/null
+++ b/source/Plugins/Platform/MacOSX/Android.mk
@@ -0,0 +1,26 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginPlatformMacOSX_SRC_FILES := \
+  PlatformDarwin.cpp \
+  PlatformDarwinKernel.cpp \
+  PlatformiOSSimulator.cpp \
+  PlatformMacOSX.cpp \
+  PlatformRemoteiOS.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginPlatformMacOSX_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginPlatformMacOSX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Platform/gdb-server/Android.mk b/source/Plugins/Platform/gdb-server/Android.mk
new file mode 100644
index 0000000..fa60852
--- /dev/null
+++ b/source/Plugins/Platform/gdb-server/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginPlatformGDBServer_SRC_FILES := \
+  PlatformRemoteGDBServer.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginPlatformGDBServer_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginPlatformGDBServer
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/FreeBSD/Android.mk b/source/Plugins/Process/FreeBSD/Android.mk
new file mode 100644
index 0000000..a538f47
--- /dev/null
+++ b/source/Plugins/Process/FreeBSD/Android.mk
@@ -0,0 +1,23 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessFreeBSD_SRC_FILES := \
+  ProcessFreeBSD.cpp \
+  ProcessMonitor.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessFreeBSD_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessFreeBSD
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/Linux/Android.mk b/source/Plugins/Process/Linux/Android.mk
new file mode 100644
index 0000000..8b17d41
--- /dev/null
+++ b/source/Plugins/Process/Linux/Android.mk
@@ -0,0 +1,25 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessLinux_SRC_FILES := \
+  LinuxSignals.cpp \
+  LinuxThread.cpp \
+  ProcessLinux.cpp \
+  ProcessMonitor.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessLinux_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessLinux
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/MacOSX-Kernel/Android.mk b/source/Plugins/Process/MacOSX-Kernel/Android.mk
new file mode 100644
index 0000000..3db90ca
--- /dev/null
+++ b/source/Plugins/Process/MacOSX-Kernel/Android.mk
@@ -0,0 +1,28 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessDarwin_SRC_FILES := \
+  CommunicationKDP.cpp \
+  ProcessKDP.cpp \
+  ProcessKDPLog.cpp \
+  RegisterContextKDP_arm.cpp \
+  RegisterContextKDP_i386.cpp \
+  RegisterContextKDP_x86_64.cpp \
+  ThreadKDP.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessDarwin_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessDarwin
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/POSIX/Android.mk b/source/Plugins/Process/POSIX/Android.mk
new file mode 100644
index 0000000..0eda403
--- /dev/null
+++ b/source/Plugins/Process/POSIX/Android.mk
@@ -0,0 +1,46 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessPOSIX_SRC_FILES := \
+  POSIXStopInfo.cpp \
+  POSIXThread.cpp \
+  ProcessMessage.cpp \
+  ProcessPOSIX.cpp \
+  ProcessPOSIXLog.cpp \
+  RegisterContextFreeBSD_x86_64.cpp \
+  RegisterContext_i386.cpp \
+  RegisterContextLinux_x86_64.cpp \
+  RegisterContext_x86_64.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessPOSIX_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessPOSIX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+
+# =====
+# tweak local include paths not present in $(LLDB_BUILD_MK)
+# =====
+LOCAL_C_INCLUDES += $(LLDB_ROOT_PATH)/source/Plugins/Utility
+
+ifeq ($(HOST_OS),linux)
+LOCAL_C_INCLUDES += $(LLDB_ROOT_PATH)/source/Plugins/Process/Linux
+LOCAL_CFLAGS += -Wno-extended-offsetof
+endif
+
+ifneq (,$(filter $(HOST_OS), freebsd))
+LOCAL_C_INCLUDES += $(LLDB_ROOT_PATH)/source/Plugins/Process/FreeBSD
+endif
+# =====
+
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/Utility/Android.mk b/source/Plugins/Process/Utility/Android.mk
new file mode 100644
index 0000000..9d2c07a
--- /dev/null
+++ b/source/Plugins/Process/Utility/Android.mk
@@ -0,0 +1,38 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginUtility_SRC_FILES := \
+  DynamicRegisterInfo.cpp \
+  InferiorCallPOSIX.cpp \
+  RegisterContextDarwin_arm.cpp \
+  RegisterContextDarwin_i386.cpp \
+  RegisterContextDarwin_x86_64.cpp \
+  RegisterContextDummy.cpp \
+  RegisterContextLLDB.cpp \
+  RegisterContextMach_arm.cpp \
+  RegisterContextMach_i386.cpp \
+  RegisterContextMach_x86_64.cpp \
+  RegisterContextMacOSXFrameBackchain.cpp \
+  RegisterContextMemory.cpp \
+  RegisterContextThreadMemory.cpp \
+  StopInfoMachException.cpp \
+  ThreadMemory.cpp \
+  UnwindLLDB.cpp \
+  UnwindMacOSXFrameBackchain.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginUtility_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginUtility
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/elf-core/Android.mk b/source/Plugins/Process/elf-core/Android.mk
new file mode 100644
index 0000000..82e6b7e
--- /dev/null
+++ b/source/Plugins/Process/elf-core/Android.mk
@@ -0,0 +1,25 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessElfCore_SRC_FILES := \
+  ProcessElfCore.cpp \
+  RegisterContextCoreFreeBSD_x86_64.cpp \
+  RegisterContextCoreLinux_x86_64.cpp \
+  ThreadElfCore.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessElfCore_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessElfCore
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/gdb-remote/Android.mk b/source/Plugins/Process/gdb-remote/Android.mk
new file mode 100644
index 0000000..66ae6de
--- /dev/null
+++ b/source/Plugins/Process/gdb-remote/Android.mk
@@ -0,0 +1,28 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessGDBRemote_SRC_FILES := \
+  GDBRemoteCommunicationClient.cpp \
+  GDBRemoteCommunication.cpp \
+  GDBRemoteCommunicationServer.cpp \
+  GDBRemoteRegisterContext.cpp \
+  ProcessGDBRemote.cpp \
+  ProcessGDBRemoteLog.cpp \
+  ThreadGDBRemote.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessGDBRemote_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessGDBRemote
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/Process/mach-core/Android.mk b/source/Plugins/Process/mach-core/Android.mk
new file mode 100644
index 0000000..611b6ad
--- /dev/null
+++ b/source/Plugins/Process/mach-core/Android.mk
@@ -0,0 +1,23 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginProcessMachCore_SRC_FILES := \
+  ProcessMachCore.cpp \
+  ThreadMachCore.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginProcessMachCore_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginProcessMachCore
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/SymbolFile/DWARF/Android.mk b/source/Plugins/SymbolFile/DWARF/Android.mk
new file mode 100644
index 0000000..9ef0897
--- /dev/null
+++ b/source/Plugins/SymbolFile/DWARF/Android.mk
@@ -0,0 +1,45 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  AttrParsedAttrList.inc \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  DWARFAbbreviationDeclaration.cpp \
+  DWARFCompileUnit.cpp \
+  DWARFDebugAbbrev.cpp \
+  DWARFDebugAranges.cpp \
+  DWARFDebugArangeSet.cpp \
+  DWARFDebugInfo.cpp \
+  DWARFDebugInfoEntry.cpp \
+  DWARFDebugLine.cpp \
+  DWARFDebugMacinfo.cpp \
+  DWARFDebugMacinfoEntry.cpp \
+  DWARFDebugPubnames.cpp \
+  DWARFDebugPubnamesSet.cpp \
+  DWARFDebugRanges.cpp \
+  DWARFDeclContext.cpp \
+  DWARFDefines.cpp \
+  DWARFDIECollection.cpp \
+  DWARFFormValue.cpp \
+  DWARFLocationDescription.cpp \
+  DWARFLocationList.cpp \
+  LogChannelDWARF.cpp \
+  NameToDIE.cpp \
+  SymbolFileDWARF.cpp \
+  SymbolFileDWARFDebugMap.cpp \
+  UniqueDWARFASTType.cpp
+
+LOCAL_MODULE := liblldbPluginSymbolFileDWARF
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/SymbolFile/Symtab/Android.mk b/source/Plugins/SymbolFile/Symtab/Android.mk
new file mode 100644
index 0000000..aa05b52
--- /dev/null
+++ b/source/Plugins/SymbolFile/Symtab/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+LOCAL_SRC_FILES := \
+  SymbolFileSymtab.cpp
+
+LOCAL_MODULE := liblldbPluginSymbolFileSymtab
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/SymbolVendor/ELF/Android.mk b/source/Plugins/SymbolVendor/ELF/Android.mk
new file mode 100644
index 0000000..9043887
--- /dev/null
+++ b/source/Plugins/SymbolVendor/ELF/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginSymbolVendorELF_SRC_FILES := \
+  SymbolVendorELF.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginSymbolVendorELF_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginSymbolVendorELF
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/SymbolVendor/MacOSX/Android.mk b/source/Plugins/SymbolVendor/MacOSX/Android.mk
new file mode 100644
index 0000000..2b60b91
--- /dev/null
+++ b/source/Plugins/SymbolVendor/MacOSX/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginSymbolVendorMacOSX_SRC_FILES := \
+  SymbolVendorMacOSX.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginSymbolVendorMacOSX_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginSymbolVendorMacOSX
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/UnwindAssembly/InstEmulation/Android.mk b/source/Plugins/UnwindAssembly/InstEmulation/Android.mk
new file mode 100644
index 0000000..172a287
--- /dev/null
+++ b/source/Plugins/UnwindAssembly/InstEmulation/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginUnwindAssemblyInstEmulation_SRC_FILES := \
+  UnwindAssemblyInstEmulation.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginUnwindAssemblyInstEmulation_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginUnwindAssemblyInstEmulation
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Plugins/UnwindAssembly/x86/Android.mk b/source/Plugins/UnwindAssembly/x86/Android.mk
new file mode 100644
index 0000000..a762051
--- /dev/null
+++ b/source/Plugins/UnwindAssembly/x86/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_PluginUnwindAssemblyx86_SRC_FILES := \
+  UnwindAssembly-x86.cpp
+
+LOCAL_SRC_FILES := $(lldb_PluginUnwindAssemblyx86_SRC_FILES)
+
+LOCAL_MODULE:= liblldbPluginUnwindAssemblyx86
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Symbol/Android.mk b/source/Symbol/Android.mk
new file mode 100644
index 0000000..24b854e
--- /dev/null
+++ b/source/Symbol/Android.mk
@@ -0,0 +1,51 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  AttrList.inc \
+  Attrs.inc \
+  CommentCommandList.inc \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Symbol_SRC_FILES := \
+  Block.cpp \
+  ClangASTContext.cpp \
+  ClangASTImporter.cpp \
+  ClangASTType.cpp \
+  ClangExternalASTSourceCallbacks.cpp \
+  ClangExternalASTSourceCommon.cpp \
+  ClangNamespaceDecl.cpp \
+  CompileUnit.cpp \
+  Declaration.cpp \
+  DWARFCallFrameInfo.cpp \
+  Function.cpp \
+  FuncUnwinders.cpp \
+  LineEntry.cpp \
+  LineTable.cpp \
+  ObjectFile.cpp \
+  SymbolContext.cpp \
+  Symbol.cpp \
+  SymbolFile.cpp \
+  SymbolVendor.cpp \
+  Symtab.cpp \
+  Type.cpp \
+  TypeList.cpp \
+  UnwindPlan.cpp \
+  UnwindTable.cpp \
+  Variable.cpp \
+  VariableList.cpp \
+  VerifyDecl.cpp
+
+LOCAL_SRC_FILES := $(lldb_Symbol_SRC_FILES)
+
+LOCAL_MODULE:= liblldbSymbol
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Target/Android.mk b/source/Target/Android.mk
new file mode 100644
index 0000000..cea19ab
--- /dev/null
+++ b/source/Target/Android.mk
@@ -0,0 +1,59 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+  DiagnosticCommonKinds.inc \
+  DeclNodes.inc \
+  StmtNodes.inc
+
+lldb_Target_SRC_FILES := \
+  ABI.cpp \
+  CPPLanguageRuntime.cpp \
+  ExecutionContext.cpp \
+  LanguageRuntime.cpp \
+  Memory.cpp \
+  ObjCLanguageRuntime.cpp \
+  OperatingSystem.cpp \
+  PathMappingList.cpp \
+  Platform.cpp \
+  Process.cpp \
+  RegisterContext.cpp \
+  SectionLoadList.cpp \
+  StackFrame.cpp \
+  StackFrameList.cpp \
+  StackID.cpp \
+  StopInfo.cpp \
+  Target.cpp \
+  TargetList.cpp \
+  Thread.cpp \
+  ThreadList.cpp \
+  ThreadPlanBase.cpp \
+  ThreadPlanCallFunction.cpp \
+  ThreadPlanCallUserExpression.cpp \
+  ThreadPlan.cpp \
+  ThreadPlanRunToAddress.cpp \
+  ThreadPlanShouldStopHere.cpp \
+  ThreadPlanStepInRange.cpp \
+  ThreadPlanStepInstruction.cpp \
+  ThreadPlanStepOut.cpp \
+  ThreadPlanStepOverBreakpoint.cpp \
+  ThreadPlanStepOverRange.cpp \
+  ThreadPlanStepRange.cpp \
+  ThreadPlanStepThrough.cpp \
+  ThreadPlanStepUntil.cpp \
+  ThreadPlanTracer.cpp \
+  ThreadSpec.cpp \
+  UnixSignals.cpp \
+  UnwindAssembly.cpp
+
+LOCAL_SRC_FILES := $(lldb_Target_SRC_FILES)
+
+LOCAL_MODULE:= liblldbTarget
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(CLANG_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/source/Utility/Android.mk b/source/Utility/Android.mk
new file mode 100644
index 0000000..89ba8d1
--- /dev/null
+++ b/source/Utility/Android.mk
@@ -0,0 +1,23 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+lldb_Utility_SRC_FILES := \
+  ARM_DWARF_Registers.cpp \
+  KQueue.cpp \
+  PseudoTerminal.cpp \
+  Range.cpp \
+  RefCounter.cpp \
+  SharingPtr.cpp \
+  StringExtractor.cpp \
+  StringExtractorGDBRemote.cpp \
+  TimeSpecTimeout.cpp
+
+LOCAL_SRC_FILES := $(lldb_Utility_SRC_FILES)
+
+LOCAL_MODULE:= liblldbUtility
+LOCAL_MODULE_TAGS := optional
+
+include $(LLDB_BUILD_MK)
+include $(CLANG_VERSION_INC_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/tools/driver/Android.mk b/tools/driver/Android.mk
new file mode 100644
index 0000000..0eb9c9b
--- /dev/null
+++ b/tools/driver/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH:= $(call my-dir)
+
+# For the host only
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := lldb
+
+LOCAL_MODULE_CLASS := EXECUTABLES
+
+LOCAL_SRC_FILES := \
+  Driver.cpp \
+  IOChannel.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+  liblldb \
+  libclang \
+  libLLVM
+
+LOCAL_LDLIBS += -lm
+ifdef USE_MINGW
+LOCAL_LDLIBS += -limagehlp
+else
+LOCAL_LDLIBS += -lpthread -ldl -ltermcap
+endif
+
+include $(LLDB_BUILD_MK)
+
+LIBEDIT_BASE_DIR := $(LLDB_ROOT_PATH)/../../prebuilts/libs/libedit
+LOCAL_LDLIBS += $(LIBEDIT_BASE_DIR)/$(HOST_OS)-$(HOST_ARCH)/lib/libedit.a
+LOCAL_C_INCLUDES += $(LIBEDIT_BASE_DIR)/include
+
+include $(BUILD_HOST_EXECUTABLE)