From 76babc86576f092573599334c85ec543fdbc6015 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 9 Mar 2008 02:07:49 +0100 Subject: [PATCH] m501sk: Fix out of tree building Signed-off-by: Wolfgang Denk --- board/m501sk/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/board/m501sk/Makefile b/board/m501sk/Makefile index da7987bb32..b403095f16 100644 --- a/board/m501sk/Makefile +++ b/board/m501sk/Makefile @@ -23,12 +23,16 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := m501sk.o eeprom.o +COBJS := m501sk.o eeprom.o SOBJS := memsetup.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) $(AR) crv $@ $(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 ######################################################################### -- 2.25.1