You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2007-2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=iperf
  9. PKG_VERSION:=2.0.13
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_HASH:=c88adec966096a81136dda91b4bd19c27aae06df4d45a7f547a8e50d723778ad
  13. PKG_SOURCE_URL:=@SF/iperf2
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_CONFIG_DEPENDS:=CONFIG_IPERF_ENABLE_MULTICAST
  18. include $(INCLUDE_DIR)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/iperf
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS:= $(CXX_DEPENDS) +libpthread
  24. TITLE:=Internet Protocol bandwidth measuring tool
  25. URL:=http://sourceforge.net/projects/iperf2/
  26. endef
  27. define Package/iperf/description
  28. Iperf is a modern alternative for measuring TCP and UDP bandwidth
  29. performance, allowing the tuning of various parameters and
  30. characteristics.
  31. endef
  32. define Package/iperf/config
  33. config IPERF_ENABLE_MULTICAST
  34. depends on PACKAGE_iperf
  35. bool "Enable multicast support"
  36. endef
  37. TARGET_CFLAGS += -D_GNU_SOURCE
  38. ifeq ($(CONFIG_IPERF_ENABLE_MULTICAST),y)
  39. CONFIGURE_ARGS += --enable-multicast
  40. else
  41. CONFIGURE_ARGS += --disable-multicast
  42. endif
  43. ifeq ($(CONFIG_IPV6),)
  44. CONFIGURE_ARGS += --disable-ipv6
  45. endif
  46. CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
  47. CONFIGURE_VARS += LIBS="-lpthread -lm"
  48. define Package/iperf/install
  49. $(INSTALL_DIR) $(1)/usr/bin
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
  51. endef
  52. $(eval $(call BuildPackage,iperf))