]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/pm826/Makefile
Switch from archive libraries to partial linking
[karo-tx-uboot.git] / board / pm826 / Makefile
index 35b84288da6bc8db0799d1967a399491f5017216..12e4aa6880eed591aade2b9cfdf2d64611b3a39f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2001
+# (C) Copyright 2001-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).o
 
-OBJS   = $(BOARD).o flash.o
+COBJS  = $(BOARD).o flash.o
 
-$(LIB):        .depend $(OBJS)
-       $(AR) crv $@ $^
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(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
 
 #########################################################################