xref: /rk3399_ARM-atf/services/spd/tspd/tspd.mk (revision 6d55d109a31139c316b28b1b4b307a9f1ec0924d)
1375f538aSAchin Gupta#
2375f538aSAchin Gupta# Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
3375f538aSAchin Gupta#
4375f538aSAchin Gupta# Redistribution and use in source and binary forms, with or without
5375f538aSAchin Gupta# modification, are permitted provided that the following conditions are met:
6375f538aSAchin Gupta#
7375f538aSAchin Gupta# Redistributions of source code must retain the above copyright notice, this
8375f538aSAchin Gupta# list of conditions and the following disclaimer.
9375f538aSAchin Gupta#
10375f538aSAchin Gupta# Redistributions in binary form must reproduce the above copyright notice,
11375f538aSAchin Gupta# this list of conditions and the following disclaimer in the documentation
12375f538aSAchin Gupta# and/or other materials provided with the distribution.
13375f538aSAchin Gupta#
14375f538aSAchin Gupta# Neither the name of ARM nor the names of its contributors may be used
15375f538aSAchin Gupta# to endorse or promote products derived from this software without specific
16375f538aSAchin Gupta# prior written permission.
17375f538aSAchin Gupta#
18375f538aSAchin Gupta# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19375f538aSAchin Gupta# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20375f538aSAchin Gupta# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21375f538aSAchin Gupta# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22375f538aSAchin Gupta# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23375f538aSAchin Gupta# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24375f538aSAchin Gupta# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25375f538aSAchin Gupta# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26375f538aSAchin Gupta# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27375f538aSAchin Gupta# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28375f538aSAchin Gupta# POSSIBILITY OF SUCH DAMAGE.
29375f538aSAchin Gupta#
30375f538aSAchin Gupta
31375f538aSAchin GuptaTSPD_DIR		:=	services/spd/tspd
32375f538aSAchin GuptaSPD_INCLUDES		:=	-Iinclude/spd/tspd	\
33375f538aSAchin Gupta				-I${TSPD_DIR}
34375f538aSAchin Gupta
35*6d55d109SJon MedhurstSPD_SOURCES		:=	tspd_common.c		\
36*6d55d109SJon Medhurst				tspd_main.c		\
37*6d55d109SJon Medhurst				tspd_pm.c		\
38*6d55d109SJon Medhurst				tspd_helpers.S
39375f538aSAchin Gupta
40375f538aSAchin Guptavpath %.c ${TSPD_DIR}
41375f538aSAchin Guptavpath %.S ${TSPD_DIR}
42375f538aSAchin Gupta
43375f538aSAchin Gupta# This dispatcher is paired with a Test Secure Payload source and we intend to
44375f538aSAchin Gupta# build the Test Secure Payload along with this dispatcher.
45375f538aSAchin Gupta#
46375f538aSAchin Gupta# In cases where an associated Secure Payload lies outside this build
47375f538aSAchin Gupta# system/source tree, the the dispatcher Makefile can either invoke an external
48375f538aSAchin Gupta# build command or assume it pre-built
49375f538aSAchin Gupta
50375f538aSAchin GuptaBL32_ROOT		:=	bl32/tsp
51375f538aSAchin Gupta
52375f538aSAchin Gupta# Include SP's Makefile. The assumption is that the TSP's build system is
53375f538aSAchin Gupta# compatible with that of Trusted Firmware, and it'll add and populate necessary
54375f538aSAchin Gupta# build targets and variables
55375f538aSAchin Guptainclude ${BL32_ROOT}/tsp.mk
56375f538aSAchin Gupta
57375f538aSAchin Gupta# Let the top-level Makefile know that we intend to build the SP from source
58375f538aSAchin GuptaNEED_BL32		:=	yes
59