common: Add .u_boot_list into all linker files
[oweals/u-boot.git] / board / amcc / canyonlands / Makefile
index 2aeead60f915d20a98bb36d20e2a079a546ace33..d2c9dd49b679fe63d496cae6d69214b9f5424732 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).o
 
-COBJS  := $(BOARD).o
-COBJS  += bootstrap.o
+COBJS-y        := $(BOARD).o
+COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
 SOBJS  := init.o
 
+COBJS   := $(COBJS-y)
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+all:   $(LIB) $(SOBJS)
 
-clean:
-       rm -f $(SOBJS) $(OBJS)
-
-distclean:     clean
-       rm -f $(LIB) core *.bak $(obj).depend
+$(LIB):        $(OBJS)
+       $(call cmd_link_o_target, $^)
 
 #########################################################################