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/MigoR/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'board/MigoR') diff --git a/board/MigoR/Makefile b/board/MigoR/Makefile index f1e2856..1f7d003 100644 --- a/board/MigoR/Makefile +++ b/board/MigoR/Makefile @@ -24,11 +24,15 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a OBJS := migo_r.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) @@ -40,9 +44,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 ######################################################################### -- cgit v1.1