Merge with git://www.denx.de/git/u-boot.git
[oweals/u-boot.git] / cpu / arm920t / at91rm9200 / Makefile
index 200c2cad0065263cda5599142de6f9eec01c8215..eaabad26a0cbeb2c59fa58ceb02db44b15a58898 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2005
+# (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$(SOC).a
+LIB    = $(obj)lib$(SOC).a
 
-OBJS   = ether.o i2c.o interrupts.o serial.o usb_ohci.o
+COBJS  = bcm5221.o dm9161.o ether.o i2c.o interrupts.o \
+         lxt972.o serial.o usb.o
 SOBJS  = lowlevel_init.o
 
-all:   .depend $(LIB)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS) $(SOBJS)
+all:   $(obj).depend $(LIB)
+
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(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
 
 #########################################################################