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.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
16 PKG_MD5SUM
:=8c5bc14cc2ea55f18f22afe3c23e3dcb
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/iperf
/Default
24 TITLE
:=Internet Protocol bandwidth measuring tool
25 URL
:=http
://dast.nlanr.net
/Projects
/Iperf
/
28 define Package
/iperf
/Default
/description
29 Iperf is a modern alternative for measuring TCP and UDP bandwidth
30 performance
, allowing the tuning of various parameters and
36 $(call Package
/iperf
/Default
)
37 TITLE
+= (with single thread support
)
40 define Package
/iperf
/description
41 $(call Package
/iperf
/Default
/description
)
42 This package is built with single thread support.
46 define Package
/iperf-mt
47 $(call Package
/iperf
/Default
)
49 TITLE
+= (with multithread support
)
52 define Package
/iperf-mt
/description
53 $(call Package
/iperf
/Default
/description
)
54 This package is built with multithread support.
60 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
61 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
62 $(call Build
/Configure
/Default
,$(3))
63 $(MAKE
) -C
$(PKG_BUILD_DIR
)
64 ( cd
$(PKG_BUILD_DIR
)/src
; mv
-f iperf iperf-
$(2) )
67 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
69 define Package
/$(1)/install
70 $(INSTALL_DIR
) $$(1)/usr
/bin
71 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/src
/iperf-
$(2) $$(1)/usr
/bin
/iperf
81 CXXFLAGS
="$$$$CXX_CFLAGS -fno-rtti" \
84 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf
),)
85 define Build
/singlethread
86 $(call Build
/Template
,iperf
,singlethread
, \
91 $(eval
$(Build
/singlethread
))
93 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf-mt
),)
94 define Build
/multithread
95 $(call Build
/Template
,iperf-mt
,multithread
, \
96 --enable-threads
=posix \
97 LDFLAGS
="$(TARGET_LDFLAGS) -lpthread" \
98 ac_cv_func_pthread_cancel
=no \
102 $(eval
$(Build
/multithread
))
104 $(eval
$(call BuildPackage
,iperf
))
105 $(eval
$(call BuildPackage
,iperf-mt
))