From a30cc5a340e7f8f5f85a0e08e7f6c4106ce117c4 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 2 Jul 2008 23:38:50 +0200 Subject: Cleanup: fix out-of-tree building for some boards Signed-off-by: Wolfgang Denk --- board/r2dplus/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'board/r2dplus') diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile index 2909d46a25..5b50987c26 100644 --- a/board/r2dplus/Makefile +++ b/board/r2dplus/Makefile @@ -19,11 +19,15 @@ # include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a OBJS := r2dplus.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) @@ -33,11 +37,11 @@ clean: distclean: clean rm -f $(LIB) core *.bak .depend -################################################################# +######################################################################### -.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 -################################################################# +######################################################################### -- cgit v1.2.1