diff options
author | Steven Moreland <smoreland@google.com> | 2017-05-05 16:43:06 -0700 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2017-05-05 17:09:25 -0700 |
commit | fe3a6bb2ddd1292cfef616418b22dcd1447fda87 (patch) | |
tree | 40785915201da36e2d10acc3427603f6b48ddd62 | |
parent | f5f0086758d7914ae5d9d2042d77f9289699eb16 (diff) | |
download | nvram-fe3a6bb2ddd1292cfef616418b22dcd1447fda87.tar.gz |
libnvram hal+client: Android.mk -> Android.bpandroid-o-preview-3android-n-iot-preview-4n-iot-preview-4
Test: links
Bug: 37512442
Change-Id: Ie8cd6e441b7195447068191f35fd4207e1338216
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | client/Android.bp | 29 | ||||
-rw-r--r-- | client/Android.mk | 26 | ||||
-rw-r--r-- | hal/Android.bp | 57 | ||||
-rw-r--r-- | hal/Android.mk | 30 | ||||
-rw-r--r-- | hal/tests/Android.bp | 35 | ||||
-rw-r--r-- | hal/tests/Android.mk | 28 |
7 files changed, 123 insertions, 84 deletions
@@ -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) |