blob: 4e5dc2e6549427e73a455ffe675346e5452e9f12 [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 \
Antonio Nino Diaz09a00ef2019-01-11 13:12:58 +000015 -Iinclude \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020016 -Iinclude/common \
17 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020018 -Iinclude/lib \
19 -Iinclude/lib/${ARCH} \
20 -Iinclude/lib/extensions \
21 -Iinclude/lib/stdlib \
22 -Iinclude/lib/stdlib/sys \
23 -Iinclude/lib/utils \
24 -Iinclude/lib/xlat_tables \
25 -Iinclude/plat/common \
26 -Iinclude/runtime_services \
27 -Iinclude/runtime_services/secure_el0_payloads \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000028 -Iinclude/runtime_services/secure_el1_payloads \
Antonio Nino Diaza1497e32018-11-08 11:45:13 +000029 -Ispm/cactus \
30 -Ispm/ivy
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020031
32# Standard C library source files
33STD_LIB_SOURCES := lib/stdlib/abort.c \
34 lib/stdlib/assert.c \
35 lib/stdlib/mem.c \
36 lib/stdlib/printf.c \
37 lib/stdlib/putchar.c \
38 lib/stdlib/puts.c \
39 lib/stdlib/rand.c \
40 lib/stdlib/strchr.c \
41 lib/stdlib/strcmp.c \
42 lib/stdlib/strlen.c \
43 lib/stdlib/strncmp.c \
44 lib/stdlib/strncpy.c \
45 lib/stdlib/subr_prf.c
46
47FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
48
49FRAMEWORK_SOURCES += $(addprefix tftf/, \
50 framework/${ARCH}/arch.c \
51 framework/${ARCH}/asm_debug.S \
52 framework/${ARCH}/entrypoint.S \
53 framework/${ARCH}/exceptions.S \
54 framework/debug.c \
55 framework/main.c \
56 framework/nvm_results_helpers.c \
57 framework/report.c \
58 framework/timer/timer_framework.c \
59 tests/common/test_helpers.c \
60)
61
62FRAMEWORK_SOURCES += \
63 lib/${ARCH}/cache_helpers.S \
64 lib/${ARCH}/misc_helpers.S \
65 lib/delay/delay.c \
66 lib/events/events.c \
67 lib/extensions/amu/${ARCH}/amu.c \
68 lib/extensions/amu/${ARCH}/amu_helpers.S \
69 lib/irq/irq.c \
70 lib/locks/${ARCH}/spinlock.S \
71 lib/power_management/hotplug/hotplug.c \
72 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
73 lib/power_management/suspend/tftf_suspend.c \
74 lib/psci/psci.c \
75 lib/sdei/sdei.c \
76 lib/smc/${ARCH}/asm_smc.S \
77 lib/smc/${ARCH}/smc.c \
78 ${STD_LIB_SOURCES} \
79 lib/trusted_os/trusted_os.c \
80 lib/utils/mp_printf.c \
81 lib/utils/uuid.c \
82 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020083 plat/common/${ARCH}/platform_mp_stack.S \
84 plat/common/plat_common.c \
85 plat/common/plat_state_id.c \
86 plat/common/plat_topology.c \
87 plat/common/tftf_nvm_accessors.c
88
89
90FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
91
92TFTF_LINKERFILE := tftf/framework/tftf.ld.S
93
94
95TFTF_DEFINES :=
96
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020097# Enable dynamic translation tables
98PLAT_XLAT_TABLES_DYNAMIC := 1
99$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))