]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/sc3/Makefile
punt unused clean/distclean targets
[karo-tx-uboot.git] / board / sc3 / Makefile
index 1b0b15fc6262ca8588536372400c0117e8e40877..2d81a5e03fbaa1eeae9773674671d9bdbc85e2f6 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).o
 
-OBJS   = $(BOARD).o sc3nand.o
+COBJS  = $(BOARD).o sc3nand.o
 SOBJS  = init.o
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $^
-
-clean:
-       rm -f $(SOBJS) $(OBJS)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
+$(LIB):        $(OBJS) $(SOBJS)
+       $(call cmd_link_o_target, $(OBJS) $(SOBJS))
 
 #########################################################################
 
-.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
 
 #########################################################################