Project import
diff --git a/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/Makefile b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/Makefile
new file mode 100644
index 0000000..d4fb987
--- /dev/null
+++ b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/Makefile
@@ -0,0 +1,183 @@
+#
+#    Copyright (c) 2012 Nest Labs, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#      This file is the make file for LwIP, a Lightweight IPv4-
+#      and IPv6 TCP/IP stack.
+#
+
+BuildConfigSpecialized			:= Yes
+BuildProductSpecialized 		:= Yes
+
+include pre.mak
+
+PackageRoot				:= .
+
+PackageName				:= lwip
+
+PackageSourceDir			:= $(PackageRoot)/$(PackageName)
+
+GeneratePackagePaths			= $(addprefix $(call Slashify,$(PackageSourceDir)),$(1))
+
+LicenseSourceFile			:= $(PackageSourceDir)/COPYING
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(LicenseSourceFile): source
+
+$(PackageLicenseFile): $(LicenseSourceFile)
+	$(copy-result)
+
+# We are building this package from version-controlled source, so
+# there is nothing to do for this target goal.
+
+$(PackageSourceDir):
+
+# Prepare the sources.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Configure the source for building.
+
+.PHONY: configure
+configure: source
+
+# Build the source.
+
+.PHONY: build
+build: configure
+
+.PHONY: stage stage-headers
+stage: build | $(ResultDirectory)
+stage: stage-headers
+
+lwip_API_PATHS			= src/api/api_lib.c		\
+				  src/api/api_msg.c		\
+				  src/api/err.c			\
+				  src/api/netbuf.c		\
+				  src/api/netdb.c		\
+				  src/api/netifapi.c		\
+				  src/api/sockets.c		\
+				  src/api/tcpip.c
+
+lwip_CORE_PATHS			= src/core/def.c		\
+				  src/core/dhcp.c		\
+				  src/core/dns.c		\
+				  src/core/inet_chksum.c	\
+				  src/core/init.c		\
+				  src/core/ipv4/autoip.c	\
+				  src/core/ipv4/icmp.c		\
+				  src/core/ipv4/igmp.c		\
+				  src/core/ipv4/ip4.c		\
+				  src/core/ipv4/ip4_addr.c	\
+				  src/core/ipv4/ip_frag.c	\
+				  src/core/ipv6/dhcp6.c		\
+				  src/core/ipv6/ethip6.c	\
+				  src/core/ipv6/icmp6.c		\
+				  src/core/ipv6/inet6.c		\
+				  src/core/ipv6/ip6.c		\
+				  src/core/ipv6/ip6_addr.c	\
+				  src/core/ipv6/ip6_frag.c	\
+				  src/core/ipv6/mld6.c		\
+				  src/core/ipv6/nd6.c		\
+				  src/core/mem.c		\
+				  src/core/memp.c		\
+				  src/core/netif.c		\
+				  src/core/pbuf.c		\
+				  src/core/raw.c		\
+				  src/core/stats.c		\
+				  src/core/sys.c		\
+				  src/core/tcp.c		\
+				  src/core/tcp_in.c		\
+				  src/core/tcp_out.c		\
+				  src/core/timers.c		\
+				  src/core/udp.c
+
+lwip_NETIF_PATHS		= src/netif/etharp.c
+
+lwip_SOURCE_PATHS		= $(lwip_API_PATHS) 		\
+				  $(lwip_CORE_PATHS)		\
+				  $(lwip_NETIF_PATHS)
+
+lwip_INCLUDE_DIRS		= src/include			\
+				  src/include/ipv4		\
+				  src/include/ipv6
+
+lwip_INCLUDE_PATHS		= $(call GeneratePackagePaths,$(lwip_INCLUDE_DIRS))
+
+lwip_PACKAGE_SOURCE_PATHS	= $(call GeneratePackagePaths,$(lwip_SOURCE_PATHS))
+
+# Tell make where to search for the sources, cleaning up the leading
+# ./ strictly for cosmetic display purposes in the process.
+
+VPATH				= $(subst ./,,$(dir $(lwip_PACKAGE_SOURCE_PATHS)))
+
+ifneq ($(BuildProduct),simulator)   # FIXME: Ugly hack to ensure we only copy the headers and not build LWIP for the sim
+ARCHIVES			= lwip
+endif
+
+lwip_SOURCES			= $(notdir $(lwip_PACKAGE_SOURCE_PATHS))
+
+lwip_INCLUDES			= $(lwip_INCLUDE_PATHS)		\
+				  os/$(TargetOS)		\
+				  products			\
+				  products/$(BuildProduct)
+
+-include ./products/$(BuildProduct)/lwip.mak
+
+LwIPHeaderSourcePaths		= $(wildcard $(addsuffix /*/*.h,$(lwip_INCLUDE_PATHS)))
+LwIPHeaderSourceStems		= $(subst $(PackageSourceDir)/src/include,,$(LwIPHeaderSourcePaths))
+LwIPHeaderSourcePattern		= $(call GeneratePackagePaths,src/include/%)
+LwIPHeaderResultPaths		= $(call GenerateResultPaths,,$(LwIPHeaderSourceStems))
+LwIPHeaderResultPattern		= $(call GenerateResultPaths,,%)
+
+LwIPOptionHeaderName		= lwipopts.h
+LwIPOptionHeaderStems		= $(LwIPOptionHeaderName) common/$(LwIPOptionHeaderName) $(BuildProduct)/$(LwIPOptionHeaderName)
+LwIPOptionHeaderSourceDirectory	= products
+LwIPOptionHeaderSourcePaths	= $(addprefix $(call Slashify,$(LwIPOptionHeaderSourceDirectory)),$(LwIPOptionHeaderStems))
+LwIPOptionHeaderResultDirectory = $(ResultDirectory)
+LwIPOptionHeaderResultPaths	= $(call GenerateResultPaths,,$(LwIPOptionHeaderStems))
+
+LwIPArchHeaderNames		= cc.h perf.h sys_arch.h
+LwIPArchHeaderSourcePaths	= $(addprefix os/$(TargetOS)/arch/,$(LwIPArchHeaderNames))
+LwIPArchHeaderSourceStems	= $(subst os/$(TargetOS)/,,$(LwIPArchHeaderSourcePaths))
+LwIPArchHeaderSourcePattern	= os/$(TargetOS)/%
+LwIPArchHeaderResultPaths	= $(call GenerateResultPaths,,$(LwIPArchHeaderSourceStems))
+LwIPArchHeaderResultPattern	= $(call GenerateResultPaths,,%)
+
+ResultPaths			+= $(LwIPHeaderResultPaths)		\
+				   $(LwIPOptionHeaderResultPaths)	\
+				   $(LwIPArchHeaderResultPaths)
+
+stage-headers: $(LwIPHeaderResultPaths) $(LwIPOptionHeaderResultPaths) $(LwIPArchHeaderResultPaths)
+
+$(LwIPHeaderResultPaths): $(LwIPHeaderResultPattern): $(LwIPHeaderSourcePattern)
+	$(install-result)
+
+$(LwIPOptionHeaderResultPaths): $(LwIPOptionHeaderResultDirectory)/%: $(LwIPOptionHeaderSourceDirectory)/% | $(LwIPOptionHeaderResultDirectory)
+	$(install-result)
+
+$(LwIPArchHeaderResultPaths): $(LwIPArchHeaderResultPattern): $(LwIPArchHeaderSourcePattern)
+	$(install-result)
+
+.PHONY: foo
+foo:
+	$(Echo) $(LwIPOptionHeaderResultPaths)
+
+include post.mak
diff --git a/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.tar.gz b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.tar.gz
new file mode 100644
index 0000000..e5f4c57
--- /dev/null
+++ b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.tar.gz
Binary files differ
diff --git a/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.url b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.url
new file mode 100644
index 0000000..979c7ee
--- /dev/null
+++ b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.url
@@ -0,0 +1 @@
+git://git.sv.gnu.org/lwip.git
diff --git a/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.version b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.version
new file mode 100644
index 0000000..4ea59fb
--- /dev/null
+++ b/lwip-a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df/lwip.version
@@ -0,0 +1 @@
+a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df