]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/oxc/Makefile
Switch from archive libraries to partial linking
[karo-tx-uboot.git] / board / oxc / Makefile
index 8639e17dac066f277b6928de917db35f8997784c..6dc495c3619cabc3ecc9eabf3c7c696a9580379f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-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 $(OBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################