1# Copyright (C) 2021 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16LOCAL_DIR := $(GET_LOCAL_DIR) 17COMMON_DIR := $(LOCAL_DIR)/../common 18STORAGE_DIR := $(LOCAL_DIR)/../.. 19 20HOST_TEST := storage_host_test 21 22HOST_SRCS := \ 23 $(STORAGE_DIR)/block_allocator.c \ 24 $(STORAGE_DIR)/block_cache.c \ 25 $(STORAGE_DIR)/block_device_tipc.c \ 26 $(STORAGE_DIR)/block_mac.c \ 27 $(STORAGE_DIR)/block_map.c \ 28 $(STORAGE_DIR)/block_set.c \ 29 $(STORAGE_DIR)/block_tree.c \ 30 $(STORAGE_DIR)/checkpoint.c \ 31 $(STORAGE_DIR)/crypt.c \ 32 $(STORAGE_DIR)/file.c \ 33 $(STORAGE_DIR)/rpmb_dev/rpmb_dev.c \ 34 $(STORAGE_DIR)/rpmb.c \ 35 $(STORAGE_DIR)/super.c \ 36 $(STORAGE_DIR)/transaction.c \ 37 $(LOCAL_DIR)/library_shims.c \ 38 $(LOCAL_DIR)/storage_host_test.c \ 39 $(LOCAL_DIR)/storageproxy_shim.c \ 40 $(COMMON_DIR)/error_reporting_mock.c \ 41 42HOST_INCLUDE_DIRS += \ 43 $(LOCAL_DIR) \ 44 $(STORAGE_DIR) \ 45 $(COMMON_DIR) \ 46 trusty/kernel/lib/libc-ext/include \ 47 trusty/user/base/interface/storage/include \ 48 49# block_device_tipc.h requires hwkey and system_state for declarations even 50# though we aren't linking against it. 51HOST_INCLUDE_DIRS += \ 52 trusty/user/base/interface/hwkey/include \ 53 trusty/user/base/interface/system_state/include \ 54 trusty/user/base/lib/hwkey/include \ 55 trusty/user/base/lib/system_state/include \ 56 trusty/user/base/lib/tipc/include \ 57 58# Turn on FULL_ASSERTs 59HOST_FLAGS := -DBUILD_STORAGE_TEST=1 60 61STORAGE_RPMB_PROTOCOL ?= MMC 62HOST_FLAGS += \ 63 -DRPMB_PROTOCOL=RPMB_PROTOCOL_$(STORAGE_RPMB_PROTOCOL) \ 64 65HOST_FLAGS += -DSTORAGE_NS_RECOVERY_CLEAR_ALLOWED=1 66HOST_FLAGS += -DSTORAGE_TDP_RECOVERY_CHECKPOINT_RESTORE_ALLOWED=1 67HOST_FLAGS += -DHAS_FS_TDP=1 68 69HOST_LIBS := \ 70 m 71 72HOST_DEPS := \ 73 trusty/user/base/host/boringssl 74 75include make/host_test.mk 76