tools/env: use lib/crc32.c directly
authorAndreas Bießmann <biessmann@corscience.de>
Mon, 17 Oct 2011 22:11:12 +0000 (22:11 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 22 Nov 2011 07:49:21 +0000 (08:49 +0100)
Instead of linking the file into $(obj) tree use directly the source file.
This also prevents littered source tree if building not out-of-tree.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Makefile
tools/env/Makefile

index 7afd35b98cd7efc471b53bee2d1927a7ea6eff79..d84b3502051c9277e78a83ae46b10724c97dc391 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -790,7 +790,7 @@ clobber:    clean
        @rm -f $(obj)u-boot.ubl
        @rm -f $(obj)u-boot.dtb
        @rm -f $(obj)u-boot.sb
-       @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
+       @rm -f $(obj)tools/inca-swap-bytes
        @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
        @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
        @rm -fr $(obj)include/generated
index 2f7a59c00b959a04a8f28d64b1d5b662b26dd849..28b73da4ad66cef05c0ed8ace43a379457ce360f 100644 (file)
@@ -23,7 +23,7 @@
 
 include $(TOPDIR)/config.mk
 
-HOSTSRCS := $(obj)crc32.c  fw_env.c  fw_env_main.c
+HOSTSRCS := $(SRCTREE)/lib/crc32.c  fw_env.c  fw_env_main.c
 HEADERS        := fw_env.h
 
 # Compile for a hosted environment on the target
@@ -43,10 +43,7 @@ $(obj)fw_printenv:   $(HOSTSRCS) $(HEADERS)
        $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
 
 clean:
-       rm -f $(obj)fw_printenv $(obj)crc32.c
-
-$(obj)crc32.c:
-       ln -s $(src)../../lib/crc32.c $(obj)crc32.c
+       rm -f $(obj)fw_printenv
 
 #########################################################################