summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorHarry Cutts <hcutts@chromium.org>2019-10-02 12:27:57 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-11 01:45:46 +0000
commitb9f24d30e9a379f1ab8d457e655b3e22301dd4ca (patch)
tree0791178355fe275a119cea584fefdba5fd73f094 /util
parent1092c786f7876745ec0d68dd52284d252e1abee5 (diff)
downloadchrome-ec-b9f24d30e9a379f1ab8d457e655b3e22301dd4ca.tar.gz
util: add build include for private host tools
We have provision for private host commands (see the `EC_PRIVATE_HOST_COMMAND_VALUE` macro), but no way to make a private host-side tool that can share the host command protocol implementation in util/. This CL allows a private directory to be symlinked as util/private and have its build.mk file included in the build. For an (internal-only) example of what you might put in private, see https://crrev.com/i/1914158. BRANCH=none BUG=chromium:1008568 TEST=Patch https://crrev.com/i/1914158 in the private repo (or add a util directory there with a build.mk), then from the ec directory, run `ln -s ../private/util util/private`. Run a build and verify that the private build.mk gets run. Change-Id: Ie1ad00cb454ba9ed57e4e9b24d4f5d397ca0d7a5 Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1836757 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/build.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/build.mk b/util/build.mk
index 37f01e0341..9b9f44c814 100644
--- a/util/build.mk
+++ b/util/build.mk
@@ -22,6 +22,12 @@ ifeq ($(BOARD),nocturne_fp)
build-util-bin+=ectool_servo
endif
+# If the util/ directory in the private repo is symlinked into util/private,
+# we want to build host-side tools from it, too.
+ifneq ("$(wildcard util/private/build.mk)","")
+include util/private/build.mk
+endif
+
comm-objs=$(util-lock-objs:%=lock/%) comm-host.o comm-dev.o
comm-objs+=comm-lpc.o comm-i2c.o misc_util.o