Move keystore to Android.bp.

Test: builds, boots
Bug: 67041047
Change-Id: I4ec9ddc69552d853e7d1c2296dcd8de8cb3f5942
diff --git a/softkeymaster/Android.bp b/softkeymaster/Android.bp
new file mode 100644
index 0000000..3d27ecb
--- /dev/null
+++ b/softkeymaster/Android.bp
@@ -0,0 +1,40 @@
+cc_defaults {
+    name: "softkeymaster_defaults",
+
+    cflags: [
+        "-Wall",
+        "-Werror",
+        "-fvisibility=hidden",
+    ],
+}
+
+cc_library_shared {
+    name: "keystore.default",
+    defaults: ["softkeymaster_defaults"],
+
+    relative_install_path: "hw",
+    srcs: ["module.cpp"],
+    include_dirs: ["system/security/keystore"],
+    shared_libs: [
+        "libcrypto",
+        "libkeystore_binder",
+        "liblog",
+        "libsoftkeymaster",
+    ],
+}
+
+cc_library_shared {
+    name: "libsoftkeymaster",
+    defaults: ["softkeymaster_defaults"],
+
+    srcs: ["keymaster_openssl.cpp"],
+    include_dirs: ["system/security/keystore"],
+    local_include_dirs: [],
+    shared_libs: [
+        "libcrypto",
+        "libkeystore_binder",
+        "liblog",
+    ],
+
+    export_include_dirs: ["include"],
+}
diff --git a/softkeymaster/Android.mk b/softkeymaster/Android.mk
deleted file mode 100644
index eb32c87..0000000
--- a/softkeymaster/Android.mk
+++ /dev/null
@@ -1,44 +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)
-
-include $(CLEAR_VARS)
-ifeq ($(USE_32_BIT_KEYSTORE), true)
-LOCAL_MULTILIB := 32
-endif
-LOCAL_MODULE := keystore.default
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := module.cpp
-LOCAL_C_INCLUDES := system/security/keystore
-LOCAL_CFLAGS = -fvisibility=hidden -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libcrypto liblog libkeystore_binder libsoftkeymaster
-LOCAL_MODULE_TAGS := optional
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-ifeq ($(USE_32_BIT_KEYSTORE), true)
-LOCAL_MULTILIB := 32
-endif
-LOCAL_MODULE := libsoftkeymaster
-LOCAL_SRC_FILES := keymaster_openssl.cpp
-LOCAL_C_INCLUDES := system/security/keystore \
-	$(LOCAL_PATH)/include
-LOCAL_CFLAGS = -fvisibility=hidden -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libcrypto liblog libkeystore_binder
-LOCAL_MODULE_TAGS := optional
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-include $(BUILD_SHARED_LIBRARY)