summaryrefslogtreecommitdiff
path: root/util/build.mk
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2013-11-07 18:46:39 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-14 17:52:39 +0000
commit4b59746600936bfec377e19a01e5ccb90e6e1c48 (patch)
tree00c7d22cbfbef1580153a9f3d835141bb29181cb /util/build.mk
parentd44932402ad99bfaeba3e3a6641e84595401df39 (diff)
downloadchrome-ec-4b59746600936bfec377e19a01e5ccb90e6e1c48.tar.gz
util: declare all host utils source dependencies in build.mk
Instead of hardcoding the common files for host utils in the generic rules, let's declare them in the build.mk file using the same system as the Linux kernel build. if a binary "foo" declared in "host-util-bin" or "build-util-bin" has a matching "foo-objs" variable, it will be build from all objects declared in "foo-objs" else it uses directly "foo.o" (single source file). This is preparatory to add new "build" tools sharing common sources. note: the dependencies on the utils are a bit less fine-grained as a result of this change, but given the low number of tools, that should be acceptable. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=./util/make_all.sh Change-Id: Ieffce7ca6f5b685ffb7d1f4626b99aff07b61443 Reviewed-on: https://chromium-review.googlesource.com/176174 Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util/build.mk')
-rw-r--r--util/build.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/util/build.mk b/util/build.mk
index e9922b4f24..29beb3ef75 100644
--- a/util/build.mk
+++ b/util/build.mk
@@ -7,10 +7,15 @@
#
host-util-bin=ectool lbplay burn_my_ec
-host-util-common=ectool_keyscan comm-host comm-dev misc_util ec_flash
+
+comm-objs=$(util-lock-objs:%=lock/%) comm-host.o comm-dev.o
ifeq ($(CONFIG_LPC),y)
-host-util-common+=comm-lpc
+comm-objs+=comm-lpc.o
else
-host-util-common+=comm-i2c
+comm-objs+=comm-i2c.o
endif
+ectool-objs=ectool.o ectool_keyscan.o misc_util.o ec_flash.o $(comm-objs)
+lbplay-objs=lbplay.o $(comm-objs)
+burn_my_ec-objs=ec_flash.o $(comm-objs) misc_util.o
+
build-util-bin=ec_uartd stm32mon iteflash