diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-10-05 15:19:53 +0000 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-10-05 15:19:53 +0000 |
commit | 05810c5e0a0c1f7a4b9fff844e8bc3dfb819a816 (patch) | |
tree | 916db2515b7eddaf35e769078eaa3124e1d60dbb /rules/iperf.make | |
parent | 5265828e7206c80e4984e71582f18f792f06169b (diff) | |
download | ptxdist-05810c5e0a0c1f7a4b9fff844e8bc3dfb819a816.tar.gz ptxdist-05810c5e0a0c1f7a4b9fff844e8bc3dfb819a816.tar.xz |
add iperf network benchmark package
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7351 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/iperf.make')
-rw-r--r-- | rules/iperf.make | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/rules/iperf.make b/rules/iperf.make new file mode 100644 index 000000000..a37ca1f53 --- /dev/null +++ b/rules/iperf.make @@ -0,0 +1,131 @@ +# -*-makefile-*- +# $Id: template 6655 2007-01-02 12:55:21Z rsc $ +# +# Copyright (C) 2007 by Sascha Hauer +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IPERF) += iperf + +# +# Paths and names +# +IPERF_VERSION := 2.0.2 +IPERF := iperf-$(IPERF_VERSION) +IPERF_SUFFIX := tar.gz +IPERF_URL := http://dast.nlanr.net/Projects/Iperf2.0/$(IPERF).$(IPERF_SUFFIX) +IPERF_SOURCE := $(SRCDIR)/$(IPERF).$(IPERF_SUFFIX) +IPERF_DIR := $(BUILDDIR)/$(IPERF) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +iperf_get: $(STATEDIR)/iperf.get + +$(STATEDIR)/iperf.get: $(iperf_get_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +$(IPERF_SOURCE): + @$(call targetinfo, $@) + @$(call get, IPERF) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +iperf_extract: $(STATEDIR)/iperf.extract + +$(STATEDIR)/iperf.extract: $(iperf_extract_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(IPERF_DIR)) + @$(call extract, IPERF) + @$(call patchin, IPERF) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +iperf_prepare: $(STATEDIR)/iperf.prepare + +IPERF_PATH := PATH=$(CROSS_PATH) +IPERF_ENV := $(CROSS_ENV) + +# +# autoconf +# +IPERF_AUTOCONF := $(CROSS_AUTOCONF_USR) + +$(STATEDIR)/iperf.prepare: $(iperf_prepare_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(IPERF_DIR)/config.cache) + cd $(IPERF_DIR) && \ + $(IPERF_PATH) $(IPERF_ENV) \ + ./configure $(IPERF_AUTOCONF) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +iperf_compile: $(STATEDIR)/iperf.compile + +$(STATEDIR)/iperf.compile: $(iperf_compile_deps_default) + @$(call targetinfo, $@) + cd $(IPERF_DIR) && $(IPERF_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +iperf_install: $(STATEDIR)/iperf.install + +$(STATEDIR)/iperf.install: $(iperf_install_deps_default) + @$(call targetinfo, $@) + @$(call install, IPERF) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +iperf_targetinstall: $(STATEDIR)/iperf.targetinstall + +$(STATEDIR)/iperf.targetinstall: $(iperf_targetinstall_deps_default) + @$(call targetinfo, $@) + + @$(call install_init, iperf) + @$(call install_fixup, iperf,PACKAGE,iperf) + @$(call install_fixup, iperf,PRIORITY,optional) + @$(call install_fixup, iperf,VERSION,$(IPERF_VERSION)) + @$(call install_fixup, iperf,SECTION,base) + @$(call install_fixup, iperf,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>") + @$(call install_fixup, iperf,DEPENDS,) + @$(call install_fixup, iperf,DESCRIPTION,missing) + + @$(call install_copy, iperf, 0, 0, 0755, $(IPERF_DIR)/src/iperf, /usr/bin/iperf) + + @$(call install_finish, iperf) + + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +iperf_clean: + rm -rf $(STATEDIR)/iperf.* + rm -rf $(IMAGEDIR)/iperf_* + rm -rf $(IPERF_DIR) + +# vim: syntax=make |