Merge pull request #20784 from pprindeville/acpica-update-20230331
[feed/packages.git] / net / iperf / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iperf
11 PKG_VERSION:=2.1.8
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_HASH:=8e2cf2fbc9d0d4d1cf9d109b1e328459f9622993dc9a4c5a7dc8a2088fb7beaf
16 PKG_SOURCE_URL:=@SF/iperf2
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19 PKG_LICENSE:=BSD-3-Clause
20
21 PKG_BUILD_PARALLEL:=1
22 PKG_BUILD_FLAGS:=lto
23
24 PKG_CONFIG_DEPENDS:=CONFIG_IPERF_ENABLE_MULTICAST
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/iperf
29 SECTION:=net
30 CATEGORY:=Network
31 DEPENDS:= +libstdcpp +libpthread
32 TITLE:=Internet Protocol bandwidth measuring tool
33 URL:=http://sourceforge.net/projects/iperf2/
34 endef
35
36 define Package/iperf/description
37 Iperf is a modern alternative for measuring TCP and UDP bandwidth
38 performance, allowing the tuning of various parameters and
39 characteristics.
40 endef
41
42 define Package/iperf/config
43 config IPERF_ENABLE_MULTICAST
44 depends on PACKAGE_iperf
45 bool "Enable multicast support"
46 endef
47
48 CONFIGURE_ARGS += \
49 --enable-fastsampling \
50 $(call autoconf_bool,CONFIG_IPERF_ENABLE_MULTICAST,multicast) \
51 $(call autoconf_bool,CONFIG_IPV6,ipv6)
52
53 TARGET_CXXFLAGS += -fno-rtti -static-libstdc++ -std=c++11
54 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lpthread -lm)
55
56 define Package/iperf/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
59 endef
60
61 $(eval $(call BuildPackage,iperf))