]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/Makefile
Merge commit 'wd/master'
[karo-tx-uboot.git] / net / Makefile
index 7a704898c2111ef2380f1ceac02d593c079f0a8b..0eee330cfe3f01cdb89031bdf22f01d646c7cb03 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,19 +25,30 @@ include $(TOPDIR)/config.mk
 
 # CFLAGS += -DET_DEBUG -DDEBUG
 
-LIB    = libnet.a
+LIB    = $(obj)libnet.a
+
+COBJS-y += net.o
+COBJS-y += tftp.o
+COBJS-y += bootp.o
+COBJS-y += rarp.o
+COBJS-y += eth.o
+COBJS-y += nfs.o
+COBJS-y += sntp.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
 
-OBJS   = net.o tftp.o bootp.o rarp.o eth.o nfs.o sntp.o
 all:   $(LIB)
 
-$(LIB):        $(START) $(OBJS)
-       $(AR) crv $@ $(OBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
 
-.depend:       Makefile $(OBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################