blob: 5fb30e9b3b778ef37d2751dddf9514a79d832f64 [file] [log] [blame]
Leonardo Sandovalc503d7e2020-08-10 15:47:11 -05001#
2# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# $(call build-platform,platform,toolchain)
8define build-platform
9 mkdir $(BASE_DIR)/$(tf_m)/cmake_build
10 cd $(BASE_DIR)/$(tf_m)/cmake_build && \
11 cmake .. -DTFM_PLATFORM=$1 -DTFM_TOOLCHAIN_FILE=../$2
12
13 cd $(BASE_DIR)/$(tf_m)/cmake_build && \
14 make install
15endef
16
17BASE_DIR ?= .
18
19# TODO: include other platforms to increase coverity coverage
20gnuarm_target_platforms := mps2/an521
21tf_m := trusted-firmware-m
22
23all: $(gnuarm_target_platforms)
24
25$(gnuarm_target_platforms): check msg
26 $(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"