]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/pcs440ep/Makefile
punt unused clean/distclean targets
[karo-tx-uboot.git] / board / pcs440ep / Makefile
index 4a2a3888f5b47a0a711f526c19c5148b0fceab90..bf4d3e86e5c72dc2c3f662af5846e1f0c2d6a3cc 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).o
 
-OBJS   = $(BOARD).o flash.o
+COBJS  = $(BOARD).o flash.o
 SOBJS  = init.o
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS)
-
-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))
 
 #########################################################################
 
-.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
 
 #########################################################################