2006-10-30 13:51:50 +00:00
|
|
|
#
|
2007-09-26 15:52:56 +00:00
|
|
|
# Copyright (C) 2007 OpenWrt.org
|
2006-08-03 07:51:57 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=iperf
|
|
|
|
PKG_VERSION:=2.0.2
|
2007-10-02 14:02:38 +00:00
|
|
|
PKG_RELEASE:=2
|
2006-08-03 07:51:57 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2006-10-30 13:51:50 +00:00
|
|
|
PKG_SOURCE_URL:=http://dast.nlanr.net/Projects/Iperf2.0
|
|
|
|
PKG_MD5SUM:=bb658aba58a5af0356f5b1342dfe8f53
|
2006-08-03 07:51:57 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2007-09-26 15:52:56 +00:00
|
|
|
define Package/iperf/Default
|
|
|
|
SUBMENU:=Monitoring
|
2006-08-03 07:51:57 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2007-09-26 15:52:56 +00:00
|
|
|
DEPENDS:= +uclibcxx
|
2006-08-03 07:51:57 +00:00
|
|
|
TITLE:=Internet Protocol bandwidth measuring tool
|
2007-09-26 15:52:56 +00:00
|
|
|
URL:=http://dast.nlanr.net/Projects/Iperf/
|
2006-08-03 07:51:57 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-26 15:52:56 +00:00
|
|
|
define Package/iperf/Default/description
|
2007-09-03 15:58:55 +00:00
|
|
|
Iperf is a modern alternative for measuring TCP and UDP bandwidth
|
|
|
|
performance, allowing the tuning of various parameters and
|
|
|
|
characteristics.
|
2006-08-03 07:51:57 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-26 15:52:56 +00:00
|
|
|
|
|
|
|
define Package/iperf
|
|
|
|
$(call Package/iperf/Default)
|
|
|
|
TITLE+= (with single thread support)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iperf/description
|
|
|
|
$(call Package/iperf/Default/description)
|
|
|
|
This package is built with single thread support.
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Package/iperf-mt
|
|
|
|
$(call Package/iperf/Default)
|
|
|
|
DEPENDS+= +libpthread
|
|
|
|
TITLE+= (with multithread support)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iperf-mt/description
|
|
|
|
$(call Package/iperf/Default/description)
|
|
|
|
This package is built with multithread support.
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Build/Template
|
|
|
|
|
|
|
|
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
|
|
|
|
-$(MAKE) -C $(PKG_BUILD_DIR) clean
|
|
|
|
$(call Build/Configure/Default,$(3))
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
|
|
|
( cd $(PKG_BUILD_DIR)/src; mv -f iperf iperf-$(2) )
|
|
|
|
touch $$@
|
|
|
|
|
|
|
|
$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
|
|
|
|
|
|
|
|
define Package/$(1)/install
|
|
|
|
$(INSTALL_DIR) $$(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $$(PKG_BUILD_DIR)/src/iperf-$(2) $$(1)/usr/bin/iperf
|
|
|
|
endef
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2007-09-03 15:58:55 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-multicast \
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
2007-09-26 15:52:56 +00:00
|
|
|
CXX="g++-uc" \
|
|
|
|
CXXFLAGS="$$$$CXX_CFLAGS -fno-rtti" \
|
2007-09-03 15:58:55 +00:00
|
|
|
|
2006-08-03 07:51:57 +00:00
|
|
|
|
2007-09-26 15:52:56 +00:00
|
|
|
ifneq ($(SDK)$(CONFIG_PACKAGE_iperf),)
|
|
|
|
define Build/singlethread
|
|
|
|
$(call Build/Template,iperf,singlethread, \
|
|
|
|
--disable-threads \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
$(eval $(Build/singlethread))
|
|
|
|
|
|
|
|
ifneq ($(SDK)$(CONFIG_PACKAGE_iperf-mt),)
|
|
|
|
define Build/multithread
|
|
|
|
$(call Build/Template,iperf-mt,multithread, \
|
|
|
|
--enable-threads=posix \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) -lpthread" \
|
|
|
|
ac_cv_func_pthread_cancel=no \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
$(eval $(Build/multithread))
|
2006-08-03 07:51:57 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,iperf))
|
2007-09-26 15:52:56 +00:00
|
|
|
$(eval $(call BuildPackage,iperf-mt))
|