summaryrefslogtreecommitdiff
path: root/board/atmel/at91cap9adk/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/atmel/at91cap9adk/Makefile')
-rw-r--r--board/atmel/at91cap9adk/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile
index 359fdab..3961030 100644
--- a/board/atmel/at91cap9adk/Makefile
+++ b/board/atmel/at91cap9adk/Makefile
@@ -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)