1#
2# Copyright (c) 2022, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7ifneq (${ARCH},aarch64)
8        $(error "Error: SPMC is only supported on aarch64.")
9endif
10
11SPMC_SOURCES	:=	$(addprefix services/std_svc/spm/el3_spmc/,	\
12			spmc_main.c				\
13			spmc_setup.c				\
14			logical_sp.c				\
15			spmc_pm.c				\
16			spmc_shared_mem.c)
17
18# Specify platform specific logical partition implementation.
19SPMC_LP_SOURCES  := $(addprefix ${PLAT_DIR}/, \
20                    ${PLAT}_el3_spmc_logical_sp.c)
21
22
23ifneq ($(wildcard $(SPMC_LP_SOURCES)),)
24SPMC_SOURCES += $(SPMC_LP_SOURCES)
25endif
26
27# Let the top-level Makefile know that we intend to include a BL32 image
28NEED_BL32		:=	yes
29
30ifndef BL32
31# The SPMC is paired with a Test Secure Payload source and we intend to
32# build the Test Secure Payload if no other image has been provided
33# for BL32.
34#
35# In cases where an associated Secure Payload lies outside this build
36# system/source tree, the dispatcher Makefile can either invoke an external
37# build command or assume it is pre-built.
38
39BL32_ROOT		:=	bl32/tsp
40
41# Conditionally include SP's Makefile. The assumption is that the TSP's build
42# system is compatible with that of Trusted Firmware, and it'll add and populate
43# necessary build targets and variables.
44
45include ${BL32_ROOT}/tsp.mk
46endif
47