aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-09-10 08:11:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-09-10 08:11:17 +0000
commit94cae02e94c63d53d102afef82c374d80125822c (patch)
tree66ebd4a4497e61b57857d2029309f65878e81986
parent916cbd6905a075fe53123d1022d0c9109c18d6d4 (diff)
parent8083efb6b6134af47eb3fbf0d5bac3224b5691c0 (diff)
downloadnvram-94cae02e94c63d53d102afef82c374d80125822c.tar.gz
release-request-cacfaf25-4304-4e6b-ab4e-089367c7ed39-for-git_pi-release-4326570 snap-temp-L59400000101056305
Change-Id: I415e87622390c0019e03513fcf1f8f8134399ec9
-rw-r--r--Android.bp1
-rw-r--r--core/Android.bp42
-rw-r--r--core/Android.mk45
-rw-r--r--core/tests/Android.bp34
-rw-r--r--core/tests/Android.mk29
5 files changed, 77 insertions, 74 deletions
diff --git a/Android.bp b/Android.bp
index ec66f73..3d15039 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,6 @@
subdirs = [
"client",
+ "core",
"hal",
"messages",
]
diff --git a/core/Android.bp b/core/Android.bp
new file mode 100644
index 0000000..094281e
--- /dev/null
+++ b/core/Android.bp
@@ -0,0 +1,42 @@
+//
+// 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_library_static {
+ name: "libnvram-core",
+ host_supported: true,
+ srcs: [
+ "crypto_boringssl.cpp",
+ "nvram_manager.cpp",
+ "persistence.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+
+ target: {
+ host: {
+ cflags: ["-DNVRAM_WIPE_STORAGE_SUPPORT"],
+ },
+ },
+
+ export_include_dirs: ["include"],
+ shared_libs: [
+ "libnvram-messages",
+ "libcrypto",
+ ],
+}
diff --git a/core/Android.mk b/core/Android.mk
deleted file mode 100644
index 609fe7d..0000000
--- a/core/Android.mk
+++ /dev/null
@@ -1,45 +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-core
-LOCAL_SRC_FILES := \
- crypto_boringssl.cpp \
- nvram_manager.cpp \
- persistence.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 libcrypto
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libnvram-core-host
-LOCAL_SRC_FILES := \
- crypto_boringssl.cpp \
- nvram_manager.cpp \
- persistence.cpp
-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 libcrypto
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/Android.bp b/core/tests/Android.bp
new file mode 100644
index 0000000..d31ffe7
--- /dev/null
+++ b/core/tests/Android.bp
@@ -0,0 +1,34 @@
+//
+// 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-core-tests",
+ srcs: [
+ "fake_storage.cpp",
+ "nvram_manager_test.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ "-DHAS_GTEST",
+ ],
+ static_libs: ["libnvram-core"],
+ shared_libs: [
+ "libnvram-messages",
+ "libcrypto",
+ ],
+}
diff --git a/core/tests/Android.mk b/core/tests/Android.mk
deleted file mode 100644
index 382ed25..0000000
--- a/core/tests/Android.mk
+++ /dev/null
@@ -1,29 +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-core-tests
-LOCAL_MODULE_TAGS := debug
-LOCAL_SRC_FILES := \
- fake_storage.cpp \
- nvram_manager_test.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wextra -DHAS_GTEST
-LOCAL_CLANG := true
-LOCAL_STATIC_LIBRARIES := libnvram-core-host
-LOCAL_SHARED_LIBRARIES := libnvram-messages libcrypto
-include $(BUILD_HOST_NATIVE_TEST)