Re: [U-Boot] [PATCH/next v3 25/28] tools/Makefile: Create generic build rules

2009-04-03 Thread Wolfgang Denk
Dear Peter Tyser,

In message 1236988492-21295-26-git-send-email-pty...@xes-inc.com you wrote:
 Create a few generic build rules to replace the current method which has
 1 build target for each file
 
 Signed-off-by: Peter Tyser pty...@xes-inc.com
 ---
  tools/Makefile |   55 +--
  1 files changed, 9 insertions(+), 46 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Unibus timeout fatal trap program lost sorry  -  An  error  message
printed by DEC's RSTS operating system for the PDP-11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH/next v3 25/28] tools/Makefile: Create generic build rules

2009-03-13 Thread Peter Tyser
Create a few generic build rules to replace the current method which has
1 build target for each file

Signed-off-by: Peter Tyser pty...@xes-inc.com
---
 tools/Makefile |   55 +--
 1 files changed, 9 insertions(+), 46 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index b7a30b2..d6d366d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -38,13 +38,11 @@ TOOLSUBDIRS =
 ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
 HOST_CFLAGS = -traditional-cpp -Wall
 HOST_LDFLAGS =-multiply_defined suppress
-HOST_ENVIRO_CFLAGS =
 
 else
 ifeq ($(HOSTOS)-$(HOSTARCH),netbsd-ppc)
 HOST_CFLAGS = -Wall -pedantic
 HOST_LDFLAGS =
-HOST_ENVIRO_CFLAGS =
 
 #
 # Everyone else
@@ -52,7 +50,6 @@ HOST_ENVIRO_CFLAGS =
 else
 HOST_CFLAGS = -Wall -pedantic
 HOST_LDFLAGS =
-HOST_ENVIRO_CFLAGS =
 endif
 endif
 
@@ -128,7 +125,7 @@ endif
 
 # now $(obj) is defined
 SRCS   += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
-SRCS   += $(OBJ_FILES-y:.o=.c)
+SRCS   += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
 SRCS   += $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
 BINS   := $(addprefix $(obj),$(BIN_FILES-y))
 LIBFDT_OBJS:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
@@ -193,52 +190,21 @@ $(obj)bin2header$(SFX): $(obj)bin2header.o
$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
$(STRIP) $@
 
-$(obj)envcrc.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)ubsha1.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)crc32.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)md5.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)sha1.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)image.o:
+# image.c and mkimage.c require FIT_CFLAGS instead of standard CFLAGS
+$(obj)image.o: $(SRCTREE)/tools/image.c
$(CC) -g $(FIT_CFLAGS) -c -o $@ $
 
-$(obj)mkimage.o:
+$(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c
$(CC) -g $(FIT_CFLAGS) -c -o $@ $
 
-$(obj)ncb.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)gen_eth_addr.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)inca-swap-bytes.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)mpc86x_clk.o:
-   $(CC) -g $(CFLAGS) -c -o $@ $
-
-$(obj)fdt.o:
-   $(CC) -g $(FIT_CFLAGS) -c -o $@ $
-
-$(obj)fdt_ro.o:
-   $(CC) -g $(FIT_CFLAGS) -c -o $@ $
-
-$(obj)fdt_rw.o:
+# Some of the tool objects need to be accessed from outside the tools directory
+$(obj)%.o: $(SRCTREE)/common/%.c
$(CC) -g $(FIT_CFLAGS) -c -o $@ $
 
-$(obj)fdt_strerror.o:
-   $(CC) -g $(FIT_CFLAGS) -c -o $@ $
+$(obj)%.o: $(SRCTREE)/lib_generic/%.c
+   $(CC) -g $(CFLAGS) -c -o $@ $
 
-$(obj)fdt_wip.o:
+$(LIBFDT_OBJS):
$(CC) -g $(FIT_CFLAGS) -c -o $@ $
 
 subdirs:
@@ -255,9 +221,6 @@ else
done
 endif
 
-$(obj)env_embedded.o:
-   $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $
-
 $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP)
$(obj)./bmp_logo $(LOGO_BMP) $@
 
-- 
1.6.0.2.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot