Blackfin: move ALL += u-boot.ldr to blackfin_config.mk
authorMike Frysinger <vapier@gentoo.org>
Mon, 15 Jun 2009 04:25:19 +0000 (00:25 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 15 Jun 2009 17:30:27 +0000 (13:30 -0400)
The way the ALL variable is used allows for config.mk's to add more
targets themselves without having to clutter up the top level Makefile.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Makefile
blackfin_config.mk

index acec1a0..bcc81c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -306,10 +306,8 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
 #########################################################################
 #########################################################################
 
+# Always append ALL so that arch config.mk's can add custom ones
 ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
-ifeq ($(ARCH),blackfin)
-ALL += $(obj)u-boot.ldr
-endif
 
 all:           $(ALL)
 
index 989e976..821f082 100644 (file)
@@ -36,6 +36,10 @@ ifneq (,$(CONFIG_BFIN_CPU))
 PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU)
 endif
 
+ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
+ALL += $(obj)u-boot.ldr
+endif
+
 SYM_PREFIX = _
 
 LDR_FLAGS-y :=
@@ -43,14 +47,12 @@ LDR_FLAGS-$(CONFIG_BFIN_BOOTROM_USES_EVT1) += -J
 
 LDR_FLAGS += --bmode $(subst BFIN_BOOT_,,$(CONFIG_BFIN_BOOT_MODE))
 LDR_FLAGS += --use-vmas
-ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
 LDR_FLAGS += --initcode $(obj)cpu/$(CPU)/initcode.o
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_UART)
 ifneq ($(ENV_IS_EMBEDDED_CUSTOM),ENV_IS_EMBEDDED_CUSTOM)
 LDR_FLAGS += --punchit $$(($(CONFIG_ENV_OFFSET))):$$(($(CONFIG_ENV_SIZE))):$(obj)env-ldr.o
 endif
 endif
-endif
 ifneq (,$(findstring s,$(MAKEFLAGS)))
 LDR_FLAGS += --quiet
 endif