Skip to contentSkip to conversation

linkstation_HGLAN: Fix out of tree building.

PATCH New Wolfgang Denk 1 participant 1 message May 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linkstation_HGLAN: Fix out of tree building.

---
 board/linkstation/Makefile |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
board/linkstation/Makefile +9 -6
index 57c84de..8d92d8a 100644
@@ -23,18 +23,21 @@
 
 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
 
 #########################################################################
Signature · 1 line
1.5.4.2