From 4b59746600936bfec377e19a01e5ccb90e6e1c48 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 7 Nov 2013 18:46:39 -0800 Subject: 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 BRANCH=none BUG=none TEST=./util/make_all.sh Change-Id: Ieffce7ca6f5b685ffb7d1f4626b99aff07b61443 Reviewed-on: https://chromium-review.googlesource.com/176174 Reviewed-by: Vic Yang Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- util/build.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'util/build.mk') 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 -- cgit v1.2.1