diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-09-17 15:32:06 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-19 13:52:39 -0700 |
commit | b205b3e1a30625c230551778b9d1d716536ad1ff (patch) | |
tree | cc767be5281e1d18014d451a871ff89d1572ff47 | |
parent | e24cca580ef0b83ff86cbf9273653a821b6f8f14 (diff) | |
download | chrome-ec-b205b3e1a30625c230551778b9d1d716536ad1ff.tar.gz |
cleanup: Cr50: remove duplicated compiler args
The board-specific build.mk is included twice (by design). This
change moves the "+=" terms inside the guard so that the variables
are only extended on the second pass.
BUG=none
BRANCH=none
TEST=make buildall V=1
By inspection, notice that CFLAGS and dirs-y don't have duplicate
terms anymore.
Change-Id: I4a5d05df5a7f9516d7379a627bee034bcb396582
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/300655
Commit-Ready: Bill Richardson <wfrichar@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | board/cr50/build.mk | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/board/cr50/build.mk b/board/cr50/build.mk index df839b473d..0b3f80c96d 100644 --- a/board/cr50/build.mk +++ b/board/cr50/build.mk @@ -3,22 +3,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # -# Board specific files build +# Board-specific build requirements +# Define the SoC used by this board CHIP:=g CHIP_FAMILY:=cr50 CHIP_VARIANT ?= cr50_fpga -board-y=board.o - -# The simulator components have their own subdirectory -CFLAGS += -I$(realpath $(BDIR)/tpm2) -dirs-y += $(BDIR)/tpm2 -board-y += tpm2/NVMem.o - -# Need to generate a .hex file -all: hex - # This file is included twice by the Makefile, once to determine the CHIP info # and then again after defining all the CONFIG_ and HAS_TASK variables. We use # a guard so that recipe definitions and variable extensions only happen the @@ -27,11 +18,23 @@ ifeq ($(BOARD_MK_INCLUDED_ONCE),) BOARD_MK_INCLUDED_ONCE=1 else +# Need to generate a .hex file +all: hex + +# The simulator components have their own subdirectory +CFLAGS += -I$(realpath $(BDIR)/tpm2) +dirs-y += $(BDIR)/tpm2 + +# Objects that we need to build +board-y = board.o +board-y += tpm2/NVMem.o + # Build and link with an external library EXTLIB := $(realpath ../../third_party/tpm2) CFLAGS += -I$(EXTLIB) LDFLAGS_EXTRA += -L$(out)/tpm2 -ltpm2 +# Add dependencies on that library $(out)/RO/ec.RO.elf: $(out)/tpm2/libtpm2.a $(out)/RW/ec.RW.elf: $(out)/tpm2/libtpm2.a |