diff options
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | core/Android.bp | 42 | ||||
-rw-r--r-- | core/Android.mk | 45 | ||||
-rw-r--r-- | core/tests/Android.bp | 34 | ||||
-rw-r--r-- | core/tests/Android.mk | 29 |
5 files changed, 77 insertions, 74 deletions
@@ -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) |