summaryrefslogtreecommitdiff
path: root/board/amcc/yucca/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/amcc/yucca/Makefile')
-rw-r--r--board/amcc/yucca/Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/board/amcc/yucca/Makefile b/board/amcc/yucca/Makefile
index c85fa31..696fd40 100644
--- a/board/amcc/yucca/Makefile
+++ b/board/amcc/yucca/Makefile
@@ -23,12 +23,16 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS = $(BOARD).o flash.o cmd_yucca.o
+COBJS = $(BOARD).o flash.o cmd_yucca.o
SOBJS = init.o
-$(LIB): $(OBJS) $(SOBJS)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS)
clean:
@@ -39,9 +43,9 @@ distclean: clean
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################