[U-Boot] [PATCH 03/15] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled
Peter Tyser
ptyser at xes-inc.com
Thu Mar 5 00:32:53 CET 2009
Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
---
tools/Makefile | 107 +++++++++++++++++++++++++++++---------------------------
1 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile
index 991ad8b..09512ec 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -21,57 +21,6 @@
# MA 02111-1307 USA
#
-# Generated executable files
-BIN_FILES-y += img2srec$(SFX)
-BIN_FILES-y += mkimage$(SFX)
-BIN_FILES-y += envcrc$(SFX)
-BIN_FILES-y += ubsha1$(SFX)
-BIN_FILES-y += gen_eth_addr$(SFX)
-BIN_FILES-y += bmp_logo$(SFX)
-
-# Source files which are symlinked from elsewhere in U-Boot
-OBJ_LINKS-y += env_embedded.o
-OBJ_LINKS-y += crc32.o md5.o
-OBJ_LINKS-y += sha1.o
-OBJ_LINKS-y += image.o
-
-# Source files located in the tools directory
-OBJ_FILES-y += img2srec.o
-OBJ_FILES-y += mkimage.o
-OBJ_FILES-y += envcrc.o
-OBJ_FILES-y += ubsha1.o
-OBJ_FILES-y += gen_eth_addr.o
-OBJ_FILES-y += bmp_logo.o
-
-ifeq ($(ARCH),mips)
-BIN_FILES-y += inca-swap-bytes$(SFX)
-OBJ_FILES-y += inca-swap-bytes.o
-endif
-
-# Don't build by default
-#ifeq ($(ARCH),ppc)
-#BIN_FILES-y += mpc86x_clk$(SFX)
-#OBJ_FILES-y += mpc86x_clk.o
-#endif
-
-LIBFDT_OBJ_FILES-y += fdt.o
-LIBFDT_OBJ_FILES-y += fdt_ro.o
-LIBFDT_OBJ_FILES-y += fdt_rw.o
-LIBFDT_OBJ_FILES-y += fdt_strerror.o
-LIBFDT_OBJ_FILES-y += fdt_wip.o
-
-LOGO_H = $(OBJTREE)/include/bmp_logo.h
-
-ifeq ($(LOGO_BMP),)
-LOGO_BMP= logos/denx.bmp
-endif
-ifeq ($(VENDOR),atmel)
-LOGO_BMP= logos/atmel.bmp
-endif
-
-
-#-------------------------------------------------------------------------
-
HOSTARCH := $(shell uname -m | \
sed -e s/i.86/i386/ \
-e s/sun4u/sparc64/ \
@@ -135,6 +84,60 @@ endif
#
include $(TOPDIR)/config.mk
+# Generated executable files
+BIN_FILES-y += img2srec$(SFX)
+BIN_FILES-y += mkimage$(SFX)
+BIN_FILES-y += envcrc$(SFX)
+BIN_FILES-y += ubsha1$(SFX)
+BIN_FILES-y += gen_eth_addr$(SFX)
+BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
+BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
+
+# Source files which are symlinked from elsewhere in U-Boot
+OBJ_LINKS-y += env_embedded.o
+OBJ_LINKS-y += crc32.o md5.o
+OBJ_LINKS-y += sha1.o
+OBJ_LINKS-y += image.o
+
+# Source files located in the tools directory
+OBJ_FILES-y += img2srec.o
+OBJ_FILES-y += mkimage.o
+OBJ_FILES-y += envcrc.o
+OBJ_FILES-y += ubsha1.o
+OBJ_FILES-y += gen_eth_addr.o
+OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
+OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
+
+ifeq ($(ARCH),mips)
+BIN_FILES-y += inca-swap-bytes$(SFX)
+OBJ_FILES-y += inca-swap-bytes.o
+endif
+
+# Don't build by default
+#ifeq ($(ARCH),ppc)
+#BIN_FILES-y += mpc86x_clk$(SFX)
+#OBJ_FILES-y += mpc86x_clk.o
+#endif
+
+# Flattened device tree objects
+LIBFDT_OBJ_FILES-y += fdt.o
+LIBFDT_OBJ_FILES-y += fdt_ro.o
+LIBFDT_OBJ_FILES-y += fdt_rw.o
+LIBFDT_OBJ_FILES-y += fdt_strerror.o
+LIBFDT_OBJ_FILES-y += fdt_wip.o
+
+# Generated LCD/video logo
+LOGO_H = $(OBJTREE)/include/bmp_logo.h
+LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H)
+LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H)
+
+ifeq ($(LOGO_BMP),)
+LOGO_BMP= logos/denx.bmp
+endif
+ifeq ($(VENDOR),atmel)
+LOGO_BMP= logos/atmel.bmp
+endif
+
# now $(obj) is defined
SRCS := $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c)
BINS := $(addprefix $(obj),$(BIN_FILES-y))
@@ -157,7 +160,7 @@ CC = $(HOSTCC)
STRIP = $(HOSTSTRIP)
MAKEDEPEND = makedepend
-all: $(obj).depend $(BINS) $(LOGO_H) subdirs
+all: $(obj).depend $(BINS) $(LOGO-y) subdirs
$(obj)envcrc$(SFX): $(obj)envcrc.o $(obj)crc32.o $(obj)env_embedded.o $(obj)sha1.o
$(CC) $(CFLAGS) -o $@ $^
--
1.6.0.2.GIT
More information about the U-Boot
mailing list