• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
22include $(STORAGE_DIR)/common.mk
23
24HOST_SRCS := \
25	$(STORAGE_COMMON_SRCS) \
26	$(STORAGE_COMMON_TIPC_SRCS) \
27	$(STORAGE_DIR)/rpmb_dev/rpmb_dev.c \
28	$(STORAGE_DIR)/rpmb.c \
29	$(LOCAL_DIR)/library_shims.c \
30	$(LOCAL_DIR)/storage_host_test.c \
31	$(LOCAL_DIR)/storageproxy_shim.c \
32	$(COMMON_DIR)/error_reporting_mock.c \
33
34HOST_INCLUDE_DIRS += \
35	$(LOCAL_DIR) \
36	$(STORAGE_DIR) \
37	$(COMMON_DIR) \
38	trusty/kernel/lib/libc-ext/include \
39	trusty/user/base/interface/storage/include \
40
41# block_device_tipc.h requires hwkey and system_state for declarations even
42# though we aren't linking against it.
43HOST_INCLUDE_DIRS += \
44	trusty/user/base/interface/hwkey/include \
45	trusty/user/base/interface/system_state/include \
46	trusty/user/base/lib/hwkey/include \
47	trusty/user/base/lib/system_state/include \
48	trusty/user/base/lib/tipc/include \
49
50# Turn on FULL_ASSERTs
51HOST_FLAGS := -DBUILD_STORAGE_TEST=1
52
53STORAGE_RPMB_PROTOCOL ?= MMC
54HOST_FLAGS += \
55	-DRPMB_PROTOCOL=RPMB_PROTOCOL_$(STORAGE_RPMB_PROTOCOL) \
56
57HOST_FLAGS += -DSTORAGE_NS_RECOVERY_CLEAR_ALLOWED=1
58HOST_FLAGS += -DSTORAGE_TDP_RECOVERY_CHECKPOINT_RESTORE_ALLOWED=1
59HOST_FLAGS += -DHAS_FS_TDP=1
60
61HOST_LIBS := \
62	m \
63	c++ \
64
65HOST_DEPS := \
66	trusty/user/base/host/boringssl \
67	trusty/user/base/host/unittest \
68
69undefine STORAGE_COMMON_SRCS
70undefine STORAGE_COMMON_TIPC_SRCS
71
72include make/host_test.mk
73