From db5b339cca2f7b7824372f02932c3d7c24a34ed3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 3 Mar 2014 11:06:19 +0900 Subject: kbuild: add "cross_tools" target to build tools for the target Programs in tools/ directory are usually built for the host. But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are useful on the target OS too. Actually, prior to Kbuild, U-Boot could build tools for the target like follows: $ make _config $ export CROSS_COMPILE= $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools In Kbuild, we can no longer replace HOSTCC at the command line. In order to get back that feature, this commit adds "cross-tools" target. Usage: Build tools for the host $ make CROSS_COMPILE= tools Build tools for the target $ make CROSS_COMPILE= cross_tools Besides, "make cross_tools" strip tools programs because we generally expect smaller storages on embedded systems. Signed-off-by: Masahiro Yamada Reported-by: Heiko Schocher Cc: Wolfgang Denk Cc: Tom Rini Tested-by: Heiko Schocher Acked-by: Heiko Schocher --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e165bea..36de8d4 100644 --- a/Makefile +++ b/Makefile @@ -1155,6 +1155,9 @@ env: scripts_basic tools-all: export HOST_TOOLS_ALL=y tools-all: env tools ; +cross_tools: export CROSS_BUILD_TOOLS=y +cross_tools: tools ; + .PHONY : CHANGELOG CHANGELOG: git log --no-merges U-Boot-1_1_5.. | \ -- cgit v1.1