summaryrefslogtreecommitdiff
path: root/board/gcplus/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/gcplus/Makefile')
-rw-r--r--board/gcplus/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/board/gcplus/Makefile b/board/gcplus/Makefile
index 1954d66..695cd93 100644
--- a/board/gcplus/Makefile
+++ b/board/gcplus/Makefile
@@ -1,5 +1,5 @@
#
-# (C) Copyright 2000
+# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# 2003 (c) MontaVista Software, Inc.
@@ -25,12 +25,16 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := gcplus.o flash.o
+COBJS := gcplus.o flash.o
SOBJS := lowlevel_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) $(SOBJS)
clean:
@@ -41,9 +45,9 @@ distclean: clean
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
--include .depend
+sinclude $(obj).depend
#########################################################################