moth/packages/router/router.mk

45 lines
1.0 KiB
Makefile
Raw Normal View History

ROUTER_PKGDIR = $(TARGET)/router
ROUTER_BUILDDIR = $(BUILD)/router
2011-09-22 18:32:03 -06:00
2011-09-22 18:41:28 -06:00
router-source: $(ROUTER_BUILDDIR)/radvd-source
2011-09-22 18:32:03 -06:00
2011-09-22 18:41:28 -06:00
router-build: $(ROUTER_BUILDDIR)/radvd-build
2011-09-22 18:32:03 -06:00
router-install: router-build
mkdir -p $(ROUTER_PKGDIR)/bin
cp $(RADVD_SRCDIR)/radvd $(ROUTER_PKGDIR)/bin/
cp $(RADVD_SRCDIR)/radvdump $(ROUTER_PKGDIR)/bin/
$(call COPYTREE, packages/router/service, $(ROUTER_PKGDIR)/service)
##
## radvd
##
RADVD_VERSION = 1.8.1
RADVD_TARBALL = $(CACHE)/radvd-$(RADVD_VERSION).tar.gz
RADVD_URL = http://www.litech.org/radvd/dist/radvd-$(RADVD_VERSION).tar.gz
RADVD_SRCDIR = $(ROUTER_BUILDDIR)/radvd-$(RADVD_VERSION)
$(RADVD_TARBALL):
@ mkdir -p $(@D)
wget -O $@ $(RADVD_URL)
$(ROUTER_BUILDDIR)/radvd-source: $(RADVD_TARBALL)
mkdir -p $(ROUTER_BUILDDIR)
zcat $(RADVD_TARBALL) | (cd $(ROUTER_BUILDDIR) && tar xf -)
touch $@
$(ROUTER_BUILDDIR)/radvd-build: $(ROUTER_BUILDDIR)/radvd-source
cd $(RADVD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS)
$(MAKE) -C $(RADVD_SRCDIR)
touch $@
router-clean:
rm -rf $(ROUTER_PKGDIR)
PACKAGES += router