aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-05-08 23:05:38 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-08 23:05:38 +0000
commitb5cda23a4754d32a01589ea49cc4dc220d4ec7e1 (patch)
tree40785915201da36e2d10acc3427603f6b48ddd62
parent72d9fcad96eb9427eceae2e03f08ca4612fbb01b (diff)
parent0053510ca76603eff90085f2907237e2a2db82ca (diff)
downloadnvram-b5cda23a4754d32a01589ea49cc4dc220d4ec7e1.tar.gz
libnvram hal+client: Android.mk -> Android.bp am: fe3a6bb2dd am: c80b62e9d0 am: 45752a7933
am: 0053510ca7 Change-Id: Ie3aaf267c2f30fc9711575a1d6454124ecf662c6
-rw-r--r--Android.bp2
-rw-r--r--client/Android.bp29
-rw-r--r--client/Android.mk26
-rw-r--r--hal/Android.bp57
-rw-r--r--hal/Android.mk30
-rw-r--r--hal/tests/Android.bp35
-rw-r--r--hal/tests/Android.mk28
7 files changed, 123 insertions, 84 deletions
diff --git a/Android.bp b/Android.bp
index b5a21a5..ec66f73 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,5 @@
subdirs = [
+ "client",
+ "hal",
"messages",
]
diff --git a/client/Android.bp b/client/Android.bp
new file mode 100644
index 0000000..c430efe
--- /dev/null
+++ b/client/Android.bp
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 2016 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.
+//
+
+cc_binary {
+ name: "nvram-client",
+ srcs: ["nvram_client.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ shared_libs: [
+ "libhardware",
+ "libbase",
+ ],
+}
diff --git a/client/Android.mk b/client/Android.mk
deleted file mode 100644
index f1a852a..0000000
--- a/client/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2016 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)
-LOCAL_MODULE := nvram-client
-LOCAL_SRC_FILES := \
- nvram_client.c
-LOCAL_CFLAGS := -Wall -Werror -Wextra
-LOCAL_CLANG := true
-LOCAL_SHARED_LIBRARIES := libhardware libbase
-include $(BUILD_EXECUTABLE)
diff --git a/hal/Android.bp b/hal/Android.bp
new file mode 100644
index 0000000..f542e0f
--- /dev/null
+++ b/hal/Android.bp
@@ -0,0 +1,57 @@
+//
+// Copyright (C) 2016 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.
+//
+
+subdirs = [
+ "tests"
+]
+
+// A static library providing glue logic that simplifies creation of NVRAM HAL
+// modules.
+cc_library_static {
+ name: "libnvram-hal",
+ srcs: ["nvram_device_adapter.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ export_include_dirs: ["include"],
+ shared_libs: ["libnvram-messages"],
+}
+
+// nvram.testing is the software-only testing NVRAM HAL module backed by the
+// fake_nvram daemon.
+cc_library_shared {
+ name: "nvram.testing",
+ relative_install_path: "hw",
+ srcs: [
+ "testing_module.c",
+ "testing_nvram_implementation.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ "-fvisibility=hidden",
+ ],
+ static_libs: ["libnvram-hal"],
+ shared_libs: [
+ "libnvram-messages",
+ "libcutils",
+ "libbase",
+ ],
+
+}
diff --git a/hal/Android.mk b/hal/Android.mk
index 7f135df..973ac38 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -16,34 +16,6 @@
LOCAL_PATH := $(call my-dir)
-# A static library providing glue logic that simplifies creation of NVRAM HAL
-# modules.
-include $(CLEAR_VARS)
-LOCAL_MODULE := libnvram-hal
-LOCAL_SRC_FILES := \
- nvram_device_adapter.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wextra
-LOCAL_CLANG := true
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_SHARED_LIBRARIES := libnvram-messages
-include $(BUILD_STATIC_LIBRARY)
-
-# nvram.testing is the software-only testing NVRAM HAL module backed by the
-# fake_nvram daemon.
-include $(CLEAR_VARS)
-LOCAL_MODULE := nvram.testing
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := \
- testing_module.c \
- testing_nvram_implementation.cpp
-LOCAL_CLANG := true
-LOCAL_CFLAGS := -Wall -Werror -Wextra -fvisibility=hidden
-LOCAL_STATIC_LIBRARIES := libnvram-hal
-LOCAL_SHARED_LIBRARIES := libnvram-messages libcutils libbase
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_SHARED_LIBRARY)
-
# fake_nvram is a system daemon that provides a software-only access-controlled
# NVRAM implementation. This is only for illustration and in order to get code
# using access-controlled NVRAM running on emulators. It *DOES NOT* meet the
@@ -76,5 +48,3 @@ LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/policy/
LOCAL_SRC_FILES := fake-nvram-seccomp-$(TARGET_ARCH).policy
LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
include $(BUILD_PREBUILT)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hal/tests/Android.bp b/hal/tests/Android.bp
new file mode 100644
index 0000000..28d9adf
--- /dev/null
+++ b/hal/tests/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2016 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.
+
+// nvram_hal_test
+// ========================================================
+cc_test {
+ name: "nvram_hal_test",
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+ shared_libs: [
+ "libhardware",
+ "libcrypto",
+ "libbase",
+ ],
+ static_libs: ["libnvram-hal"],
+ srcs: [
+ "nvram_hal_test.cc",
+ "scoped_nvram_device.cc",
+ ],
+}
diff --git a/hal/tests/Android.mk b/hal/tests/Android.mk
deleted file mode 100644
index 3c2573d..0000000
--- a/hal/tests/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2016 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)
-
-# nvram_hal_test
-# ========================================================
-include $(CLEAR_VARS)
-LOCAL_MODULE := nvram_hal_test
-LOCAL_MODULE_TAGS := debug
-LOCAL_CPP_EXTENSION := cc
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-LOCAL_CLANG := true
-LOCAL_SHARED_LIBRARIES := libhardware libcrypto libbase
-LOCAL_STATIC_LIBRARIES := libnvram-hal
-LOCAL_SRC_FILES := nvram_hal_test.cc scoped_nvram_device.cc
-include $(BUILD_NATIVE_TEST)