]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/utx8245/Makefile
Add support for a saving build objects in a separate directory.
[people/ms/u-boot.git] / board / utx8245 / Makefile
index e698afc7f9b5996e72709b633eee996c4130663c..0664d9f58b01a2f6f69b3413ee6e5e73e8ac9641 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2001
+# (C) Copyright 2001-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # (C) Copyright 2002
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).a
 
-OBJS   = $(BOARD).o flash.o
+COBJS  = $(BOARD).o flash.o
 
-SOBJS  =
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        .depend $(OBJS) $(SOBJS)
+$(LIB):        $(obj).depend $(OBJS)
        $(AR) crv $@ $(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
 
 #########################################################################