2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
17 PKG_MD5SUM
:=8c5bc14cc2ea55f18f22afe3c23e3dcb
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/iperf
/Default
25 TITLE
:=Internet Protocol bandwidth measuring tool
26 URL
:=http
://dast.nlanr.net
/Projects
/Iperf
/
29 define Package
/iperf
/Default
/description
30 Iperf is a modern alternative for measuring TCP and UDP bandwidth
31 performance
, allowing the tuning of various parameters and
37 $(call Package
/iperf
/Default
)
38 TITLE
+= (with single thread support
)
41 define Package
/iperf
/description
42 $(call Package
/iperf
/Default
/description
)
43 This package is built with single thread support.
47 define Package
/iperf-mt
48 $(call Package
/iperf
/Default
)
50 TITLE
+= (with multithread support
)
53 define Package
/iperf-mt
/description
54 $(call Package
/iperf
/Default
/description
)
55 This package is built with multithread support.
61 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
62 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
63 $(call Build
/Configure
/Default
,$(3))
64 $(MAKE
) -C
$(PKG_BUILD_DIR
)
65 ( cd
$(PKG_BUILD_DIR
)/src
; mv
-f iperf iperf-
$(2) )
68 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
70 define Package
/$(1)/install
71 $(INSTALL_DIR
) $$(1)/usr
/bin
72 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/src
/iperf-
$(2) $$(1)/usr
/bin
/iperf
82 CXXFLAGS
="$$$$CXX_CFLAGS -fno-rtti" \
85 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf
),)
86 define Build
/singlethread
87 $(call Build
/Template
,iperf
,singlethread
, \
92 $(eval
$(Build
/singlethread
))
94 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf-mt
),)
95 define Build
/multithread
96 $(call Build
/Template
,iperf-mt
,multithread
, \
97 --enable-threads
=posix \
98 LDFLAGS
="$(TARGET_LDFLAGS) -lpthread" \
99 ac_cv_func_pthread_cancel
=no \
103 $(eval
$(Build
/multithread
))
105 $(eval
$(call BuildPackage
,iperf
))
106 $(eval
$(call BuildPackage
,iperf-mt
))