blob: 197b8d05c6434026704f21e98ee7e2837e81186c [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 \
Summer Qin3c2b5722021-05-26 10:43:45 +080017 arm/mps2/an519 arm/mps2/an521 \
18 arm/mps3/an524 \
Arthur She19c0e1a2021-06-02 11:06:19 -070019 arm/musca_b1/sse_200 arm/musca_s1 \
20 stm/stm32l562e_dk
Leonardo Sandoval46b32092020-12-03 12:26:17 -060021
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050022tf_m := trusted-firmware-m
23
Leonardo Sandoval46b32092020-12-03 12:26:17 -060024all: $(target_platforms)
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050025
Leonardo Sandoval46b32092020-12-03 12:26:17 -060026$(target_platforms): check msg
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -050027 $(call build-platform,$@,toolchain_GNUARM.cmake)
28
29.phony: check
30check:
31ifndef BASE_DIR
32 echo "please provide a environment BASE_DIR"
33 exit 1
34endif
35 echo "base directory $(BASE_DIR)"
36
37.phony: msg
38msg:
39 echo "building platform"