Split libhidl into base and transport.

libhidlbase contains "pure" classes that has nothing
to do with tranport level stuff. libhwbinder can now
safely depend on libhidlbase.

IBinder inheriting from IBase will be in a follow up
CL.

Bug: 32756130

Test: mma under hardware/interfaces
Test: hidl_test
Change-Id: Ie2bd80769df3816aab83789ba0d7fca9b5a2e52f
diff --git a/Android.bp b/Android.bp
index 87bee79..ea670fa 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,47 +13,27 @@
 // limitations under the License.
 
 subdirs = [
-    "test",
-    "manager/1.0"
+    "base",         // libhidlbase
+    "transport",    // libhidl
 ]
 
-cc_library_shared {
-    name: "libhidl",
+cc_test {
+    name: "libhidl_test",
+    gtest: false,
+    srcs: ["test_main.cpp"],
+
     shared_libs: [
         "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "libhwbinder",
-        "libcutils",
     ],
-    export_shared_lib_headers: [
-        "libbase",
-        "libutils",
+    static_libs: ["libgtest"],
+
+    cflags: [
+        "-O0",
+        "-g",
     ],
-    local_include_dirs: ["include"],
-    export_include_dirs: ["include"],
-
-    clang: true,
-    sanitize: {
-        misc_undefined: ["integer"],
-    },
-
-    generated_sources: ["android.hidl.manager@1.0_genc++"],
-    generated_headers: ["android.hidl.manager@1.0_genc++_headers"],
-    export_generated_headers: ["android.hidl.manager@1.0_genc++_headers"],
-
-    srcs: [
-        "HidlSupport.cpp",
-        "HidlBinderSupport.cpp",
-        "ServiceManagement.cpp",
-        "Static.cpp",
-        "Status.cpp",
-        "TaskRunner.cpp",
-    ],
-
-    product_variables: {
-        debuggable: {
-            cflags: ["-DLIBHIDL_TARGET_DEBUGGABLE"],
-        },
-    },
 }