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.

60 lines
1.5 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.1.3
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_HASH:=dfe2197e2842fe9c9d9677bf1cb20a5a9ccfcb9a9de79f9927c39f73204ba003
  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)/package.mk
  19. define Package/iperf
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:= +libstdcpp +libpthread
  23. TITLE:=Internet Protocol bandwidth measuring tool
  24. URL:=http://sourceforge.net/projects/iperf2/
  25. endef
  26. define Package/iperf/description
  27. Iperf is a modern alternative for measuring TCP and UDP bandwidth
  28. performance, allowing the tuning of various parameters and
  29. characteristics.
  30. endef
  31. define Package/iperf/config
  32. config IPERF_ENABLE_MULTICAST
  33. depends on PACKAGE_iperf
  34. bool "Enable multicast support"
  35. endef
  36. CONFIGURE_ARGS += \
  37. $(call autoconf_bool,CONFIG_IPERF_ENABLE_MULTICAST,multicast) \
  38. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  39. TARGET_CFLAGS += -flto
  40. TARGET_CXXFLAGS += -fno-rtti -static-libstdc++ -flto -std=c++11
  41. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lpthread -lm)
  42. define Package/iperf/install
  43. $(INSTALL_DIR) $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
  45. endef
  46. $(eval $(call BuildPackage,iperf))