ble.mk 1.57 KB
Newer Older
1
2
3
4
5
# Copyright (C) 2018 Marvell International Ltd.
#
# SPDX-License-Identifier:     BSD-3-Clause
# https://spdx.org/licenses

6
7
8
MV_DDR_LIB		=	$(BUILD_PLAT)/ble/mv_ddr_lib.a
LIBC_LIB		=	$(BUILD_PLAT)/lib/libc.a
BLE_LIBS		=	$(MV_DDR_LIB) $(LIBC_LIB)
9
PLAT_MARVELL		=	plat/marvell/armada
10
11
12

BLE_SOURCES		+= 	$(BLE_PATH)/ble_main.c				\
				$(BLE_PATH)/ble_mem.S				\
13
				drivers/delay_timer/delay_timer.c		\
14
				drivers/marvell/iob.c				\
15
				$(PLAT_MARVELL)/common/aarch64/marvell_helpers.S \
16
17
				$(PLAT_MARVELL)/common/plat_delay_timer.c	\
				$(PLAT_MARVELL)/common/marvell_console.c
18

19
MV_DDR_INCLUDES		:=	-I$(CURDIR)/include				\
20
				-I$(CURDIR)/include/arch/aarch64		\
21
				-I$(CURDIR)/include/lib/libc			\
22
				-I$(CURDIR)/include/lib/libc/aarch64
23
24
25

BLE_LINKERFILE		:=	$(BLE_PATH)/ble.ld.S

26
27
BLE_OBJS := $(addprefix $(BUILD_PLAT)/ble/,$(call SOURCES_TO_OBJS,$(BLE_SOURCES)))
$(BLE_OBJS): PLAT_INCLUDES += -I$(MV_DDR_PATH)
28
$(BLE_OBJS): $(MV_DDR_LIB)
29

30
$(MV_DDR_LIB): FORCE
31
32
33
	$(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"))
	$(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"))
	$(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"))
34
	@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble