]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/eltec/bab7xx/Makefile
punt unused clean/distclean targets
[karo-tx-uboot.git] / board / eltec / bab7xx / Makefile
index 7d8ed26b529f28b567d704093aafd9ece01edaaf..9606ddc4fc6d9ff555078e508f67f56d5d6e62fe 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 pci.o misc.o el_srom.o dc_srom.o l2cache.o
+COBJS  = $(BOARD).o flash.o pci.o misc.o el_srom.o dc_srom.o l2cache.o
 
 SOBJS  = asm_init.o
 
-$(LIB):        .depend $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-clean:
-       rm -f $(SOBJS) $(OBJS)
-
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
+$(LIB):        $(obj).depend $(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
 
 #########################################################################