]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/sacsng/Makefile
Merge branch 'master' of git://git.denx.de/u-boot-samsung
[karo-tx-uboot.git] / board / sacsng / Makefile
index e593f2724fdc2f6c11baba7884eeaf102f78812e..eae0f02fe703ab6ab95f7abc71b38811a7a6da87 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   := sacsng.o flash.o clkinit.o
+COBJS  := sacsng.o flash.o clkinit.o
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(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))
 
 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
 
 #########################################################################