summaryrefslogtreecommitdiff
path: root/board/cr50/build.mk
blob: 5f5d93aa32187ac3e6aa46feb4054ecf3e81207e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- makefile -*-
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Board specific files build

CHIP:=g
CHIP_FAMILY:=cr50
CHIP_VARIANT ?= cr50_fpga

board-y=board.o
LDFLAGS_EXTRA += -L$(out)/tpm2/build -ltpm2

# Need to generate a .hex file
all: hex

ifeq ($(BOARD_MK_INCLUDED),)
BOARD_MK_INCLUDED=1

$(out)/RO/ec.RO.elf: $(out)/tpm2/build/libtpm2.a
$(out)/RW/ec.RW.elf: $(out)/tpm2/build/libtpm2.a

.PHONY: $(out)/tpm2/build/libtpm2.a
$(out)/tpm2/build/libtpm2.a:
	rsync -a ../../third_party/tpm2 $(out)
	$(MAKE) ROOTDIR=$(realpath board/$(BOARD)/tpm2) EMBEDDED_MODE=1 \
	 -C $(out)/tpm2
endif