Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 1 | # Copyright (C) 2018 Marvell International Ltd. |
| 2 | # |
| 3 | # SPDX-License-Identifier: BSD-3-Clause |
| 4 | # https://spdx.org/licenses |
| 5 | |
Grant Likely | 388248a | 2020-07-30 08:50:10 +0100 | [diff] [blame] | 6 | MV_DDR_LIB = $(BUILD_PLAT)/ble/mv_ddr_lib.a |
| 7 | LIBC_LIB = $(BUILD_PLAT)/lib/libc.a |
| 8 | BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB) |
Grzegorz Jaszczyk | 3039bce | 2019-11-05 13:14:59 +0100 | [diff] [blame] | 9 | PLAT_MARVELL = plat/marvell/armada |
Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 10 | |
| 11 | BLE_SOURCES += $(BLE_PATH)/ble_main.c \ |
| 12 | $(BLE_PATH)/ble_mem.S \ |
Konstantin Porotchkin | d8e3957 | 2018-11-14 17:15:08 +0200 | [diff] [blame] | 13 | drivers/delay_timer/delay_timer.c \ |
Konstantin Porotchkin | e49569d | 2020-09-29 11:37:12 +0300 | [diff] [blame] | 14 | drivers/marvell/iob.c \ |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 15 | $(PLAT_MARVELL)/common/aarch64/marvell_helpers.S \ |
Konstantin Porotchkin | d8e3957 | 2018-11-14 17:15:08 +0200 | [diff] [blame] | 16 | $(PLAT_MARVELL)/common/plat_delay_timer.c \ |
| 17 | $(PLAT_MARVELL)/common/marvell_console.c |
Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 18 | |
Pali Rohár | 7eede30 | 2021-07-10 17:05:53 +0200 | [diff] [blame] | 19 | MV_DDR_INCLUDES := -I$(CURDIR)/include \ |
Lionel Debieve | 94a552f | 2019-09-24 16:59:56 +0200 | [diff] [blame] | 20 | -I$(CURDIR)/include/arch/aarch64 \ |
Antonio Nino Diaz | 50a4d1a | 2019-02-01 12:22:22 +0000 | [diff] [blame] | 21 | -I$(CURDIR)/include/lib/libc \ |
Pali Rohár | 7eede30 | 2021-07-10 17:05:53 +0200 | [diff] [blame] | 22 | -I$(CURDIR)/include/lib/libc/aarch64 |
Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 23 | |
Chris Kay | 68d2836 | 2023-01-16 16:53:45 +0000 | [diff] [blame^] | 24 | BLE_DEFAULT_LINKER_SCRIPT_SOURCE := $(BLE_PATH)/ble.ld.S |
Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 25 | |
Pali Rohár | 7eede30 | 2021-07-10 17:05:53 +0200 | [diff] [blame] | 26 | BLE_OBJS := $(addprefix $(BUILD_PLAT)/ble/,$(call SOURCES_TO_OBJS,$(BLE_SOURCES))) |
| 27 | $(BLE_OBJS): PLAT_INCLUDES += -I$(MV_DDR_PATH) |
Pali Rohár | fe21c77 | 2021-07-10 17:15:01 +0200 | [diff] [blame] | 28 | $(BLE_OBJS): $(MV_DDR_LIB) |
Pali Rohár | 7eede30 | 2021-07-10 17:05:53 +0200 | [diff] [blame] | 29 | |
Konstantin Porotchkin | 01851db | 2018-10-03 14:21:42 +0300 | [diff] [blame] | 30 | $(MV_DDR_LIB): FORCE |
Pali Rohár | c9671c3 | 2021-10-19 16:10:29 +0200 | [diff] [blame] | 31 | # Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds |
Pali Rohár | cf44b12 | 2021-06-28 15:27:25 +0200 | [diff] [blame] | 32 | $(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ár | 7eede30 | 2021-07-10 17:05:53 +0200 | [diff] [blame] | 35 | @+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble |