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_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
16 PKG_MD5SUM
:=44b5536b67719f4250faed632a3cd016
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/iperf
/Default
24 TITLE
:=Internet Protocol bandwidth measuring tool
25 URL
:=http
://sourceforge.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
35 $(call Package
/iperf
/Default
)
36 TITLE
+= (with single thread support
)
39 define Package
/iperf
/description
40 $(call Package
/iperf
/Default
/description
)
41 This package is built with single thread support.
44 define Package
/iperf-mt
45 $(call Package
/iperf
/Default
)
47 TITLE
+= (with multithread support
)
50 define Package
/iperf-mt
/description
51 $(call Package
/iperf
/Default
/description
)
52 This package is built with multithread support.
57 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
58 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
59 $(call Build
/Configure
/Default
,$(3))
60 $(MAKE
) -C
$(PKG_BUILD_DIR
)
61 ( cd
$(PKG_BUILD_DIR
)/src
; mv
-f iperf iperf-
$(2) )
64 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
66 define Package
/$(1)/install
67 $(INSTALL_DIR
) $$(1)/usr
/bin
68 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/src
/iperf-
$(2) $$(1)/usr
/bin
/iperf
78 CXXFLAGS
="$$$$CXX_CFLAGS -fno-rtti" \
80 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf
),)
81 define Build
/singlethread
82 $(call Build
/Template
,iperf
,singlethread
, \
87 $(eval
$(Build
/singlethread
))
89 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf-mt
),)
90 define Build
/multithread
91 $(call Build
/Template
,iperf-mt
,multithread
, \
92 --enable-threads
=posix \
93 LDFLAGS
="$(TARGET_LDFLAGS) -lpthread" \
94 ac_cv_func_pthread_cancel
=no \
98 $(eval
$(Build
/multithread
))
100 $(eval
$(call BuildPackage
,iperf
))
101 $(eval
$(call BuildPackage
,iperf-mt
))