moth/packages/router/router.mk

73 lines
1.8 KiB
Makefile
Raw Normal View History

ROUTER_PKGDIR = $(TARGET)/router
ROUTER_BUILDDIR = $(BUILD)/router
2011-09-28 15:47:49 -06:00
router-source:
2011-09-22 18:32:03 -06:00
2011-09-28 15:47:49 -06:00
router-build:
2011-09-22 18:32:03 -06:00
router-install: router-build
2011-09-28 15:47:49 -06:00
$(call COPYTREE, packages/router/service, $(ROUTER_PKGDIR)/service)
2011-09-22 18:32:03 -06:00
2011-09-28 15:47:49 -06:00
router-clean:
rm -rf $(ROUTER_PKGDIR) $(ROUTER_BUILDDIR)
2011-09-22 18:32:03 -06:00
##
## 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)
2011-09-28 15:47:49 -06:00
router-source: $(ROUTER_BUILDDIR)/radvd-source
2011-09-22 18:32:03 -06:00
$(ROUTER_BUILDDIR)/radvd-source: $(RADVD_TARBALL)
mkdir -p $(ROUTER_BUILDDIR)
zcat $(RADVD_TARBALL) | (cd $(ROUTER_BUILDDIR) && tar xf -)
touch $@
2011-09-28 15:47:49 -06:00
router-build: $(ROUTER_BUILDDIR)/radvd-build
2011-09-22 18:32:03 -06:00
$(ROUTER_BUILDDIR)/radvd-build: $(ROUTER_BUILDDIR)/radvd-source
cd $(RADVD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS)
$(MAKE) -C $(RADVD_SRCDIR)
touch $@
2011-09-28 15:47:49 -06:00
router-install: radvd-install
radvd-install:
mkdir -p $(ROUTER_PKGDIR)/bin
cp $(RADVD_SRCDIR)/radvd $(ROUTER_PKGDIR)/bin/
cp $(RADVD_SRCDIR)/radvdump $(ROUTER_PKGDIR)/bin/
2011-09-22 18:32:03 -06:00
2011-09-28 15:47:49 -06:00
##
2011-10-12 10:50:09 -06:00
## ecmh
2011-09-28 15:47:49 -06:00
##
2011-10-12 10:50:09 -06:00
ECMH_CACHE = $(CACHE)/ecmh.git
ECMH_BUILDDIR = $(ROUTER_BUILDDIR)/ecmh
ECMH_URL = http://woozle.org/~neale/projects/ecmh
2011-09-28 15:47:49 -06:00
2011-10-12 10:50:09 -06:00
$(ECMH_CACHE):
git clone --bare $(ECMH_URL) $@
2011-09-28 15:47:49 -06:00
2011-10-12 10:50:09 -06:00
router-source: $(ECMH_BUILDDIR)
$(ECMH_BUILDDIR): $(ECMH_CACHE)
2011-09-28 15:47:49 -06:00
git clone $< $@
2011-10-12 10:50:09 -06:00
router-build: $(ROUTER_BUILDDIR)/ecmh-build
$(ROUTER_BUILDDIR)/ecmh-build: $(ECMH_BUILDDIR)
$(MAKE) -C $(ECMH_BUILDDIR)/src ECMH_VERSION=dbtl-git
$(MAKE) -C $(ECMH_BUILDDIR)/tools/mtrace6
2011-09-28 15:47:49 -06:00
touch $@
2011-10-12 10:50:09 -06:00
router-install: ecmh-install
ecmh-install:
2011-09-28 15:47:49 -06:00
mkdir -p $(ROUTER_PKGDIR)/bin
2011-10-12 10:50:09 -06:00
cp $(ECMH_BUILDDIR)/src/ecmh $(ROUTER_PKGDIR)/bin
cp $(ECMH_BUILDDIR)/tools/mtrace6/mtrace6 $(ROUTER_PKGDIR)/bin
PACKAGES += router