blob: 752ab419d2e8d3cecfa4c902d48cb63bbb91c244 [file] [log] [blame]
Konstantin Porotchkin01851db2018-10-03 14:21:42 +03001# Copyright (C) 2018 Marvell International Ltd.
2#
3# SPDX-License-Identifier: BSD-3-Clause
4# https://spdx.org/licenses
5
Grant Likely388248a2020-07-30 08:50:10 +01006MV_DDR_LIB = $(BUILD_PLAT)/ble/mv_ddr_lib.a
7LIBC_LIB = $(BUILD_PLAT)/lib/libc.a
8BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB)
Grzegorz Jaszczyk3039bce2019-11-05 13:14:59 +01009PLAT_MARVELL = plat/marvell/armada
Konstantin Porotchkin01851db2018-10-03 14:21:42 +030010
11BLE_SOURCES += $(BLE_PATH)/ble_main.c \
12 $(BLE_PATH)/ble_mem.S \
Konstantin Porotchkind8e39572018-11-14 17:15:08 +020013 drivers/delay_timer/delay_timer.c \
Konstantin Porotchkine49569d2020-09-29 11:37:12 +030014 drivers/marvell/iob.c \
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000015 $(PLAT_MARVELL)/common/aarch64/marvell_helpers.S \
Konstantin Porotchkind8e39572018-11-14 17:15:08 +020016 $(PLAT_MARVELL)/common/plat_delay_timer.c \
17 $(PLAT_MARVELL)/common/marvell_console.c
Konstantin Porotchkin01851db2018-10-03 14:21:42 +030018
Pali Rohár7eede302021-07-10 17:05:53 +020019MV_DDR_INCLUDES := -I$(CURDIR)/include \
Lionel Debieve94a552f2019-09-24 16:59:56 +020020 -I$(CURDIR)/include/arch/aarch64 \
Antonio Nino Diaz50a4d1a2019-02-01 12:22:22 +000021 -I$(CURDIR)/include/lib/libc \
Pali Rohár7eede302021-07-10 17:05:53 +020022 -I$(CURDIR)/include/lib/libc/aarch64
Konstantin Porotchkin01851db2018-10-03 14:21:42 +030023
Chris Kay68d28362023-01-16 16:53:45 +000024BLE_DEFAULT_LINKER_SCRIPT_SOURCE := $(BLE_PATH)/ble.ld.S
Konstantin Porotchkin01851db2018-10-03 14:21:42 +030025
Pali Rohár7eede302021-07-10 17:05:53 +020026BLE_OBJS := $(addprefix $(BUILD_PLAT)/ble/,$(call SOURCES_TO_OBJS,$(BLE_SOURCES)))
27$(BLE_OBJS): PLAT_INCLUDES += -I$(MV_DDR_PATH)
Pali Rohárfe21c772021-07-10 17:15:01 +020028$(BLE_OBJS): $(MV_DDR_LIB)
Pali Rohár7eede302021-07-10 17:05:53 +020029
Konstantin Porotchkin01851db2018-10-03 14:21:42 +030030$(MV_DDR_LIB): FORCE
Pali Rohárc9671c32021-10-19 16:10:29 +020031# Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds
Pali Rohárcf44b122021-06-28 15:27:25 +020032 $(if $(value MV_DDR_PATH),,$(error "Platform '$(PLAT)' for BLE requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
33 $(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
34 $(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
Pali Rohár7eede302021-07-10 17:05:53 +020035 @+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble