blob: 4acc715dcb20cb574a47a0cad989798b649da305 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
Alexei Fedorov0f305472019-10-29 14:06:54 +00002# Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +01007include lib/sprt/sprt_client.mk
8
Antonio Nino Diaz1451f612018-11-30 10:51:26 +00009CACTUS_DTB := $(BUILD_PLAT)/cactus.dtb
10
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020011CACTUS_INCLUDES := \
12 -Iinclude \
13 -Iinclude/common \
14 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020015 -Iinclude/lib \
16 -Iinclude/lib/${ARCH} \
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +010017 -Iinclude/lib/sprt \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020018 -Iinclude/lib/utils \
19 -Iinclude/lib/xlat_tables \
20 -Iinclude/runtime_services \
21 -Iinclude/runtime_services/secure_el0_payloads \
22 -Ispm/cactus \
23 -Ispm/common \
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +010024 ${SPRT_LIB_INCLUDES}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020025
26CACTUS_SOURCES := \
27 $(addprefix spm/cactus/, \
28 aarch64/cactus_entrypoint.S \
29 cactus_main.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020030 cactus_tests_memory_attributes.c \
31 cactus_tests_misc.c \
32 cactus_tests_system_setup.c \
33 ) \
34 $(addprefix spm/common/, \
35 aarch64/sp_arch_helpers.S \
36 sp_helpers.c \
37 ) \
38
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020039# TODO: Remove dependency on TFTF files.
40CACTUS_SOURCES += \
41 tftf/framework/debug.c \
42 tftf/framework/${ARCH}/asm_debug.S
43
44CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \
45 lib/${ARCH}/cache_helpers.S \
46 lib/${ARCH}/misc_helpers.S \
Sandrine Bailleux750b7cc2018-11-08 14:10:18 +010047 lib/locks/${ARCH}/spinlock.S \
48 lib/utils/mp_printf.c \
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +010049 ${SPRT_LIB_SOURCES}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020050
51CACTUS_LINKERFILE := spm/cactus/cactus.ld.S
52
53CACTUS_DEFINES :=
54
55$(eval $(call add_define,CACTUS_DEFINES,DEBUG))
Alexei Fedorov0f305472019-10-29 14:06:54 +000056$(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU))
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020057$(eval $(call add_define,CACTUS_DEFINES,ENABLE_ASSERTIONS))
58$(eval $(call add_define,CACTUS_DEFINES,LOG_LEVEL))
59$(eval $(call add_define,CACTUS_DEFINES,PLAT_${PLAT}))
60ifeq (${ARCH},aarch32)
61 $(eval $(call add_define,CACTUS_DEFINES,AARCH32))
62else
63 $(eval $(call add_define,CACTUS_DEFINES,AARCH64))
64endif
65
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000066$(CACTUS_DTB) : $(BUILD_PLAT)/cactus $(BUILD_PLAT)/cactus/cactus.elf
67$(CACTUS_DTB) : spm/cactus/cactus.dts
68 @echo " DTBGEN spm/cactus/cactus.dts"
69 ${Q}tools/generate_dtb/generate_dtb.sh \
70 cactus spm/cactus/cactus.dts $(BUILD_PLAT)
71 @echo
72 @echo "Built $@ successfully"
73 @echo
74
75cactus: $(CACTUS_DTB) $(AUTOGEN_DIR)/tests_list.h