2 # Copyright (C) 2007-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
17 PKG_MD5SUM
:=44b5536b67719f4250faed632a3cd016
19 PKG_MAINTAINER
:=Felix Fietkau
<nbd@openwrt.org
>
22 PKG_CHECK_FORMAT_SECURITY
:=0
24 include $(INCLUDE_DIR
)/uclibc
++.mk
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/iperf
/Default
30 DEPENDS
:= $(CXX_DEPENDS
)
31 TITLE
:=Internet Protocol bandwidth measuring tool
32 URL
:=http
://sourceforge.net
/projects
/iperf
/
35 define Package
/iperf
/Default
/description
36 Iperf is a modern alternative for measuring TCP and UDP bandwidth
37 performance
, allowing the tuning of various parameters and
42 $(call Package
/iperf
/Default
)
43 TITLE
+= (with single thread support
)
47 define Package
/iperf
/description
48 $(call Package
/iperf
/Default
/description
)
49 This package is built with single thread support.
52 define Package
/iperf-mt
53 $(call Package
/iperf
/Default
)
55 TITLE
+= (with multithread support
)
59 define Package
/iperf-mt
/description
60 $(call Package
/iperf
/Default
/description
)
61 This package is built with multithread support.
64 CONFIGURE_ARGS
+= --disable-multicast
65 CONFIGURE_VARS
+= ac_cv_func_malloc_0_nonnull
=yes
67 ifeq ($(BUILD_VARIANT
),single
)
68 CONFIGURE_ARGS
+= --disable-threads
70 CONFIGURE_ARGS
+= --enable-threads
=posix
71 CONFIGURE_VARS
+= ac_cv_func_pthread_cancel
=no
74 CONFIGURE_VARS
+= CXXFLAGS
="$$$$CXXFLAGS -fno-rtti"
76 ifeq ($(BUILD_VARIANT
),mt
)
77 CONFIGURE_VARS
+= LIBS
="-lpthread"
80 define Package
/iperf
/install
81 $(INSTALL_DIR
) $(1)/usr
/bin
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/iperf
$(1)/usr
/bin
/iperf
84 Package
/iperf-mt
/install = $(Package
/iperf
/install)
86 $(eval
$(call BuildPackage
,iperf
))
87 $(eval
$(call BuildPackage
,iperf-mt
))