LIB = $(obj)libnet.a
-COBJS-y += bootp.o
+COBJS-$(CONFIG_CMD_NET) += 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_NET) += eth.o
+COBJS-$(CONFIG_CMD_NET) += net.o
+COBJS-$(CONFIG_CMD_NFS) += nfs.o
+COBJS-$(CONFIG_CMD_NET) += rarp.o
COBJS-$(CONFIG_CMD_SNTP) += sntp.o
-COBJS-y += tftp.o
+COBJS-$(CONFIG_CMD_NET) += tftp.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
#define BOOTP_VENDOR_MAGIC 0x63825363 /* RFC1048 Magic Cookie */
-#if defined(CONFIG_CMD_NET)
-
#define TIMEOUT 5000UL /* Milliseconds before trying BOOTP again */
#ifndef CONFIG_NET_RETRY_COUNT
# define TIMEOUT_COUNT 5 /* # of timeouts before giving up */
BootpRequest();
}
#endif /* CONFIG_CMD_DHCP */
-
-#endif /* CONFIG_CMD_NET */
#include <net.h>
#include <miiphy.h>
-#ifdef CONFIG_CMD_NET
void eth_parse_enetaddr(const char *addr, uchar *enetaddr)
{
char *end;
sprintf(enetvar, index ? "eth%daddr" : "ethaddr", index);
return eth_getenv_enetaddr(enetvar, enetaddr);
}
-#endif
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
+#ifdef CONFIG_NET_MULTI
/*
* CPU and board-specific Ethernet initializations. Aliased function
{
return (eth_current ? eth_current->name : "unknown");
}
-#elif defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI)
+
+#else /* !CONFIG_NET_MULTI */
#warning Ethernet driver is deprecated. Please update to use CONFIG_NET_MULTI
#include "dns.h"
#endif
-#if defined(CONFIG_CMD_NET)
-
DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_ARP_TIMEOUT
*dst = '\0';
}
-#endif
-
#if defined(CONFIG_CMD_NFS) || defined(CONFIG_CMD_SNTP) || defined(CONFIG_CMD_DNS)
/*
* make port a little random, but use something trivial to compute
#include "nfs.h"
#include "bootp.h"
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
-
#define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */
#define NFS_RETRY_COUNT 30
#define NFS_TIMEOUT 2000UL
NfsSend ();
}
-
-#endif
#include "rarp.h"
#include "tftp.h"
-#if defined(CONFIG_CMD_NET)
-
#define TIMEOUT 5000UL /* Milliseconds before trying BOOTP again */
#ifndef CONFIG_NET_RETRY_COUNT
# define TIMEOUT_COUNT 5 /* # of timeouts before giving up */
NetSetTimeout(TIMEOUT, RarpTimeout);
NetSetHandler(RarpHandler);
}
-
-#endif
#include "tftp.h"
#include "bootp.h"
-#if defined(CONFIG_CMD_NET)
-
#define WELL_KNOWN_PORT 69 /* Well known TFTP port # */
#define TIMEOUT 5000UL /* Millisecs to timeout for lost pkt */
#ifndef CONFIG_NET_RETRY_COUNT
}
#endif /* Multicast TFTP */
-
-#endif