1# 2# Copyright (C) 2016 The Android Open-Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17LOCAL_PATH := $(call my-dir) 18 19# A static library providing glue logic that simplifies creation of NVRAM HAL 20# modules. 21include $(CLEAR_VARS) 22LOCAL_MODULE := libnvram-hal 23LOCAL_SRC_FILES := \ 24 nvram_device_adapter.cpp 25LOCAL_CFLAGS := -Wall -Werror -Wextra 26LOCAL_CLANG := true 27LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 28LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 29LOCAL_SHARED_LIBRARIES := libnvram-messages 30include $(BUILD_STATIC_LIBRARY) 31 32# nvram.testing is the software-only testing NVRAM HAL module backed by the 33# fake_nvram daemon. 34include $(CLEAR_VARS) 35LOCAL_MODULE := nvram.testing 36LOCAL_MODULE_RELATIVE_PATH := hw 37LOCAL_SRC_FILES := \ 38 testing_module.c \ 39 testing_nvram_implementation.cpp 40LOCAL_CLANG := true 41LOCAL_CFLAGS := -Wall -Werror -Wextra -fvisibility=hidden 42LOCAL_STATIC_LIBRARIES := libnvram-hal 43LOCAL_SHARED_LIBRARIES := libnvram-messages libcutils libbase 44LOCAL_MODULE_TAGS := optional 45include $(BUILD_SHARED_LIBRARY) 46 47# fake_nvram is a system daemon that provides a software-only access-controlled 48# NVRAM implementation. This is only for illustration and in order to get code 49# using access-controlled NVRAM running on emulators. It *DOES NOT* meet the 50# tamper evidence requirements, so can't be used on production devices. 51include $(CLEAR_VARS) 52LOCAL_MODULE := fake-nvram 53LOCAL_SRC_FILES := \ 54 fake_nvram.cpp \ 55 fake_nvram_storage.cpp 56LOCAL_CLANG := true 57LOCAL_CFLAGS := -Wall -Werror -Wextra 58LOCAL_STATIC_LIBRARIES := libnvram-core 59LOCAL_SHARED_LIBRARIES := \ 60 libnvram-messages \ 61 libcrypto \ 62 libminijail \ 63 liblog \ 64 libcutils \ 65 libbase 66LOCAL_INIT_RC := fake-nvram.rc 67LOCAL_REQUIRED_MODULES := fake-nvram-seccomp.policy 68LOCAL_MODULE_TAGS := optional 69include $(BUILD_EXECUTABLE) 70 71# seccomp policy for fake_nvram. 72include $(CLEAR_VARS) 73LOCAL_MODULE := fake-nvram-seccomp.policy 74LOCAL_MODULE_CLASS := ETC 75LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/policy/ 76LOCAL_SRC_FILES := fake-nvram-seccomp-$(TARGET_ARCH).policy 77LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 78include $(BUILD_PREBUILT) 79 80include $(call all-makefiles-under,$(LOCAL_PATH)) 81