]> git.sur5r.net Git - u-boot/commitdiff
AT91SAM9260EK: Move CONFIG_CMD_NAND to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 31 Mar 2008 19:31:04 +0000 (21:31 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 31 Mar 2008 23:46:12 +0000 (01:46 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
board/atmel/at91sam9260ek/Makefile
board/atmel/at91sam9260ek/nand.c

index 309ea46f2a8bd38e8d0112aa8741b0c93acbd53e..8a629b9c8f8f2992d785291fd6bb423b76f6f40b 100644 (file)
@@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  := at91sam9260ek.o led.o nand.o
+COBJS-y        += at91sam9260ek.o
+COBJS-y        += led.o
+COBJS-$(CONFIG_CMD_NAND) += nand.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(obj).depend $(OBJS) $(SOBJS)
index 5131c4174c22393543a06f1c275e1fda83d93472..abb788afe7b231de52d73546f90bd15b1e4fb947 100644 (file)
@@ -29,8 +29,6 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/at91_pio.h>
 
-#ifdef CONFIG_CMD_NAND
-
 #include <nand.h>
 
 /*
@@ -76,4 +74,3 @@ int board_nand_init(struct nand_chip *nand)
 
        return 0;
 }
-#endif