blob: 79f34ea28219810929162b7d78496670fb3161f5 [file] [log] [blame]
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -05001#
Xinyu Zhang7c038b02021-04-20 10:27:49 +08002# Copyright (c) 2019-2021, Arm Limited. All rights reserved.
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -05003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# $(call build-platform,platform,toolchain)
8define build-platform
Leonardo Sandoval46b32092020-12-03 12:26:17 -06009 cd $(BASE_DIR)/$(tf_m) && \
10 cmake -S . -B cmake_build_$1 -DTFM_PLATFORM=$1 -DTFM_TOOLCHAIN_FILE=$2 && \
11 cmake --build cmake_build_$1 -- install
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050012endef
13
14BASE_DIR ?= .
15
Leonardo Sandoval46b32092020-12-03 12:26:17 -060016target_platforms := cypress/psoc64 \
17 mps2/an519 mps2/an521 \
18 mps3/an524 \
Xinyu Zhang7c038b02021-04-20 10:27:49 +080019 musca_b1/sse_200 musca_s1
Leonardo Sandoval46b32092020-12-03 12:26:17 -060020
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050021tf_m := trusted-firmware-m
22
Leonardo Sandoval46b32092020-12-03 12:26:17 -060023all: $(target_platforms)
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050024
Leonardo Sandoval46b32092020-12-03 12:26:17 -060025$(target_platforms): check msg
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050026 $(call build-platform,$@,toolchain_GNUARM.cmake)
27
28.phony: check
29check:
30ifndef BASE_DIR
31 echo "please provide a environment BASE_DIR"
32 exit 1
33endif
34 echo "base directory $(BASE_DIR)"
35
36.phony: msg
37msg:
38 echo "building platform"