From: Wolfgang Denk Date: Sun, 9 Mar 2008 01:07:49 +0000 (+0100) Subject: m501sk: Fix out of tree building X-Git-Tag: v1.3.2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=76babc86576f092573599334c85ec543fdbc6015;p=oweals%2Fu-boot.git m501sk: Fix out of tree building Signed-off-by: Wolfgang Denk --- 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 #########################################################################