diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-11-03 11:35:42 -0500 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2009-12-13 21:31:26 -0800 |
commit | 6ac59c5518e1d2e2ef1c4b8dee99267dfbdf9cdc (patch) | |
tree | f238a4a01f6612b4c7f23a460f196c4a90d41f87 /net | |
parent | 4b142febff71eabdb7ddbb125c7b583b24ddc434 (diff) | |
download | u-boot-imx-6ac59c5518e1d2e2ef1c4b8dee99267dfbdf9cdc.zip u-boot-imx-6ac59c5518e1d2e2ef1c4b8dee99267dfbdf9cdc.tar.gz u-boot-imx-6ac59c5518e1d2e2ef1c4b8dee99267dfbdf9cdc.tar.bz2 |
net: pull CONFIG checks out of source and into makefile
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 12 | ||||
-rw-r--r-- | net/bootp.c | 4 | ||||
-rw-r--r-- | net/eth.c | 7 | ||||
-rw-r--r-- | net/net.c | 4 | ||||
-rw-r--r-- | net/nfs.c | 4 | ||||
-rw-r--r-- | net/rarp.c | 4 | ||||
-rw-r--r-- | net/tftp.c | 4 |
7 files changed, 9 insertions, 30 deletions
diff --git a/net/Makefile b/net/Makefile index ff87d87..4f819dd 100644 --- a/net/Makefile +++ b/net/Makefile @@ -27,14 +27,14 @@ include $(TOPDIR)/config.mk 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) diff --git a/net/bootp.c b/net/bootp.c index 3093852..e679f8b 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -20,8 +20,6 @@ #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 */ @@ -948,5 +946,3 @@ void DhcpRequest(void) BootpRequest(); } #endif /* CONFIG_CMD_DHCP */ - -#endif /* CONFIG_CMD_NET */ @@ -26,7 +26,6 @@ #include <net.h> #include <miiphy.h> -#ifdef CONFIG_CMD_NET void eth_parse_enetaddr(const char *addr, uchar *enetaddr) { char *end; @@ -60,9 +59,8 @@ int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr) 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 @@ -492,7 +490,8 @@ char *eth_get_name (void) { 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 @@ -96,8 +96,6 @@ #include "dns.h" #endif -#if defined(CONFIG_CMD_NET) - DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_ARP_TIMEOUT @@ -1872,8 +1870,6 @@ void copy_filename (char *dst, char *src, int size) *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 @@ -29,8 +29,6 @@ #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 @@ -755,5 +753,3 @@ NfsStart (void) NfsSend (); } - -#endif @@ -29,8 +29,6 @@ #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 */ @@ -116,5 +114,3 @@ RarpRequest (void) NetSetTimeout(TIMEOUT, RarpTimeout); NetSetHandler(RarpHandler); } - -#endif @@ -10,8 +10,6 @@ #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 @@ -690,5 +688,3 @@ static void parse_multicast_oack(char *pkt, int len) } #endif /* Multicast TFTP */ - -#endif |