blob: be0ab6b491d59b91ea8f6ff8691ee316759f04d3 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
2# Copyright (c) 2018, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7AUTOGEN_DIR := $(BUILD_PLAT)/autogen
8
9include lib/xlat_tables_v2/xlat_tables.mk
10include lib/compiler-rt/compiler-rt.mk
11
12TFTF_INCLUDES := \
13 -I${AUTOGEN_DIR} \
14 -Itftf/framework/include \
15 -Iinclude/common \
16 -Iinclude/common/${ARCH} \
17 -Iinclude/drivers \
18 -Iinclude/drivers/arm \
19 -Iinclude/drivers/io \
20 -Iinclude/lib \
21 -Iinclude/lib/${ARCH} \
22 -Iinclude/lib/extensions \
23 -Iinclude/lib/stdlib \
24 -Iinclude/lib/stdlib/sys \
25 -Iinclude/lib/utils \
26 -Iinclude/lib/xlat_tables \
27 -Iinclude/plat/common \
28 -Iinclude/runtime_services \
29 -Iinclude/runtime_services/secure_el0_payloads \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000030 -Iinclude/runtime_services/secure_el1_payloads \
31 -Ispm/cactus
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020032
33# Standard C library source files
34STD_LIB_SOURCES := lib/stdlib/abort.c \
35 lib/stdlib/assert.c \
36 lib/stdlib/mem.c \
37 lib/stdlib/printf.c \
38 lib/stdlib/putchar.c \
39 lib/stdlib/puts.c \
40 lib/stdlib/rand.c \
41 lib/stdlib/strchr.c \
42 lib/stdlib/strcmp.c \
43 lib/stdlib/strlen.c \
44 lib/stdlib/strncmp.c \
45 lib/stdlib/strncpy.c \
46 lib/stdlib/subr_prf.c
47
48FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
49
50FRAMEWORK_SOURCES += $(addprefix tftf/, \
51 framework/${ARCH}/arch.c \
52 framework/${ARCH}/asm_debug.S \
53 framework/${ARCH}/entrypoint.S \
54 framework/${ARCH}/exceptions.S \
55 framework/debug.c \
56 framework/main.c \
57 framework/nvm_results_helpers.c \
58 framework/report.c \
59 framework/timer/timer_framework.c \
60 tests/common/test_helpers.c \
61)
62
63FRAMEWORK_SOURCES += \
64 lib/${ARCH}/cache_helpers.S \
65 lib/${ARCH}/misc_helpers.S \
66 lib/delay/delay.c \
67 lib/events/events.c \
68 lib/extensions/amu/${ARCH}/amu.c \
69 lib/extensions/amu/${ARCH}/amu_helpers.S \
70 lib/irq/irq.c \
71 lib/locks/${ARCH}/spinlock.S \
72 lib/power_management/hotplug/hotplug.c \
73 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
74 lib/power_management/suspend/tftf_suspend.c \
75 lib/psci/psci.c \
76 lib/sdei/sdei.c \
77 lib/smc/${ARCH}/asm_smc.S \
78 lib/smc/${ARCH}/smc.c \
79 ${STD_LIB_SOURCES} \
80 lib/trusted_os/trusted_os.c \
81 lib/utils/mp_printf.c \
82 lib/utils/uuid.c \
83 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020084 plat/common/${ARCH}/platform_mp_stack.S \
85 plat/common/plat_common.c \
86 plat/common/plat_state_id.c \
87 plat/common/plat_topology.c \
88 plat/common/tftf_nvm_accessors.c
89
90
91FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
92
93TFTF_LINKERFILE := tftf/framework/tftf.ld.S
94
95
96TFTF_DEFINES :=
97
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020098# Enable dynamic translation tables
99PLAT_XLAT_TABLES_DYNAMIC := 1
100$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))