]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/Makefile
Merge branch 'master' of git://git.denx.de/u-boot-sparc
[karo-tx-uboot.git] / net / Makefile
index b899d7b2f2a112c35b75525f3e860bd3e8e9a711..ff87d87e413256adc27440486e563c0d3a03a1de 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
 
 include $(TOPDIR)/config.mk
 
-# CFLAGS += -DET_DEBUG -DDEBUG
+# CFLAGS += -DDEBUG
 
-LIB    = libnet.a
+LIB    = $(obj)libnet.a
+
+COBJS-y += bootp.o
+COBJS-$(CONFIG_CMD_DNS)  += dns.o
+COBJS-y += eth.o
+COBJS-y += net.o
+COBJS-y += nfs.o
+COBJS-y += rarp.o
+COBJS-$(CONFIG_CMD_SNTP) += sntp.o
+COBJS-y += tftp.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
 
-OBJS   = net.o tftp.o bootp.o rarp.o eth.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
 
 #########################################################################