]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/dbau1x00/Makefile
MIPS: Introduce --gc-sections for MIPS
[karo-tx-uboot.git] / board / dbau1x00 / Makefile
index d1cdc6b9244c1ca3257633671f85cef9cafe2da0..e36a9d204af2d6fcc71fd863d33c6f5bfbf68ecc 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003
+# (C) Copyright 2003-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
-SOBJS  = memsetup.o
+COBJS  = $(BOARD).o
+SOBJS  = lowlevel_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))
+
+$(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
 
 #########################################################################