• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 Huawei Technologies Co., Ltd.
2# Licensed under the Mulan PSL v2.
3# You can use this software according to the terms and conditions of the Mulan PSL v2.
4# You may obtain a copy of Mulan PSL v2 at:
5#     http://license.coscl.org.cn/MulanPSL2
6# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
7# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
8# PURPOSE.
9# See the Mulan PSL v2 for more details.
10
11# Targets
12MODULE := libteeos${TARG}.a
13
14# This library only provides 32-bit headers of libbteeos.
15# If we want 64-bit headers of libteeos, we should depend on libac temporarily.
16
17CPPFLAGS += -I$(TEELIB)/libdrv/include
18CPPFLAGS += -I$(TEELIB)/libswcrypto_engine/include
19CPPFLAGS += -I$(TEELIB)/libcrypto_hal/include
20CPPFLAGS += -I$(TEELIB)/libagent_base/include # tee_secfile_load_agent.h
21CPPFLAGS += -I$(TEELIB)/libteeconfig/include # root_status_ops.h
22CPPFLAGS += -I$(TEELIB)/libteeconfig/include/kernel/
23CPPFLAGS += -I$(TEELIB)/libteeconfig/include/TEE_ext/
24CPPFLAGS += -I$(TEELIB)/libtimer/include
25CPPFLAGS += -I$(TEELIB)/libtee_shared/include # oemkey.h
26CPPFLAGS += -I$(DRIVERS_PATH)/include
27CPPFLAGS += -I$(TEELIB)/libteeagentcommon_client/include
28CPPFLAGS += -I$(PREBUILD_HEADER)/sys
29CPPFLAGS += -I$(TEELIB)/libteeos/include
30CPPFLAGS += -I$(TEELIB)/libteeos/include/tee
31CPPFLAGS += -I$(TEELIB)/libteeos/include/legacy
32CPPFLAGS += -I$(TEELIB)/libteeos/src/tee
33CPPFLAGS += -I$(TEELIB)/libteemem/include
34CPPFLAGS += -I$(TEELIB)/libssa/src
35CPPFLAGS += -I$(TEELIB)/libssa/include
36CPPFLAGS += -I$(TEELIB)/libhuk/include
37CPPFLAGS += -I$(TEELIB)/libipc_hal/include
38
39# Source files required to build the target
40ASMFILES := $(wildcard src/*.S)
41ifeq (${TARG}, _a32)
42ASMFILES += $(wildcard src/*/*.S)
43ASMFILES += $(wildcard src/*/arm/*.S)
44endif
45
46CFILES   := $(wildcard src/*.c)
47CFILES   += $(wildcard src/*/*.c)
48
49ifneq ($(CONFIG_PRIVATE_OEMKEY_SUPPORT),y)
50CFILES := $(filter-out src/tee_private_api.c, $(CFILES))
51endif
52
53# fixup for TEE, check "trustedcore/trustedcore_plats.mk"
54CFLAGS +=	-DARM_PAE=1 \
55		-D__ARM_ARCH__=7
56CFLAGS +=	-DTARGET_PRODUCT_VAL=\"$(TARGET_BOARD_PLATFORM)\"
57
58include $(BUILD_LIB)/lib-common.mk
59