]> git.sur5r.net Git - u-boot/blobdiff - board/linkstation/Makefile
eNET: Rearrange PAR assignments
[u-boot] / board / linkstation / Makefile
index 57c84de60e16e65b7993e4a085e5fa5d6ec31b94..55674b74b2ef8b000c92acf484af1415c2f00f5e 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).o
 
 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)
+       $(call cmd_link_o_target, $(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
 
 #########################################################################