diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-10-10 10:15:19 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-12 15:35:33 +0000 |
commit | 18f48be708ba048e5c27d51cac57a7737fabae84 (patch) | |
tree | 903d2a87750d87afa255a471c403f95646926961 | |
parent | c30e48fca44b98eb8a1b34b2cbfe476dc8ca1139 (diff) | |
download | chrome-ec-18f48be708ba048e5c27d51cac57a7737fabae84.tar.gz |
Makefile: Only build host-utils for BOARD=host
In EC terminology, "host" refers to the target platform on top of the
EC. It only makes sense to build the host utilities for the host board,
not the board running the EC firmware.
BRANCH=none
BUG=b:252817153
TEST=make buildall
Force-Relevant-Builds: all
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I255024c6b2fa8cababdfbed6501730d5dd6308a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3943248
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.rules | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -344,8 +344,10 @@ $(eval $(call get_sources,ro)) # # See commit bc4c1b4 for more context. build-utils := $(call objs_from_dir,$(out)/util,build-util-bin) +ifeq ($(BOARD),host) host-utils := $(call objs_from_dir,$(out)/util,host-util-bin) host-utils-cxx := $(call objs_from_dir,$(out)/util,host-util-bin-cxx) +endif build-art := $(call objs_from_dir,$(out),build-util-art) # Use the util_name with an added .c AND the special <util_name>-objs variable. build-srcs := $(foreach u,$(build-util-bin-y),$(sort $($(u)-objs:%.o=util/%.c) \ diff --git a/Makefile.rules b/Makefile.rules index 7173cc8aae..729d38205e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -307,13 +307,21 @@ hex: $(hex-y) utils-art: $(build-art) .PHONY: utils-host +ifeq ($(BOARD),host) utils-host: $(host-utils) $(host-utils-cxx) +else +utils-host: + $(error Building utils-host not supported when BOARD is not "host") +endif .PHONY: utils-build utils-build: $(build-utils) .PHONY: utils -utils: utils-host utils-build utils-art +utils: utils-build utils-art +ifeq ($(BOARD),host) +utils: utils-host +endif # On board test binaries test-targets=$(foreach t,$(test-list-y),test-$(t)) |