aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-04-28 15:42:11 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-28 15:42:11 +0000
commit440e82247238e42a4362cee90c061f79d7ccffa9 (patch)
tree37d9f3bd2366c71cff7f407930deb14c28d0c09a
parent1039303eb3e46a3d9a5f15259b6af0555ef4401e (diff)
parented52d5ae3399c959627a00128d4321617d63d72f (diff)
downloadnvram-440e82247238e42a4362cee90c061f79d7ccffa9.tar.gz
Android.mk -> Android.bp am: f5f0086758 am: a0882598bd
am: ed52d5ae33 Change-Id: I1c20ccd1c79cfa2e4210ee077e856cc253bc4f5e
-rw-r--r--Android.bp3
-rw-r--r--core/Android.mk2
-rw-r--r--core/tests/Android.mk2
-rw-r--r--messages/Android.bp39
-rw-r--r--messages/Android.mk47
-rw-r--r--messages/tests/Android.bp29
-rw-r--r--messages/tests/Android.mk28
7 files changed, 73 insertions, 77 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..b5a21a5
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+ "messages",
+]
diff --git a/core/Android.mk b/core/Android.mk
index 4ba77b6..609fe7d 100644
--- a/core/Android.mk
+++ b/core/Android.mk
@@ -39,7 +39,7 @@ LOCAL_CFLAGS := -Wall -Werror -Wextra -DNVRAM_WIPE_STORAGE_SUPPORT
LOCAL_CLANG := true
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_SHARED_LIBRARIES := libnvram-messages-host libcrypto
+LOCAL_SHARED_LIBRARIES := libnvram-messages libcrypto
include $(BUILD_HOST_STATIC_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/Android.mk b/core/tests/Android.mk
index 1be8329..382ed25 100644
--- a/core/tests/Android.mk
+++ b/core/tests/Android.mk
@@ -25,5 +25,5 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS := -Wall -Werror -Wextra -DHAS_GTEST
LOCAL_CLANG := true
LOCAL_STATIC_LIBRARIES := libnvram-core-host
-LOCAL_SHARED_LIBRARIES := libnvram-messages-host libcrypto
+LOCAL_SHARED_LIBRARIES := libnvram-messages libcrypto
include $(BUILD_HOST_NATIVE_TEST)
diff --git a/messages/Android.bp b/messages/Android.bp
new file mode 100644
index 0000000..88aa842
--- /dev/null
+++ b/messages/Android.bp
@@ -0,0 +1,39 @@
+//
+// 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",
+]
+
+cc_library_shared {
+ name: "libnvram-messages",
+ host_supported: true,
+ srcs: [
+ "blob.cpp",
+ "io.cpp",
+ "message_codec.cpp",
+ "nvram_messages.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ "-fvisibility=hidden",
+ ],
+ export_include_dirs: ["include"],
+ static_libs: ["libbase"],
+}
+
diff --git a/messages/Android.mk b/messages/Android.mk
deleted file mode 100644
index 187da1c..0000000
--- a/messages/Android.mk
+++ /dev/null
@@ -1,47 +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 := libnvram-messages
-LOCAL_SRC_FILES := \
- blob.cpp \
- io.cpp \
- message_codec.cpp \
- nvram_messages.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wextra -fvisibility=hidden
-LOCAL_CLANG := true
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_STATIC_LIBRARIES := libbase
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libnvram-messages-host
-LOCAL_SRC_FILES := \
- blob.cpp \
- io.cpp \
- message_codec.cpp \
- nvram_messages.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wextra -fvisibility=hidden
-LOCAL_CLANG := true
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_STATIC_LIBRARIES := libbase
-include $(BUILD_HOST_SHARED_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/messages/tests/Android.bp b/messages/tests/Android.bp
new file mode 100644
index 0000000..a65300f
--- /dev/null
+++ b/messages/tests/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_test_host {
+ name: "libnvram-messages-tests",
+ srcs: [
+ "io_test.cpp",
+ "nvram_messages_test.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ shared_libs: ["libnvram-messages"],
+}
diff --git a/messages/tests/Android.mk b/messages/tests/Android.mk
deleted file mode 100644
index 298b9d3..0000000
--- a/messages/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)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libnvram-messages-tests
-LOCAL_MODULE_TAGS := debug
-LOCAL_SRC_FILES := \
- io_test.cpp \
- nvram_messages_test.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wextra
-LOCAL_CLANG := true
-LOCAL_SHARED_LIBRARIES := libnvram-messages-host
-include $(BUILD_HOST_NATIVE_TEST)