am 2f6a493a: Revert "Make libbcc public."

* commit '2f6a493aea1b6e5ad318a759fedb58713a5a374c':
  Revert "Make libbcc public."
diff --git a/Android.mk b/Android.mk
index 6f4d9f0..e9a3102 100644
--- a/Android.mk
+++ b/Android.mk
@@ -27,10 +27,8 @@
 endif
 
 libbcc_WHOLE_STATIC_LIBRARIES += \
-  libbccRenderScript \
   libbccExecutionEngine \
-  libbccCore \
-  libbccSupport
+  libbccHelper
 
 
 #=====================================================================
diff --git a/include/bcc/Config/Config.h b/Config.h
similarity index 95%
rename from include/bcc/Config/Config.h
rename to Config.h
index 42799a8..3c29c60 100644
--- a/include/bcc/Config/Config.h
+++ b/Config.h
@@ -1,5 +1,5 @@
-#ifndef BCC_CONFIG_CONFIG_H
-#define BCC_CONFIG_CONFIG_H
+#ifndef BCC_CONFIG_H
+#define BCC_CONFIG_H
 
 #ifdef HAVE_BCC_CONFIG_MK_H
 #include "ConfigFromMk.h"
@@ -79,4 +79,4 @@
 
 //---------------------------------------------------------------------------
 
-#endif // BCC_CONFIG_CONFIG_H
+#endif // BCC_CONFIG_H
diff --git a/lib/Core/Android.mk b/helper/Android.mk
similarity index 70%
copy from lib/Core/Android.mk
copy to helper/Android.mk
index 4448364..3e606e6 100644
--- a/lib/Core/Android.mk
+++ b/helper/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012 The Android Open Source Project
+# Copyright (C) 2011-2012 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,28 +18,16 @@
 LOCAL_PATH := $(call my-dir)
 
 #=====================================================================
-# Common: libbccCore
-#=====================================================================
-
-libbcc_core_SRC_FILES := \
-  BCCContext.cpp \
-  BCCContextImpl.cpp \
-  Compiler.cpp \
-  Script.cpp \
-  Source.cpp \
-  bcc.cpp
-
-#=====================================================================
-# Device Static Library: libbccCore
+# Device Static Library: libbccHelper
 #=====================================================================
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := libbccCore
+LOCAL_MODULE := libbccHelper
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 
-LOCAL_SRC_FILES := $(libbcc_core_SRC_FILES)
+LOCAL_SRC_FILES := sha1.c
 
 include $(LIBBCC_DEVICE_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
@@ -48,16 +36,17 @@
 
 
 #=====================================================================
-# Host Static Library: libbccCore
+# Host Static Library: libbccHelper
 #=====================================================================
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := libbccCore
+LOCAL_MODULE := libbccHelper
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 
-LOCAL_SRC_FILES := $(libbcc_core_SRC_FILES)
+LOCAL_SRC_FILES := \
+  sha1.c
 
 include $(LIBBCC_HOST_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
diff --git a/include/bcc/Support/DebugHelper.h b/helper/DebugHelper.h
similarity index 84%
rename from include/bcc/Support/DebugHelper.h
rename to helper/DebugHelper.h
index 2d5d019..ae1d4af 100644
--- a/include/bcc/Support/DebugHelper.h
+++ b/helper/DebugHelper.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2012, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_DEBUG_HELPER_H
-#define BCC_SUPPORT_DEBUG_HELPER_H
+#ifndef BCC_DEBUGHELPER_H
+#define BCC_DEBUGHELPER_H
 
-#include "bcc/Config/Config.h"
+#include "Config.h"
 
 #define LOG_TAG "bcc"
 #include <cutils/log.h>
@@ -50,4 +50,4 @@
 
 #endif
 
-#endif // BCC_SUPPORT_DEBUG_HELPER_H
+#endif // BCC_DEBUGHELPER_H
diff --git a/lib/Support/sha1.c b/helper/sha1.c
similarity index 100%
rename from lib/Support/sha1.c
rename to helper/sha1.c
diff --git a/lib/Support/sha1.h b/helper/sha1.h
similarity index 100%
rename from lib/Support/sha1.h
rename to helper/sha1.h
diff --git a/include/bcc/Support/Disassembler.h b/include/bcc/Support/Disassembler.h
deleted file mode 100644
index 799a562..0000000
--- a/include/bcc/Support/Disassembler.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2011-2012, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BCC_SUPPORT_DISASSEMBLER_H
-#define BCC_SUPPORT_DISASSEMBLER_H
-
-#include "bcc/Config/Config.h"
-
-#if USE_DISASSEMBLER
-
-#include <string>
-
-namespace llvm {
-  class Target;
-  class TargetMachine;
-}
-
-namespace bcc {
-
-void InitializeDisassembler();
-
-void Disassemble(char const *OutputFileName,
-                 llvm::Target const *Target,
-                 llvm::TargetMachine *TM,
-                 std::string const &Name,
-                 unsigned char const *Func,
-                 size_t FuncSize);
-
-} // end namespace bcc
-
-#endif // USE_DISASSEMBLER
-
-#endif // BCC_SUPPORT_DISASSEMBLER_H
diff --git a/include/bcc/Support/Sha1Helper.h b/include/bcc/Support/Sha1Helper.h
deleted file mode 100644
index da98a36..0000000
--- a/include/bcc/Support/Sha1Helper.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2010-2012, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BCC_SUPPORT_SHA1_HELPER_H
-#define BCC_SUPPORT_SHA1_HELPER_H
-
-#include <stddef.h>
-
-namespace bcc {
-
-extern unsigned char sha1LibBCC_SHA1[20];
-extern char const *pathLibBCC_SHA1;
-
-extern unsigned char sha1LibRS[20];
-extern char const *pathLibRS;
-
-void calcSHA1(unsigned char *result, char const *data, size_t size);
-
-void calcFileSHA1(unsigned char *result, char const *filename);
-
-// Read binary representation of sha1 from filename.
-void readSHA1(unsigned char *result, int resultsize, char const *filename);
-
-} // end namespace bcc
-
-#endif // BCC_SUPPORT_SHA1_HELPER_H
diff --git a/lib/Core/Android.mk b/lib/Disassembler/Android.mk
similarity index 74%
rename from lib/Core/Android.mk
rename to lib/Disassembler/Android.mk
index 4448364..3886b33 100644
--- a/lib/Core/Android.mk
+++ b/lib/Disassembler/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012 The Android Open Source Project
+# Copyright (C) 2011 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -17,29 +17,27 @@
 
 LOCAL_PATH := $(call my-dir)
 
-#=====================================================================
-# Common: libbccCore
-#=====================================================================
-
-libbcc_core_SRC_FILES := \
-  BCCContext.cpp \
-  BCCContextImpl.cpp \
-  Compiler.cpp \
-  Script.cpp \
-  Source.cpp \
-  bcc.cpp
+ifeq ($(libbcc_USE_DISASSEMBLER),1)
 
 #=====================================================================
-# Device Static Library: libbccCore
+# Common: libbccDisassembler
+#=====================================================================
+
+libbcc_disassembler_SRC_FILES := \
+  Disassembler.cpp
+
+
+#=====================================================================
+# Device Static Library: libbccDisassembler
 #=====================================================================
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := libbccCore
+LOCAL_MODULE := libbccDisassembler
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 
-LOCAL_SRC_FILES := $(libbcc_core_SRC_FILES)
+LOCAL_SRC_FILES := $(libbcc_disassembler_SRC_FILES)
 
 include $(LIBBCC_DEVICE_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
@@ -48,18 +46,21 @@
 
 
 #=====================================================================
-# Host Static Library: libbccCore
+# Host Static Library: libbccDisassembler
 #=====================================================================
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := libbccCore
+LOCAL_MODULE := libbccDisassembler
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_IS_HOST_MODULE := true
 
-LOCAL_SRC_FILES := $(libbcc_core_SRC_FILES)
+LOCAL_SRC_FILES := $(libbcc_disassembler_SRC_FILES)
 
 include $(LIBBCC_HOST_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
 include $(LLVM_HOST_BUILD_MK)
 include $(BUILD_HOST_STATIC_LIBRARY)
+
+endif # $(libbcc_USE_DISASSEMBLER)
diff --git a/lib/Support/Disassembler.cpp b/lib/Disassembler/Disassembler.cpp
similarity index 84%
rename from lib/Support/Disassembler.cpp
rename to lib/Disassembler/Disassembler.cpp
index b22ff81..d7552cb 100644
--- a/lib/Support/Disassembler.cpp
+++ b/lib/Disassembler/Disassembler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011-2012, The Android Open Source Project
+ * Copyright 2011, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,26 +14,27 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/Disassembler.h"
+#include "Disassembler.h"
 
-#include <llvm/LLVMContext.h>
+#include "Config.h"
 
-#include <llvm/MC/MCAsmInfo.h>
-#include <llvm/MC/MCDisassembler.h>
-#include <llvm/MC/MCInst.h>
-#include <llvm/MC/MCInstPrinter.h>
+#include "DebugHelper.h"
 
-#include <llvm/Support/MemoryObject.h>
-#include <llvm/Support/TargetRegistry.h>
-#include <llvm/Support/TargetSelect.h>
-#include <llvm/Support/raw_ostream.h>
+#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/MC/MCDisassembler.h"
+#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCInstPrinter.h"
 
-#include <llvm/Target/TargetData.h>
-#include <llvm/Target/TargetMachine.h>
-#include <llvm/Target/TargetOptions.h>
+#include "llvm/Support/MemoryObject.h"
+#include "llvm/Support/raw_ostream.h"
 
-#include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
+#include "llvm/Target/TargetData.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
+#include "llvm/Support/TargetRegistry.h"
+#include "llvm/Support/TargetSelect.h"
+
+#include "llvm/LLVMContext.h"
 
 #if USE_DISASSEMBLER
 
diff --git a/lib/Disassembler/Disassembler.h b/lib/Disassembler/Disassembler.h
new file mode 100644
index 0000000..d0d924c
--- /dev/null
+++ b/lib/Disassembler/Disassembler.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef BCC_DISASSEMBLER_H
+#define BCC_DISASSEMBLER_H
+
+#include "Config.h"
+
+#if USE_DISASSEMBLER
+
+#include <string>
+
+namespace llvm {
+  class Target;
+  class TargetMachine;
+}
+
+namespace bcc {
+
+  void InitializeDisassembler();
+
+  void Disassemble(char const *OutputFileName,
+                   llvm::Target const *Target,
+                   llvm::TargetMachine *TM,
+                   std::string const &Name,
+                   unsigned char const *Func,
+                   size_t FuncSize);
+
+} // namespace bcc
+
+#endif // USE_DISASSEMBLER
+
+#endif // BCC_DISASSEMBLER_H
diff --git a/lib/ExecutionEngine/Android.mk b/lib/ExecutionEngine/Android.mk
index d5a4573..f3b2c3d 100644
--- a/lib/ExecutionEngine/Android.mk
+++ b/lib/ExecutionEngine/Android.mk
@@ -22,14 +22,36 @@
 #=====================================================================
 
 libbcc_executionengine_SRC_FILES := \
-  BCCRuntimeStub.c \
+  BCCContext.cpp \
+  BCCContextImpl.cpp \
   BCCRuntimeSymbolResolver.cpp \
+  Compiler.cpp \
+  CompilerConfig.cpp \
   ELFObjectLoaderImpl.cpp \
+  FileBase.cpp \
   GDBJIT.cpp \
   GDBJITRegistrar.cpp \
+  Initialization.cpp \
+  InputFile.cpp \
   ObjectLoader.cpp \
+  OutputFile.cpp \
+  RSCompiler.cpp \
+  RSCompilerDriver.cpp \
+  RSExecutable.cpp \
+  RSForEachExpand.cpp \
+  RSInfo.cpp \
+  RSInfoExtractor.cpp \
+  RSInfoReader.cpp \
+  RSInfoWriter.cpp \
+  RSScript.cpp \
+  BCCRuntimeStub.c \
+  Script.cpp \
+  Sha1Helper.cpp \
+  Source.cpp \
   SymbolResolverProxy.cpp \
-  SymbolResolvers.cpp
+  SymbolResolvers.cpp \
+  TargetCompilerConfigs.cpp \
+  bcc.cpp
 
 #=====================================================================
 # Device Static Library: libbccExecutionEngine
@@ -42,11 +64,11 @@
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 
 LOCAL_C_INCLUDES := \
-  $(LIBBCC_ROOT_PATH) \
   $(RSLOADER_ROOT_PATH) \
   $(RSLOADER_ROOT_PATH)/include
 
 LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES)
+LOCAL_SHARED_LIBRARIES := libbcinfo
 
 include $(LIBBCC_DEVICE_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
@@ -65,11 +87,11 @@
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 
 LOCAL_C_INCLUDES := \
-  $(LIBBCC_ROOT_PATH) \
   $(RSLOADER_ROOT_PATH) \
   $(RSLOADER_ROOT_PATH)/include
 
 LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES)
+LOCAL_SHARED_LIBRARIES := libbcinfo
 
 include $(LIBBCC_HOST_BUILD_MK)
 include $(LIBBCC_GEN_CONFIG_MK)
diff --git a/lib/Core/BCCContext.cpp b/lib/ExecutionEngine/BCCContext.cpp
similarity index 94%
rename from lib/Core/BCCContext.cpp
rename to lib/ExecutionEngine/BCCContext.cpp
index e2284de..62995ed 100644
--- a/lib/Core/BCCContext.cpp
+++ b/lib/ExecutionEngine/BCCContext.cpp
@@ -14,14 +14,13 @@
  * limitations under the License.
  */
 
-#include "bcc/BCCContext.h"
+#include "BCCContext.h"
 
 #include <new>
 
-#include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
-
 #include "BCCContextImpl.h"
+#include "DebugHelper.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/BCCContext.h b/lib/ExecutionEngine/BCCContext.h
similarity index 90%
rename from include/bcc/BCCContext.h
rename to lib/ExecutionEngine/BCCContext.h
index be24d31..56962fe 100644
--- a/include/bcc/BCCContext.h
+++ b/lib/ExecutionEngine/BCCContext.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_CONTEXT_H
-#define BCC_CONTEXT_H
+#ifndef BCC_EXECUTION_ENGINE_CONTEXT_H
+#define BCC_EXECUTION_ENGINE_CONTEXT_H
 
 namespace llvm {
   class LLVMContext;
@@ -49,4 +49,4 @@
 
 } // namespace bcc
 
-#endif  // BCC_CONTEXT_H
+#endif  // BCC_EXECUTION_ENGINE_CONTEXT_H
diff --git a/lib/Core/BCCContextImpl.cpp b/lib/ExecutionEngine/BCCContextImpl.cpp
similarity index 97%
rename from lib/Core/BCCContextImpl.cpp
rename to lib/ExecutionEngine/BCCContextImpl.cpp
index 0a25764..ec865fa 100644
--- a/lib/Core/BCCContextImpl.cpp
+++ b/lib/ExecutionEngine/BCCContextImpl.cpp
@@ -20,7 +20,7 @@
 
 #include <llvm/ADT/STLExtras.h>
 
-#include "bcc/Source.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/lib/Core/BCCContextImpl.h b/lib/ExecutionEngine/BCCContextImpl.h
similarity index 89%
rename from lib/Core/BCCContextImpl.h
rename to lib/ExecutionEngine/BCCContextImpl.h
index bc397f9..446eb36 100644
--- a/lib/Core/BCCContextImpl.h
+++ b/lib/ExecutionEngine/BCCContextImpl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_CORE_CONTEXT_IMPL_H
-#define BCC_CORE_CONTEXT_IMPL_H
+#ifndef BCC_EXECUTION_ENGINE_CONTEXT_IMPL_H
+#define BCC_EXECUTION_ENGINE_CONTEXT_IMPL_H
 
 #include <llvm/ADT/SmallPtrSet.h>
 #include <llvm/LLVMContext.h>
@@ -42,4 +42,4 @@
 
 } // namespace bcc
 
-#endif  // BCC_CORE_CONTEXT_IMPL_H
+#endif  // BCC_EXECUTION_ENGINE_CONTEXT_IMPL_H
diff --git a/lib/ExecutionEngine/BCCRuntimeSymbolResolver.cpp b/lib/ExecutionEngine/BCCRuntimeSymbolResolver.cpp
index ddc06fc..1059d85 100644
--- a/lib/ExecutionEngine/BCCRuntimeSymbolResolver.cpp
+++ b/lib/ExecutionEngine/BCCRuntimeSymbolResolver.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/ExecutionEngine/BCCRuntimeSymbolResolver.h"
+#include "BCCRuntimeSymbolResolver.h"
 
 // int_lib.h included by BCCRuntimeStub.h has the following line:
 //
diff --git a/include/bcc/ExecutionEngine/BCCRuntimeSymbolResolver.h b/lib/ExecutionEngine/BCCRuntimeSymbolResolver.h
similarity index 95%
rename from include/bcc/ExecutionEngine/BCCRuntimeSymbolResolver.h
rename to lib/ExecutionEngine/BCCRuntimeSymbolResolver.h
index 4210489..e48a4d8 100644
--- a/include/bcc/ExecutionEngine/BCCRuntimeSymbolResolver.h
+++ b/lib/ExecutionEngine/BCCRuntimeSymbolResolver.h
@@ -17,7 +17,7 @@
 #ifndef BCC_EXECUTION_ENGINE_BCC_RUNTIME_SYMBOL_RESOLVERS_H
 #define BCC_EXECUTION_ENGINE_BCC_RUNTIME_SYMBOL_RESOLVERS_H
 
-#include "bcc/ExecutionEngine/SymbolResolvers.h"
+#include "SymbolResolvers.h"
 
 namespace bcc {
 
diff --git a/lib/Core/Compiler.cpp b/lib/ExecutionEngine/Compiler.cpp
similarity index 98%
rename from lib/Core/Compiler.cpp
rename to lib/ExecutionEngine/Compiler.cpp
index 97b18bc..2348d56 100644
--- a/lib/Core/Compiler.cpp
+++ b/lib/ExecutionEngine/Compiler.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/Compiler.h"
+#include "Compiler.h"
 
 #include <llvm/Analysis/Passes.h>
 #include <llvm/CodeGen/RegAllocRegistry.h>
@@ -27,11 +27,11 @@
 #include <llvm/Transforms/IPO.h>
 #include <llvm/Transforms/Scalar.h>
 
-#include "bcc/Script.h"
-#include "bcc/Source.h"
-#include "bcc/Support/CompilerConfig.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/OutputFile.h"
+#include "CompilerConfig.h"
+#include "DebugHelper.h"
+#include "OutputFile.h"
+#include "Script.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Compiler.h b/lib/ExecutionEngine/Compiler.h
similarity index 96%
rename from include/bcc/Compiler.h
rename to lib/ExecutionEngine/Compiler.h
index 881ef5c..5e37925 100644
--- a/include/bcc/Compiler.h
+++ b/lib/ExecutionEngine/Compiler.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_COMPILER_H
-#define BCC_COMPILER_H
+#ifndef BCC_EXECUTION_ENGINE_COMPILER_H
+#define BCC_EXECUTION_ENGINE_COMPILER_H
 
 namespace llvm {
 
@@ -140,4 +140,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_COMPILER_H
+#endif // BCC_EXECUTION_ENGINE_COMPILER_H
diff --git a/lib/Support/CompilerConfig.cpp b/lib/ExecutionEngine/CompilerConfig.cpp
similarity index 96%
rename from lib/Support/CompilerConfig.cpp
rename to lib/ExecutionEngine/CompilerConfig.cpp
index f96c8a9..faaaa97 100644
--- a/lib/Support/CompilerConfig.cpp
+++ b/lib/ExecutionEngine/CompilerConfig.cpp
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/CompilerConfig.h"
+#include "CompilerConfig.h"
 
 #include <llvm/CodeGen/SchedulerRegistry.h>
 #include <llvm/MC/SubtargetFeature.h>
 #include <llvm/Support/TargetRegistry.h>
 
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/TargetCompilerConfigs.h"
+#include "DebugHelper.h"
+#include "TargetCompilerConfigs.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Support/CompilerConfig.h b/lib/ExecutionEngine/CompilerConfig.h
similarity index 95%
rename from include/bcc/Support/CompilerConfig.h
rename to lib/ExecutionEngine/CompilerConfig.h
index fec645b..d83086a 100644
--- a/include/bcc/Support/CompilerConfig.h
+++ b/lib/ExecutionEngine/CompilerConfig.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_COMPILER_CONFIG_H
-#define BCC_SUPPORT_COMPILER_CONFIG_H
+#ifndef BCC_EXECUTION_ENGINE_COMPILER_CONFIG_H
+#define BCC_EXECUTION_ENGINE_COMPILER_CONFIG_H
 
 #include <string>
 #include <vector>
@@ -114,4 +114,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SUPPORT_COMPILER_CONFIG_H
+#endif  // BCC_EXECUTION_ENGINE_COMPILER_CONFIG_H
diff --git a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
index 82eac5f..01f613e 100644
--- a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
+++ b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
@@ -24,8 +24,8 @@
 #include "ELFSymbol.h"
 #include "utils/serialize.h"
 
-#include "bcc/ExecutionEngine/SymbolResolverInterface.h"
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
+#include "SymbolResolverInterface.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Support/File.h b/lib/ExecutionEngine/File.h
similarity index 93%
rename from include/bcc/Support/File.h
rename to lib/ExecutionEngine/File.h
index 69b7201..4b7ad4d 100644
--- a/include/bcc/Support/File.h
+++ b/lib/ExecutionEngine/File.h
@@ -14,10 +14,10 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_FILE_H
-#define BCC_SUPPORT_FILE_H
+#ifndef BCC_EXECUTION_ENGINE_FILE_H
+#define BCC_EXECUTION_ENGINE_FILE_H
 
-#include "bcc/Support/FileBase.h"
+#include "FileBase.h"
 
 namespace bcc {
 
@@ -69,4 +69,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SUPPORT_FILE_H
+#endif  // BCC_EXECUTION_ENGINE_FILE_H
diff --git a/lib/Support/FileBase.cpp b/lib/ExecutionEngine/FileBase.cpp
similarity index 99%
rename from lib/Support/FileBase.cpp
rename to lib/ExecutionEngine/FileBase.cpp
index 7b6a7c3..379406d 100644
--- a/lib/Support/FileBase.cpp
+++ b/lib/ExecutionEngine/FileBase.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/FileBase.h"
+#include "FileBase.h"
 
 #include <sys/file.h>
 #include <sys/stat.h>
diff --git a/include/bcc/Support/FileBase.h b/lib/ExecutionEngine/FileBase.h
similarity index 96%
rename from include/bcc/Support/FileBase.h
rename to lib/ExecutionEngine/FileBase.h
index cba3cd3..62d6504 100644
--- a/include/bcc/Support/FileBase.h
+++ b/lib/ExecutionEngine/FileBase.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_FILE_BASE_H
-#define BCC_SUPPORT_FILE_BASE_H
+#ifndef BCC_EXECUTION_ENGINE_FILE_BASE_H
+#define BCC_EXECUTION_ENGINE_FILE_BASE_H
 
 #include <fcntl.h>
 
@@ -146,4 +146,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SUPPORT_FILE_BASE_H
+#endif  // BCC_EXECUTION_ENGINE_FILE_BASE_H
diff --git a/include/bcc/Support/FileMutex.h b/lib/ExecutionEngine/FileMutex.h
similarity index 88%
rename from include/bcc/Support/FileMutex.h
rename to lib/ExecutionEngine/FileMutex.h
index 15c9f01..85c0e84 100644
--- a/include/bcc/Support/FileMutex.h
+++ b/lib/ExecutionEngine/FileMutex.h
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_FILE_MUTEX_H
-#define BCC_SUPPORT_FILE_MUTEX_H
+#ifndef BCC_EXECUTION_ENGINE_FILE_MUTEX_H
+#define BCC_EXECUTION_ENGINE_FILE_MUTEX_H
 
 #include <string>
 
-#include "bcc/Support/FileBase.h"
+#include "FileBase.h"
 
 namespace bcc {
 
@@ -40,4 +40,4 @@
 
 } // namespace bcc
 
-#endif  // BCC_SUPPORT_FILE_MUTEX_H
+#endif  // BCC_EXECUTION_ENGINE_FILE_MUTEX_H
diff --git a/lib/ExecutionEngine/GDBJIT.cpp b/lib/ExecutionEngine/GDBJIT.cpp
index 29944dd..4038098 100644
--- a/lib/ExecutionEngine/GDBJIT.cpp
+++ b/lib/ExecutionEngine/GDBJIT.cpp
@@ -29,7 +29,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <llvm/Support/Compiler.h>
+#include "llvm/Support/Compiler.h"
 
 // This interface must be kept in sync with gdb/gdb/jit.h .
 extern "C" {
diff --git a/include/bcc/ExecutionEngine/GDBJIT.h b/lib/ExecutionEngine/GDBJIT.h
similarity index 96%
rename from include/bcc/ExecutionEngine/GDBJIT.h
rename to lib/ExecutionEngine/GDBJIT.h
index 4567813..442b666 100644
--- a/include/bcc/ExecutionEngine/GDBJIT.h
+++ b/lib/ExecutionEngine/GDBJIT.h
@@ -33,8 +33,8 @@
 #ifndef BCC_EXECUTION_ENGINE_GDB_JIT_H
 #define BCC_EXECUTION_ENGINE_GDB_JIT_H
 
-#include <llvm/Support/DataTypes.h>
-#include <llvm/Support/Compiler.h>
+#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/Compiler.h"
 
 // This must be kept in sync with gdb/gdb/jit.h .
 extern "C" {
diff --git a/lib/ExecutionEngine/GDBJITRegistrar.cpp b/lib/ExecutionEngine/GDBJITRegistrar.cpp
index 68d6833..5d8428a 100644
--- a/lib/ExecutionEngine/GDBJITRegistrar.cpp
+++ b/lib/ExecutionEngine/GDBJITRegistrar.cpp
@@ -30,15 +30,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "bcc/ExecutionEngine/GDBJITRegistrar.h"
-
-#include <llvm/ADT/DenseMap.h>
-#include <llvm/Support/ErrorHandling.h>
-#include <llvm/Support/Memory.h>
-#include <llvm/Support/Mutex.h>
-#include <llvm/Support/MutexGuard.h>
-
-#include "bcc/ExecutionEngine/GDBJIT.h"
+#include "GDBJITRegistrar.h"
+#include "llvm/ADT/DenseMap.h"
+#include "GDBJIT.h"
+#include "llvm/Support/Memory.h"
+#include "llvm/Support/MutexGuard.h"
+#include "llvm/Support/Mutex.h"
+#include "llvm/Support/ErrorHandling.h"
 
 #include <fstream>
 
diff --git a/include/bcc/ExecutionEngine/GDBJITRegistrar.h b/lib/ExecutionEngine/GDBJITRegistrar.h
similarity index 90%
rename from include/bcc/ExecutionEngine/GDBJITRegistrar.h
rename to lib/ExecutionEngine/GDBJITRegistrar.h
index 868dafa..debf503 100644
--- a/include/bcc/ExecutionEngine/GDBJITRegistrar.h
+++ b/lib/ExecutionEngine/GDBJITRegistrar.h
@@ -30,8 +30,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef BCC_EXECUTION_ENGINE_GDB_JIT_REGISTRAR_H
-#define BCC_EXECUTION_ENGINE_GDB_JIT_REGISTRAR_H
+#ifndef BCC_GDBJITREGISTRAR_H
+#define BCC_GDBJITREGISTRAR_H
 
 #include <cstddef>
 
@@ -41,4 +41,4 @@
 void registerObjectWithGDB(const ObjectBuffer* Object, std::size_t Size);
 void deregisterObjectWithGDB(const ObjectBuffer* Object);
 
-#endif // BCC_EXECUTION_ENGINE_GDB_JIT_REGISTRAR_H
+#endif // BCC_GDBJITREGISTRAR_H
diff --git a/lib/Support/Initialization.cpp b/lib/ExecutionEngine/Initialization.cpp
similarity index 93%
rename from lib/Support/Initialization.cpp
rename to lib/ExecutionEngine/Initialization.cpp
index eb4428c..7cdb938 100644
--- a/lib/Support/Initialization.cpp
+++ b/lib/ExecutionEngine/Initialization.cpp
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/Initialization.h"
+#include "Initialization.h"
 
 #include <cstdlib>
 
 #include <llvm/Support/ErrorHandling.h>
 #include <llvm/Support/TargetSelect.h>
 
-#include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
+#include "Config.h"
+#include "DebugHelper.h"
 
 namespace {
 
diff --git a/include/bcc/Support/Initialization.h b/lib/ExecutionEngine/Initialization.h
similarity index 83%
rename from include/bcc/Support/Initialization.h
rename to lib/ExecutionEngine/Initialization.h
index 521f082..9a357bc 100644
--- a/include/bcc/Support/Initialization.h
+++ b/lib/ExecutionEngine/Initialization.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_INITIALIZATION_H
-#define BCC_SUPPORT_INITIALIZATION_H
+#ifndef BCC_EXECUTION_ENGINE_INITIALIZATION_H
+#define BCC_EXECUTION_ENGINE_INITIALIZATION_H
 
 namespace bcc {
 
@@ -27,4 +27,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_SUPPORT_INITIALIZATION_H
+#endif // BCC_EXECUTION_ENGINE_INITIALIZATION_H
diff --git a/lib/Support/InputFile.cpp b/lib/ExecutionEngine/InputFile.cpp
similarity index 94%
rename from lib/Support/InputFile.cpp
rename to lib/ExecutionEngine/InputFile.cpp
index 522a71d..a51b09e 100644
--- a/lib/Support/InputFile.cpp
+++ b/lib/ExecutionEngine/InputFile.cpp
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/InputFile.h"
+#include "InputFile.h"
 
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Support/InputFile.h b/lib/ExecutionEngine/InputFile.h
similarity index 83%
rename from include/bcc/Support/InputFile.h
rename to lib/ExecutionEngine/InputFile.h
index 72abfd2..a7c22d2 100644
--- a/include/bcc/Support/InputFile.h
+++ b/lib/ExecutionEngine/InputFile.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_INPUT_FILE_H
-#define BCC_SUPPORT_INPUT_FILE_H
+#ifndef BCC_EXECUTION_ENGINE_INPUT_FILE_H
+#define BCC_EXECUTION_ENGINE_INPUT_FILE_H
 
-#include "bcc/Support/File.h"
-#include "bcc/Support/FileBase.h"
+#include "File.h"
+#include "FileBase.h"
 
 namespace bcc {
 
@@ -32,4 +32,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SUPPORT_INPUT_FILE_H
+#endif  // BCC_EXECUTION_ENGINE_INPUT_FILE_H
diff --git a/lib/ExecutionEngine/ObjectLoader.cpp b/lib/ExecutionEngine/ObjectLoader.cpp
index 1277e13..708ded3 100644
--- a/lib/ExecutionEngine/ObjectLoader.cpp
+++ b/lib/ExecutionEngine/ObjectLoader.cpp
@@ -14,15 +14,14 @@
  * limitations under the License.
  */
 
-#include "bcc/ExecutionEngine/ObjectLoader.h"
+#include "ObjectLoader.h"
 
 #include <utils/FileMap.h>
 
-#include "bcc/ExecutionEngine/GDBJITRegistrar.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/FileBase.h"
-
+#include "DebugHelper.h"
 #include "ELFObjectLoaderImpl.h"
+#include "FileBase.h"
+#include "GDBJITRegistrar.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/ExecutionEngine/ObjectLoader.h b/lib/ExecutionEngine/ObjectLoader.h
similarity index 100%
rename from include/bcc/ExecutionEngine/ObjectLoader.h
rename to lib/ExecutionEngine/ObjectLoader.h
diff --git a/lib/ExecutionEngine/ObjectLoaderImpl.h b/lib/ExecutionEngine/ObjectLoaderImpl.h
index 0e0f2c1..81756f8 100644
--- a/lib/ExecutionEngine/ObjectLoaderImpl.h
+++ b/lib/ExecutionEngine/ObjectLoaderImpl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef OBJECT_LOADER_IMPL_H
-#define OBJECT_LOADER_IMPL_H
+#ifndef BCC_EXECUTION_ENGINE_OBJECT_LOADER_IMPL_H
+#define BCC_EXECUTION_ENGINE_OBJECT_LOADER_IMPL_H
 
 #include <cstring>
 
@@ -40,4 +40,4 @@
 
 } // namespace bcc
 
-#endif // OBJECT_LOADER_IMPL_H
+#endif // BCC_EXECUTION_ENGINE_OBJECT_LOADER_IMPL_H
diff --git a/lib/Support/OutputFile.cpp b/lib/ExecutionEngine/OutputFile.cpp
similarity index 97%
rename from lib/Support/OutputFile.cpp
rename to lib/ExecutionEngine/OutputFile.cpp
index 4da52aa..6200617 100644
--- a/lib/Support/OutputFile.cpp
+++ b/lib/ExecutionEngine/OutputFile.cpp
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/OutputFile.h"
+#include "OutputFile.h"
 
 #include <cstdlib>
 
 #include <llvm/Support/raw_ostream.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Support/OutputFile.h b/lib/ExecutionEngine/OutputFile.h
similarity index 89%
rename from include/bcc/Support/OutputFile.h
rename to lib/ExecutionEngine/OutputFile.h
index 5e5c868..4de8863 100644
--- a/include/bcc/Support/OutputFile.h
+++ b/lib/ExecutionEngine/OutputFile.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_OUTPUT_FILE_H
-#define BCC_SUPPORT_OUTPUT_FILE_H
+#ifndef BCC_EXECUTION_ENGINE_OUTPUT_FILE_H
+#define BCC_EXECUTION_ENGINE_OUTPUT_FILE_H
 
-#include "bcc/Support/File.h"
-#include "bcc/Support/FileBase.h"
+#include "File.h"
+#include "FileBase.h"
 
 namespace llvm {
   class raw_fd_ostream;
@@ -50,4 +50,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SUPPORT_OUTPUT_FILE_H
+#endif  // BCC_EXECUTION_ENGINE_OUTPUT_FILE_H
diff --git a/lib/RenderScript/RSCompiler.cpp b/lib/ExecutionEngine/RSCompiler.cpp
similarity index 93%
rename from lib/RenderScript/RSCompiler.cpp
rename to lib/ExecutionEngine/RSCompiler.cpp
index cc63904..e431086 100644
--- a/lib/RenderScript/RSCompiler.cpp
+++ b/lib/ExecutionEngine/RSCompiler.cpp
@@ -14,18 +14,18 @@
  * limitations under the License.
  */
 
-#include "bcc/RenderScript/RSCompiler.h"
+#include "RSCompiler.h"
 
 #include <llvm/Module.h>
 #include <llvm/PassManager.h>
 #include <llvm/Transforms/IPO.h>
 
-#include "bcc/RenderScript/RSExecutable.h"
-#include "bcc/RenderScript/RSInfo.h"
-#include "bcc/RenderScript/RSScript.h"
-#include "bcc/RenderScript/RSTransforms.h"
-#include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
+#include "RSExecutable.h"
+#include "RSInfo.h"
+#include "RSScript.h"
+#include "RSTransforms.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/RenderScript/RSCompiler.h b/lib/ExecutionEngine/RSCompiler.h
similarity index 84%
rename from include/bcc/RenderScript/RSCompiler.h
rename to lib/ExecutionEngine/RSCompiler.h
index 537e749..227727b 100644
--- a/include/bcc/RenderScript/RSCompiler.h
+++ b/lib/ExecutionEngine/RSCompiler.h
@@ -14,10 +14,10 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_COMPILER_H
-#define BCC_RS_COMPILER_H
+#ifndef BCC_EXECUTION_ENGINE_RS_COMPILER_H
+#define BCC_EXECUTION_ENGINE_RS_COMPILER_H
 
-#include "bcc/Compiler.h"
+#include "Compiler.h"
 
 namespace bcc {
 
@@ -29,4 +29,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_RS_COMPILER_H
+#endif // BCC_EXECUTION_ENGINE_RS_COMPILER_H
diff --git a/lib/RenderScript/RSCompilerDriver.cpp b/lib/ExecutionEngine/RSCompilerDriver.cpp
similarity index 96%
rename from lib/RenderScript/RSCompilerDriver.cpp
rename to lib/ExecutionEngine/RSCompilerDriver.cpp
index 0089a28..ceb4f93 100644
--- a/lib/RenderScript/RSCompilerDriver.cpp
+++ b/lib/ExecutionEngine/RSCompilerDriver.cpp
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#include "bcc/RenderScript/RSCompilerDriver.h"
+#include "RSCompilerDriver.h"
 
-#include "bcc/RenderScript/RSExecutable.h"
-#include "bcc/Support/CompilerConfig.h"
-#include "bcc/Support/TargetCompilerConfigs.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/FileMutex.h"
-#include "bcc/Support/InputFile.h"
-#include "bcc/Support/Initialization.h"
-#include "bcc/Support/OutputFile.h"
+#include "CompilerConfig.h"
+#include "TargetCompilerConfigs.h"
+#include "DebugHelper.h"
+#include "FileMutex.h"
+#include "InputFile.h"
+#include "Initialization.h"
+#include "OutputFile.h"
+#include "RSExecutable.h"
 
 #include <cutils/properties.h>
 #include <utils/String8.h>
diff --git a/include/bcc/RenderScript/RSCompilerDriver.h b/lib/ExecutionEngine/RSCompilerDriver.h
similarity index 86%
rename from include/bcc/RenderScript/RSCompilerDriver.h
rename to lib/ExecutionEngine/RSCompilerDriver.h
index 60810c2..8bc9298 100644
--- a/include/bcc/RenderScript/RSCompilerDriver.h
+++ b/lib/ExecutionEngine/RSCompilerDriver.h
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_COMPILER_DRIVER_H
-#define BCC_RS_COMPILER_DRIVER_H
+#ifndef BCC_EXECUTION_ENGINE_RS_COMPILER_DRIVER_H
+#define BCC_EXECUTION_ENGINE_RS_COMPILER_DRIVER_H
 
 #include <string>
 
-#include "bcc/ExecutionEngine/BCCRuntimeSymbolResolver.h"
-#include "bcc/ExecutionEngine/SymbolResolvers.h"
-#include "bcc/ExecutionEngine/SymbolResolverProxy.h"
-#include "bcc/RenderScript/RSCompiler.h"
+#include "BCCRuntimeSymbolResolver.h"
+#include "RSCompiler.h"
+#include "SymbolResolvers.h"
+#include "SymbolResolverProxy.h"
 
 namespace bcc {
 
@@ -68,4 +68,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_RS_COMPILER_DRIVER_H
+#endif // BCC_EXECUTION_ENGINE_RS_COMPILER_DRIVER_H
diff --git a/lib/RenderScript/RSExecutable.cpp b/lib/ExecutionEngine/RSExecutable.cpp
similarity index 95%
rename from lib/RenderScript/RSExecutable.cpp
rename to lib/ExecutionEngine/RSExecutable.cpp
index de730ed..46ec726 100644
--- a/lib/RenderScript/RSExecutable.cpp
+++ b/lib/ExecutionEngine/RSExecutable.cpp
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#include "bcc/RenderScript/RSExecutable.h"
+#include "RSExecutable.h"
 
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/FileBase.h"
-#include "bcc/Support/OutputFile.h"
-#include "bcc/ExecutionEngine/SymbolResolverProxy.h"
+#include "DebugHelper.h"
+#include "FileBase.h"
+#include "OutputFile.h"
+#include "SymbolResolverProxy.h"
 
 #include <utils/String8.h>
 
diff --git a/include/bcc/RenderScript/RSExecutable.h b/lib/ExecutionEngine/RSExecutable.h
similarity index 93%
rename from include/bcc/RenderScript/RSExecutable.h
rename to lib/ExecutionEngine/RSExecutable.h
index 24e7f1f..12e0f0a 100644
--- a/include/bcc/RenderScript/RSExecutable.h
+++ b/lib/ExecutionEngine/RSExecutable.h
@@ -14,15 +14,14 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_EXECUTABLE_H
-#define BCC_RS_EXECUTABLE_H
+#ifndef BCC_EXECUTION_ENGINE_RS_EXECUTABLE_H
+#define BCC_EXECUTION_ENGINE_RS_EXECUTABLE_H
 
 #include <cstddef>
 
-
-#include "bcc/ExecutionEngine/ObjectLoader.h"
-#include "bcc/RenderScript/RSInfo.h"
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
+#include "ObjectLoader.h"
+#include "RSInfo.h"
 
 #include <utils/Vector.h>
 
@@ -107,4 +106,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_RS_EXECUTABLE_H
+#endif // BCC_EXECUTION_ENGINE_RS_EXECUTABLE_H
diff --git a/lib/RenderScript/RSForEachExpand.cpp b/lib/ExecutionEngine/RSForEachExpand.cpp
similarity index 96%
rename from lib/RenderScript/RSForEachExpand.cpp
rename to lib/ExecutionEngine/RSForEachExpand.cpp
index 2c7315e..b30dd23 100644
--- a/lib/RenderScript/RSForEachExpand.cpp
+++ b/lib/ExecutionEngine/RSForEachExpand.cpp
@@ -15,21 +15,22 @@
  */
 
 //#define RS_FOREACH_EXPAND_PASS_NDEBUG 0
-#include "bcc/RenderScript/RSTransforms.h"
+#include "RSTransforms.h"
 
 #include <cstdlib>
 
-#include <llvm/DerivedTypes.h>
-#include <llvm/Function.h>
-#include <llvm/Instructions.h>
-#include <llvm/Module.h>
-#include <llvm/Pass.h>
-#include <llvm/Support/IRBuilder.h>
-#include <llvm/Type.h>
+#include "Config.h"
 
-#include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/RenderScript/RSInfo.h"
+#include "DebugHelper.h"
+#include "RSInfo.h"
+
+#include "llvm/DerivedTypes.h"
+#include "llvm/Function.h"
+#include "llvm/Instructions.h"
+#include "llvm/Module.h"
+#include "llvm/Pass.h"
+#include "llvm/Type.h"
+#include "llvm/Support/IRBuilder.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSInfo.cpp b/lib/ExecutionEngine/RSInfo.cpp
similarity index 98%
rename from lib/RenderScript/RSInfo.cpp
rename to lib/ExecutionEngine/RSInfo.cpp
index 0d31e38..d351d36 100644
--- a/lib/RenderScript/RSInfo.cpp
+++ b/lib/ExecutionEngine/RSInfo.cpp
@@ -15,14 +15,14 @@
  */
 
 //#define LOG_NDEBUG 0
-#include "bcc/RenderScript/RSInfo.h"
+#include "RSInfo.h"
 
 #include <cstring>
 #include <new>
 
-#include "bcc/Support/FileBase.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/Sha1Helper.h"
+#include "FileBase.h"
+#include "DebugHelper.h"
+#include "Sha1Helper.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/RenderScript/RSInfo.h b/lib/ExecutionEngine/RSInfo.h
similarity index 97%
rename from include/bcc/RenderScript/RSInfo.h
rename to lib/ExecutionEngine/RSInfo.h
index d621a72..d69d15e 100644
--- a/include/bcc/RenderScript/RSInfo.h
+++ b/lib/ExecutionEngine/RSInfo.h
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_INFO_H
-#define BCC_RS_INFO_H
+#ifndef BCC_EXECUTION_ENGINE_RS_INFO_FILE_H
+#define BCC_EXECUTION_ENGINE_RS_INFO_FILE_H
 
 #include <stdint.h>
 
 #include <utility>
 
-#include "bcc/RenderScript/RSScript.h"
-#include "bcc/Support/DebugHelper.h"
+#include "RSScript.h"
+#include "DebugHelper.h"
 
 #include <utils/String8.h>
 #include <utils/Vector.h>
@@ -248,4 +248,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_RS_INFO_H
+#endif  // BCC_EXECUTION_ENGINE_RS_INFO_FILE_H
diff --git a/lib/RenderScript/RSInfoExtractor.cpp b/lib/ExecutionEngine/RSInfoExtractor.cpp
similarity index 98%
rename from lib/RenderScript/RSInfoExtractor.cpp
rename to lib/ExecutionEngine/RSInfoExtractor.cpp
index 43eb1ed..a90becc 100644
--- a/lib/RenderScript/RSInfoExtractor.cpp
+++ b/lib/ExecutionEngine/RSInfoExtractor.cpp
@@ -17,14 +17,14 @@
 //===----------------------------------------------------------------------===//
 // This file implements RSInfo::ExtractFromSource()
 //===----------------------------------------------------------------------===//
-#include "bcc/RenderScript/RSInfo.h"
+#include "RSInfo.h"
 
 #include <llvm/Constants.h>
 #include <llvm/Metadata.h>
 #include <llvm/Module.h>
 
-#include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSInfoReader.cpp b/lib/ExecutionEngine/RSInfoReader.cpp
similarity index 98%
rename from lib/RenderScript/RSInfoReader.cpp
rename to lib/ExecutionEngine/RSInfoReader.cpp
index 4e42ffd..a3eca5a 100644
--- a/lib/RenderScript/RSInfoReader.cpp
+++ b/lib/ExecutionEngine/RSInfoReader.cpp
@@ -18,14 +18,14 @@
 // This file implements RSInfo::ReadFromFile()
 //===----------------------------------------------------------------------===//
 
-#include "bcc/RenderScript/RSInfo.h"
+#include "RSInfo.h"
 
 #include <new>
 
 #include <utils/FileMap.h>
 
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/InputFile.h"
+#include "DebugHelper.h"
+#include "InputFile.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSInfoWriter.cpp b/lib/ExecutionEngine/RSInfoWriter.cpp
similarity index 98%
rename from lib/RenderScript/RSInfoWriter.cpp
rename to lib/ExecutionEngine/RSInfoWriter.cpp
index 1f19839..d54fb41 100644
--- a/lib/RenderScript/RSInfoWriter.cpp
+++ b/lib/ExecutionEngine/RSInfoWriter.cpp
@@ -18,10 +18,10 @@
 // This file implements RSInfo::write()
 //===----------------------------------------------------------------------===//
 
-#include "bcc/RenderScript/RSInfo.h"
+#include "RSInfo.h"
 
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/OutputFile.h"
+#include "DebugHelper.h"
+#include "OutputFile.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSScript.cpp b/lib/ExecutionEngine/RSScript.cpp
similarity index 95%
rename from lib/RenderScript/RSScript.cpp
rename to lib/ExecutionEngine/RSScript.cpp
index 4cf8475..7ec84d9 100644
--- a/lib/RenderScript/RSScript.cpp
+++ b/lib/ExecutionEngine/RSScript.cpp
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#include "bcc/RenderScript/RSScript.h"
+#include "RSScript.h"
 
 #include <cstring>
 
 #include <llvm/ADT/STLExtras.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/RenderScript/RSScript.h b/lib/ExecutionEngine/RSScript.h
similarity index 94%
rename from include/bcc/RenderScript/RSScript.h
rename to lib/ExecutionEngine/RSScript.h
index d8dd8b4..1ae9c9d 100644
--- a/include/bcc/RenderScript/RSScript.h
+++ b/lib/ExecutionEngine/RSScript.h
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_SCRIPT_H
-#define BCC_RS_SCRIPT_H
+#ifndef BCC_EXECUTION_ENGINE_RS_SCRIPT_H
+#define BCC_EXECUTION_ENGINE_RS_SCRIPT_H
 
 #include <string>
 
 #include <llvm/ADT/SmallVector.h>
 #include <llvm/Support/CodeGen.h>
 
-#include "bcc/Script.h"
+#include "Script.h"
 
 namespace bcc {
 
@@ -107,4 +107,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_RS_SCRIPT_H
+#endif // BCC_EXECUTION_ENGINE_RS_SCRIPT_H
diff --git a/include/bcc/RenderScript/RSTransforms.h b/lib/ExecutionEngine/RSTransforms.h
similarity index 83%
rename from include/bcc/RenderScript/RSTransforms.h
rename to lib/ExecutionEngine/RSTransforms.h
index 77c2611..ec5f690 100644
--- a/include/bcc/RenderScript/RSTransforms.h
+++ b/lib/ExecutionEngine/RSTransforms.h
@@ -14,10 +14,10 @@
  * limitations under the License.
  */
 
-#ifndef BCC_RS_TRANSFORMS_H
-#define BCC_RS_TRANSFORMS_H
+#ifndef BCC_EXECUTION_ENGINE_RS_TRANSFORMS_H
+#define BCC_EXECUTION_ENGINE_RS_TRANSFORMS_H
 
-#include "bcc/RenderScript/RSInfo.h"
+#include "RSInfo.h"
 
 namespace llvm {
   class ModulePass;
@@ -30,4 +30,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_RS_TRANSFORMS_H
+#endif // BCC_EXECUTION_ENGINE_RS_TRANSFORMS_H
diff --git a/lib/Core/Script.cpp b/lib/ExecutionEngine/Script.cpp
similarity index 94%
rename from lib/Core/Script.cpp
rename to lib/ExecutionEngine/Script.cpp
index 8e8a274..785915c 100644
--- a/lib/Core/Script.cpp
+++ b/lib/ExecutionEngine/Script.cpp
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#include "bcc/Script.h"
+#include "Script.h"
 
-#include "bcc/Source.h"
+#include "Source.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Script.h b/lib/ExecutionEngine/Script.h
similarity index 93%
rename from include/bcc/Script.h
rename to lib/ExecutionEngine/Script.h
index 19b623b..aaa5eba 100644
--- a/include/bcc/Script.h
+++ b/lib/ExecutionEngine/Script.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SCRIPT_H
-#define BCC_SCRIPT_H
+#ifndef BCC_EXECUTION_ENGINE_SCRIPT_H
+#define BCC_EXECUTION_ENGINE_SCRIPT_H
 
 namespace bcc {
 
@@ -59,4 +59,4 @@
 
 } // end namespace bcc
 
-#endif  // BCC_SCRIPT_H
+#endif  // BCC_EXECUTION_ENGINE_SCRIPT_H
diff --git a/lib/Support/Sha1Helper.cpp b/lib/ExecutionEngine/Sha1Helper.cpp
similarity index 90%
rename from lib/Support/Sha1Helper.cpp
rename to lib/ExecutionEngine/Sha1Helper.cpp
index 350e704..07a995f 100644
--- a/lib/Support/Sha1Helper.cpp
+++ b/lib/ExecutionEngine/Sha1Helper.cpp
@@ -1,5 +1,5 @@
 /*
- * copyright 2010-2012, the android open source project
+ * copyright 2010, the android open source project
  *
  * licensed under the apache license, version 2.0 (the "license");
  * you may not use this file except in compliance with the license.
@@ -14,17 +14,18 @@
  * limitations under the license.
  */
 
-#include "bcc/Support/Sha1Helper.h"
+#include "Sha1Helper.h"
 
-#include <cstring>
+#include "Config.h"
+
+#include "DebugHelper.h"
+#include "InputFile.h"
+
+#include <string.h>
 
 #include <utils/StopWatch.h>
 
-#include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/InputFile.h"
-
-#include "sha1.h"
+#include <sha1.h>
 
 namespace bcc {
 
diff --git a/lib/ExecutionEngine/Sha1Helper.h b/lib/ExecutionEngine/Sha1Helper.h
new file mode 100644
index 0000000..fe13b7a
--- /dev/null
+++ b/lib/ExecutionEngine/Sha1Helper.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef BCC_SHA1HELPER_H
+#define BCC_SHA1HELPER_H
+
+#include "Config.h"
+
+#include <stddef.h>
+
+namespace bcc {
+  extern unsigned char sha1LibBCC_SHA1[20];
+  extern char const *pathLibBCC_SHA1;
+
+  extern unsigned char sha1LibRS[20];
+  extern char const *pathLibRS;
+
+  void calcSHA1(unsigned char *result, char const *data, size_t size);
+
+  void calcFileSHA1(unsigned char *result, char const *filename);
+
+  // Read binary representation of sha1 from filename.
+  void readSHA1(unsigned char *result, int resultsize, char const *filename);
+}
+
+#endif // BCC_SHA1HELPER_H
diff --git a/lib/Core/Source.cpp b/lib/ExecutionEngine/Source.cpp
similarity index 97%
rename from lib/Core/Source.cpp
rename to lib/ExecutionEngine/Source.cpp
index ad5561b..754f3e5 100644
--- a/lib/Core/Source.cpp
+++ b/lib/ExecutionEngine/Source.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/Source.h"
+#include "Source.h"
 
 #include <new>
 
@@ -25,10 +25,9 @@
 #include <llvm/Support/MemoryBuffer.h>
 #include <llvm/Support/system_error.h>
 
-#include "bcc/BCCContext.h"
-#include "bcc/Support/DebugHelper.h"
-
+#include "BCCContext.h"
 #include "BCCContextImpl.h"
+#include "DebugHelper.h"
 
 namespace {
 
diff --git a/include/bcc/Source.h b/lib/ExecutionEngine/Source.h
similarity index 92%
rename from include/bcc/Source.h
rename to lib/ExecutionEngine/Source.h
index 82060ea..b9a98e8 100644
--- a/include/bcc/Source.h
+++ b/lib/ExecutionEngine/Source.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2012, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SOURCE_H
-#define BCC_SOURCE_H
+#ifndef BCC_EXECUTION_ENGINE_SOURCE_H
+#define BCC_EXECUTION_ENGINE_SOURCE_H
 
 #include <string>
 
@@ -78,4 +78,4 @@
 
 } // namespace bcc
 
-#endif // BCC_SOURCE_H
+#endif // BCC_EXECUTION_ENGINE_SOURCE_H
diff --git a/include/bcc/ExecutionEngine/SymbolResolverInterface.h b/lib/ExecutionEngine/SymbolResolverInterface.h
similarity index 100%
rename from include/bcc/ExecutionEngine/SymbolResolverInterface.h
rename to lib/ExecutionEngine/SymbolResolverInterface.h
diff --git a/lib/ExecutionEngine/SymbolResolverProxy.cpp b/lib/ExecutionEngine/SymbolResolverProxy.cpp
index 5f3e7dc..29929d9 100644
--- a/lib/ExecutionEngine/SymbolResolverProxy.cpp
+++ b/lib/ExecutionEngine/SymbolResolverProxy.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/ExecutionEngine/SymbolResolverProxy.h"
+#include "SymbolResolverProxy.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/ExecutionEngine/SymbolResolverProxy.h b/lib/ExecutionEngine/SymbolResolverProxy.h
similarity index 91%
rename from include/bcc/ExecutionEngine/SymbolResolverProxy.h
rename to lib/ExecutionEngine/SymbolResolverProxy.h
index bf489d1..7bbdac5 100644
--- a/include/bcc/ExecutionEngine/SymbolResolverProxy.h
+++ b/lib/ExecutionEngine/SymbolResolverProxy.h
@@ -17,8 +17,8 @@
 #ifndef BCC_EXECUTION_ENGINE_SYMBOL_RESOLVER_PROXY_H
 #define BCC_EXECUTION_ENGINE_SYMBOL_RESOLVER_PROXY_H
 
-#include "bcc/ExecutionEngine/SymbolResolverInterface.h"
-#include "bcc/Support/DebugHelper.h"
+#include "DebugHelper.h"
+#include "SymbolResolverInterface.h"
 
 #include <utils/Vector.h>
 
diff --git a/lib/ExecutionEngine/SymbolResolvers.cpp b/lib/ExecutionEngine/SymbolResolvers.cpp
index 62914ac..26941f2 100644
--- a/lib/ExecutionEngine/SymbolResolvers.cpp
+++ b/lib/ExecutionEngine/SymbolResolvers.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/ExecutionEngine/SymbolResolvers.h"
+#include "SymbolResolvers.h"
 
 #include <dlfcn.h>
 
diff --git a/include/bcc/ExecutionEngine/SymbolResolvers.h b/lib/ExecutionEngine/SymbolResolvers.h
similarity index 100%
rename from include/bcc/ExecutionEngine/SymbolResolvers.h
rename to lib/ExecutionEngine/SymbolResolvers.h
diff --git a/lib/Support/TargetCompilerConfigs.cpp b/lib/ExecutionEngine/TargetCompilerConfigs.cpp
similarity index 97%
rename from lib/Support/TargetCompilerConfigs.cpp
rename to lib/ExecutionEngine/TargetCompilerConfigs.cpp
index 6ef7dcf..2e2f5da 100644
--- a/lib/Support/TargetCompilerConfigs.cpp
+++ b/lib/ExecutionEngine/TargetCompilerConfigs.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "bcc/Support/TargetCompilerConfigs.h"
+#include "TargetCompilerConfigs.h"
 
 using namespace bcc;
 
diff --git a/include/bcc/Support/TargetCompilerConfigs.h b/lib/ExecutionEngine/TargetCompilerConfigs.h
similarity index 93%
rename from include/bcc/Support/TargetCompilerConfigs.h
rename to lib/ExecutionEngine/TargetCompilerConfigs.h
index 766765e..bf10a7a 100644
--- a/include/bcc/Support/TargetCompilerConfigs.h
+++ b/lib/ExecutionEngine/TargetCompilerConfigs.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef BCC_SUPPORT_TARGET_COMPILER_CONFIGS_H
-#define BCC_SUPPORT_TARGET_COMPILER_CONFIGS_H
+#ifndef BCC_EXECUTION_ENGINE_TARGET_COMPILER_CONFIGS_H
+#define BCC_EXECUTION_ENGINE_TARGET_COMPILER_CONFIGS_H
 
-#include "bcc/Config/Config.h"
-#include "bcc/Support/CompilerConfig.h"
+#include "CompilerConfig.h"
+#include "Config.h"
 
 namespace bcc {
 
@@ -99,4 +99,4 @@
 
 } // end namespace bcc
 
-#endif // BCC_SUPPORT_TARGET_COMPILER_CONFIGS_H
+#endif // BCC_EXECUTION_ENGINE_TARGET_COMPILER_CONFIGS_H
diff --git a/lib/Core/bcc.cpp b/lib/ExecutionEngine/bcc.cpp
similarity index 97%
rename from lib/Core/bcc.cpp
rename to lib/ExecutionEngine/bcc.cpp
index 071401b..b830ec2 100644
--- a/lib/Core/bcc.cpp
+++ b/lib/ExecutionEngine/bcc.cpp
@@ -17,22 +17,21 @@
 // Bitcode compiler (bcc) for Android:
 //    This is an eager-compilation JIT running on Android.
 
-#include "bcc/bcc.h"
+#include <bcc/bcc.h>
 
 #include <llvm/Support/CodeGen.h>
 
 #include <utils/StopWatch.h>
 
-#include <bcinfo/BitcodeWrapper.h>
-
-#include "bcc/RenderScript/RSExecutable.h"
-#include "bcc/RenderScript/RSScript.h"
-#include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
-#include "bcc/Support/Initialization.h"
-#include "bcc/Support/Sha1Helper.h"
+#include "DebugHelper.h"
+#include "Initialization.h"
+#include "RSExecutable.h"
+#include "RSScript.h"
+#include "Sha1Helper.h"
+#include "Source.h"
 
 #include "bcc_internal.h"
+#include <bcinfo/BitcodeWrapper.h>
 
 using namespace bcc;
 
diff --git a/lib/Core/bcc_internal.h b/lib/ExecutionEngine/bcc_internal.h
similarity index 94%
rename from lib/Core/bcc_internal.h
rename to lib/ExecutionEngine/bcc_internal.h
index d7cc2cf..c003d6c 100644
--- a/lib/Core/bcc_internal.h
+++ b/lib/ExecutionEngine/bcc_internal.h
@@ -17,10 +17,10 @@
 #ifndef BCC_INTERNAL_H
 #define BCC_INTERNAL_H
 
-#include "bcc/bcc.h"
+#include <bcc/bcc.h>
 
-#include "bcc/BCCContext.h"
-#include "bcc/RenderScript/RSCompilerDriver.h"
+#include "BCCContext.h"
+#include "RSCompilerDriver.h"
 
 #if defined(__cplusplus)
 
diff --git a/lib/RenderScript/Android.mk b/lib/RenderScript/Android.mk
deleted file mode 100644
index 09c5df0..0000000
--- a/lib/RenderScript/Android.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-LOCAL_PATH := $(call my-dir)
-
-#=====================================================================
-# Common: libbccRenderScript
-#=====================================================================
-
-libbcc_renderscript_SRC_FILES := \
-  RSCompiler.cpp \
-  RSCompilerDriver.cpp \
-  RSExecutable.cpp \
-  RSForEachExpand.cpp \
-  RSInfo.cpp \
-  RSInfoExtractor.cpp \
-  RSInfoReader.cpp \
-  RSInfoWriter.cpp \
-  RSScript.cpp
-
-#=====================================================================
-# Device Static Library: libbccRenderScript
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libbccRenderScript
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_SRC_FILES := $(libbcc_renderscript_SRC_FILES)
-
-include $(LIBBCC_DEVICE_BUILD_MK)
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_DEVICE_BUILD_MK)
-include $(BUILD_STATIC_LIBRARY)
-
-
-#=====================================================================
-# Host Static Library: libbccRenderScript
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libbccRenderScript
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_IS_HOST_MODULE := true
-
-LOCAL_SRC_FILES := $(libbcc_renderscript_SRC_FILES)
-
-include $(LIBBCC_HOST_BUILD_MK)
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_HOST_BUILD_MK)
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-# Build RenderScript runtime (libclcore.bc)
-include $(LOCAL_PATH)/runtime/Android.mk
diff --git a/lib/RenderScript/runtime/clamp.ll b/lib/RenderScript/runtime/clamp.ll
deleted file mode 100644
index f4d58ec..0000000
--- a/lib/RenderScript/runtime/clamp.ll
+++ /dev/null
@@ -1,16 +0,0 @@
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
-target triple = "armv7-none-linux-gnueabi"
-
-define i32 @_Z7rsClampjjj(i32 %amount, i32 %low, i32 %high) nounwind readnone alwaysinline {
-  %1 = icmp ult i32 %amount, %low
-  br i1 %1, label %5, label %2
-
-; <label>:2                                       ; preds = %0
-  %3 = icmp ugt i32 %amount, %high
-  %4 = select i1 %3, i32 %high, i32 %amount
-  br label %5
-
-; <label>:5                                       ; preds = %2, %0
-  %6 = phi i32 [ %4, %2 ], [ %low, %0 ]
-  ret i32 %6
-}
diff --git a/lib/RenderScript/runtime/Android.mk b/lib/ScriptCRT/Android.mk
similarity index 100%
rename from lib/RenderScript/runtime/Android.mk
rename to lib/ScriptCRT/Android.mk
diff --git a/lib/RenderScript/runtime/build_clcore.sh b/lib/ScriptCRT/build_clcore.sh
similarity index 100%
rename from lib/RenderScript/runtime/build_clcore.sh
rename to lib/ScriptCRT/build_clcore.sh
diff --git a/lib/RenderScript/runtime/convert.ll b/lib/ScriptCRT/convert.ll
similarity index 100%
rename from lib/RenderScript/runtime/convert.ll
rename to lib/ScriptCRT/convert.ll
diff --git a/lib/RenderScript/runtime/matrix.ll b/lib/ScriptCRT/matrix.ll
similarity index 100%
rename from lib/RenderScript/runtime/matrix.ll
rename to lib/ScriptCRT/matrix.ll
diff --git a/lib/RenderScript/runtime/pixel_packing.ll b/lib/ScriptCRT/pixel_packing.ll
similarity index 100%
rename from lib/RenderScript/runtime/pixel_packing.ll
rename to lib/ScriptCRT/pixel_packing.ll
diff --git a/lib/RenderScript/runtime/rs_allocation.c b/lib/ScriptCRT/rs_allocation.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_allocation.c
rename to lib/ScriptCRT/rs_allocation.c
diff --git a/lib/RenderScript/runtime/rs_cl.c b/lib/ScriptCRT/rs_cl.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_cl.c
rename to lib/ScriptCRT/rs_cl.c
diff --git a/lib/RenderScript/runtime/rs_core.c b/lib/ScriptCRT/rs_core.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_core.c
rename to lib/ScriptCRT/rs_core.c
diff --git a/lib/RenderScript/runtime/rs_element.c b/lib/ScriptCRT/rs_element.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_element.c
rename to lib/ScriptCRT/rs_element.c
diff --git a/lib/RenderScript/runtime/rs_mesh.c b/lib/ScriptCRT/rs_mesh.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_mesh.c
rename to lib/ScriptCRT/rs_mesh.c
diff --git a/lib/RenderScript/runtime/rs_program.c b/lib/ScriptCRT/rs_program.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_program.c
rename to lib/ScriptCRT/rs_program.c
diff --git a/lib/RenderScript/runtime/rs_sample.c b/lib/ScriptCRT/rs_sample.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_sample.c
rename to lib/ScriptCRT/rs_sample.c
diff --git a/lib/RenderScript/runtime/rs_sampler.c b/lib/ScriptCRT/rs_sampler.c
similarity index 100%
rename from lib/RenderScript/runtime/rs_sampler.c
rename to lib/ScriptCRT/rs_sampler.c
diff --git a/lib/RenderScript/runtime/rs_structs.h b/lib/ScriptCRT/rs_structs.h
similarity index 100%
rename from lib/RenderScript/runtime/rs_structs.h
rename to lib/ScriptCRT/rs_structs.h
diff --git a/lib/Support/Android.mk b/lib/Support/Android.mk
deleted file mode 100644
index 4bafba7..0000000
--- a/lib/Support/Android.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-LOCAL_PATH := $(call my-dir)
-
-#=====================================================================
-# Common: libbccSupport
-#=====================================================================
-
-libbcc_support_SRC_FILES := \
-  sha1.c \
-  CompilerConfig.cpp \
-  FileBase.cpp \
-  Initialization.cpp \
-  InputFile.cpp \
-  OutputFile.cpp \
-  Sha1Helper.cpp \
-  TargetCompilerConfigs.cpp
-
-ifeq ($(libbcc_USE_DISASSEMBLER),1)
-libbcc_support_SRC_FILES += Disassembler.cpp
-endif
-
-#=====================================================================
-# Device Static Library: libbccSupport
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libbccSupport
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_SRC_FILES := $(libbcc_support_SRC_FILES)
-
-include $(LIBBCC_DEVICE_BUILD_MK)
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_DEVICE_BUILD_MK)
-include $(BUILD_STATIC_LIBRARY)
-
-
-#=====================================================================
-# Host Static Library: libbccSupport
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libbccSupport
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_SRC_FILES := $(libbcc_support_SRC_FILES)
-
-include $(LIBBCC_HOST_BUILD_MK)
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_HOST_BUILD_MK)
-include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/libbcc-device-build.mk b/libbcc-device-build.mk
index e87dc2b..a3d294a 100644
--- a/libbcc-device-build.mk
+++ b/libbcc-device-build.mk
@@ -56,5 +56,7 @@
 endif
 
 LOCAL_C_INCLUDES := \
+  $(LIBBCC_ROOT_PATH) \
+  $(LIBBCC_ROOT_PATH)/helper \
   $(LIBBCC_ROOT_PATH)/include \
   $(LOCAL_C_INCLUDES)
diff --git a/libbcc-gen-build-stamp.mk b/libbcc-gen-build-stamp.mk
index 95116d6..a2d8374 100644
--- a/libbcc-gen-build-stamp.mk
+++ b/libbcc-gen-build-stamp.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2012 The Android Open Source Project
+# Copyright (C) 2011 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@
       STATIC_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/$(lib)$(a_suffix)) \
   $(addprefix $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \
     $(addsuffix $(so_suffix), $(LOCAL_SHARED_LIBRARIES))) \
-  $(LIBBCC_ROOT_PATH)/lib/Core/bcc.cpp
+  $(LIBBCC_ROOT_PATH)/lib/ExecutionEngine/bcc.cpp
 
 
 # Build Rules for Automatically Generated Build Stamp
diff --git a/libbcc-gen-config-from-mk.mk b/libbcc-gen-config-from-mk.mk
index 30bfd58..cc290ff 100644
--- a/libbcc-gen-config-from-mk.mk
+++ b/libbcc-gen-config-from-mk.mk
@@ -1,20 +1,3 @@
-#
-# Copyright (C) 2011-2012 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
 # Build Rules for Extracting Configuration from Android.mk
 intermediates := $(local-intermediates-dir)
 
diff --git a/libbcc-host-build.mk b/libbcc-host-build.mk
index 85af6f3..b5bc9bd 100644
--- a/libbcc-host-build.mk
+++ b/libbcc-host-build.mk
@@ -26,6 +26,8 @@
 endif
 
 LOCAL_C_INCLUDES := \
+  $(LIBBCC_ROOT_PATH) \
+  $(LIBBCC_ROOT_PATH)/helper \
   $(LIBBCC_ROOT_PATH)/include \
   $(LOCAL_C_INCLUDES)