]> git.sur5r.net Git - u-boot/blobdiff - board/amcc/bamboo/Makefile
Consolidate bool type
[u-boot] / board / amcc / bamboo / Makefile
index 5654f91a83513402b92ca853e836ed08209312b9..ecdf67ac1774bd6111b2bb615ae9667f8e53ba8a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2002
+# (C) Copyright 2002-2007
 # 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
-OBJS   += flash.o
+COBJS  = $(BOARD).o flash.o
 SOBJS  = init.o
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-clean:
-       rm -f $(SOBJS) $(OBJS)
+all:   $(LIB) $(SOBJS)
 
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
+$(LIB):        $(OBJS)
+       $(call cmd_link_o_target, $^)
 
 #########################################################################
 
-.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
 
 #########################################################################