]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
linkstation_HGLAN: Fix out of tree building.
authorWolfgang Denk <wd@denx.de>
Wed, 14 May 2008 10:21:48 +0000 (12:21 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 14 May 2008 10:21:48 +0000 (12:21 +0200)
Signed-off-by: Wolfgang Denk <wd@denx.de>
board/linkstation/Makefile

index 57c84de60e16e65b7993e4a085e5fa5d6ec31b94..8d92d8a6c7b29b23e93dd8781e92545f4ab33f7d 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).a
 
 OBJS   = $(BOARD).o ide.o hwctl.o avr.o
 
-$(LIB):        .depend $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(OBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) crv $@ $(OBJS)
 
 #########################################################################
 
-.depend:       Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################