2012-08-08 08:55:09 +00:00
|
|
|
include ports/lwip.inc
|
|
|
|
|
2013-04-29 07:33:29 +00:00
|
|
|
LWIP_URL = git://git.savannah.nongnu.org/lwip.git
|
|
|
|
LWIP_REV = fe63f36656bd66b4051bdfab93e351a584337d7c
|
2013-04-29 13:35:39 +00:00
|
|
|
PATCH_URL_WINDOW_SCALING = https://savannah.nongnu.org/patch/download.php?file_id=28026
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Interface to top-level prepare Makefile
|
|
|
|
#
|
|
|
|
PORTS += $(LWIP)
|
|
|
|
|
2012-05-25 10:13:05 +00:00
|
|
|
#
|
|
|
|
# Check for tools
|
|
|
|
#
|
2013-04-29 07:33:29 +00:00
|
|
|
$(call check_tool, git)
|
|
|
|
$(call check_tool, patch)
|
2012-05-25 10:13:05 +00:00
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
prepare-lwip: $(CONTRIB_DIR)/$(LWIP) include/lwip/lwip include/lwip/netif
|
|
|
|
|
|
|
|
$(CONTRIB_DIR)/$(LWIP): clean-lwip
|
|
|
|
|
|
|
|
#
|
|
|
|
# Port-specific local rules
|
|
|
|
#
|
2013-04-29 07:33:29 +00:00
|
|
|
$(DOWNLOAD_DIR)/$(LWIP)/.git:
|
|
|
|
$(VERBOSE)git clone $(LWIP_URL) $(DOWNLOAD_DIR)/$(LWIP) && \
|
2013-04-29 13:35:39 +00:00
|
|
|
cd $(DOWNLOAD_DIR)/$(LWIP) && \
|
2013-04-29 07:33:29 +00:00
|
|
|
git reset --hard $(LWIP_REV) && \
|
2013-04-29 13:35:39 +00:00
|
|
|
wget $(PATCH_URL_WINDOW_SCALING) -O window_scaling.patch && \
|
2013-04-29 07:33:29 +00:00
|
|
|
cd ../.. && touch $@
|
|
|
|
|
2013-04-29 13:35:39 +00:00
|
|
|
|
2013-04-29 07:33:29 +00:00
|
|
|
$(CONTRIB_DIR)/$(LWIP)/.git: $(DOWNLOAD_DIR)/$(LWIP)/.git
|
|
|
|
$(VERBOSE)git clone $(DOWNLOAD_DIR)/$(LWIP) $(CONTRIB_DIR)/$(LWIP)
|
2012-08-08 08:55:09 +00:00
|
|
|
$(VERBOSE)find ./src/lib/lwip/ -name "*.patch" |\
|
2012-11-02 14:41:06 +00:00
|
|
|
xargs -ixxx sh -c "patch -p1 -r - -N -d $(CONTRIB_DIR)/$(LWIP) < xxx" || true
|
2013-04-29 13:35:39 +00:00
|
|
|
$(VERBOSE)patch -p1 -d $(CONTRIB_DIR)/$(LWIP) < $(DOWNLOAD_DIR)/$(LWIP)/window_scaling.patch
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2013-04-29 07:33:29 +00:00
|
|
|
$(CONTRIB_DIR)/$(LWIP): $(CONTRIB_DIR)/$(LWIP)/.git
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
include/lwip/lwip:
|
|
|
|
$(VERBOSE)mkdir -p $@
|
|
|
|
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/lwip/*.h)) -t $@
|
|
|
|
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/ipv4/lwip/*.h)) -t $@
|
2013-04-29 07:33:29 +00:00
|
|
|
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/ipv6/lwip/*.h)) -t $@
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
include/lwip/netif:
|
|
|
|
$(VERBOSE)mkdir -p $@
|
|
|
|
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/netif/*.h)) -t $@
|
|
|
|
|
|
|
|
clean-lwip:
|
|
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(LWIP)
|
|
|
|
$(VERBOSE)rm -rf include/lwip/lwip
|
|
|
|
$(VERBOSE)rm -rf include/lwip/netif
|