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

index 359fdab60027d6551ecd9352c179788337ff2f2e..3961030359f5e253647030d19fcccfe70c2bae11 100644 (file)
@@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  := at91cap9adk.o led.o nand.o
+COBJS-y        += at91cap9adk.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 1277973a98a72c994421eab6ca31bf1831f77815..c72b0244bd323865675a04d4fd10474c4357f87a 100644 (file)
@@ -29,8 +29,6 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/at91_pio.h>
 
-#ifdef CONFIG_CMD_NAND
-
 #include <nand.h>
 
 /*
@@ -70,4 +68,3 @@ int board_nand_init(struct nand_chip *nand)
 
        return 0;
 }
-#endif