]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/sorcery/Makefile
Merge branch 'master' of git://git.denx.de/u-boot-samsung
[karo-tx-uboot.git] / board / sorcery / Makefile
index 3d6d673792a11735b3bd8fd378bcde2662290f09..ec5cf530300797b68aa9be10147260cb94324398 100644 (file)
@@ -1,4 +1,5 @@
-# (C) Copyright 2005
+#
+# (C) Copyright 2005-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
+
+COBJS  := $(BOARD).o
 
-OBJS   := $(BOARD).o
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS)
+$(LIB):        $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 clean:
        rm -f $(SOBJS) $(OBJS)
 
 distclean:     clean
-       rm -f $(LIB) core *.bak .depend
+       rm -f $(LIB) core *.bak $(obj).depend
 
 #########################################################################
 
-.depend:       Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-               $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
--include .depend
+sinclude $(obj).depend
 
 #########################################################################