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
:=http
://dast.nlanr.net
/Projects
/Iperf2.0
17 PKG_MD5SUM
:=bb658aba58a5af0356f5b1342dfe8f53
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/iperf
/Default
26 TITLE
:=Internet Protocol bandwidth measuring tool
27 URL
:=http
://dast.nlanr.net
/Projects
/Iperf
/
30 define Package
/iperf
/Default
/description
31 Iperf is a modern alternative for measuring TCP and UDP bandwidth
32 performance
, allowing the tuning of various parameters and
38 $(call Package
/iperf
/Default
)
39 TITLE
+= (with single thread support
)
42 define Package
/iperf
/description
43 $(call Package
/iperf
/Default
/description
)
44 This package is built with single thread support.
48 define Package
/iperf-mt
49 $(call Package
/iperf
/Default
)
51 TITLE
+= (with multithread support
)
54 define Package
/iperf-mt
/description
55 $(call Package
/iperf
/Default
/description
)
56 This package is built with multithread support.
62 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
63 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
64 $(call Build
/Configure
/Default
,$(3))
65 $(MAKE
) -C
$(PKG_BUILD_DIR
)
66 ( cd
$(PKG_BUILD_DIR
)/src
; mv
-f iperf iperf-
$(2) )
69 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
71 define Package
/$(1)/install
72 $(INSTALL_DIR
) $$(1)/usr
/bin
73 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/src
/iperf-
$(2) $$(1)/usr
/bin
/iperf
83 CXXFLAGS
="$$$$CXX_CFLAGS -fno-rtti" \
86 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf
),)
87 define Build
/singlethread
88 $(call Build
/Template
,iperf
,singlethread
, \
93 $(eval
$(Build
/singlethread
))
95 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf-mt
),)
96 define Build
/multithread
97 $(call Build
/Template
,iperf-mt
,multithread
, \
98 --enable-threads
=posix \
99 LDFLAGS
="$(TARGET_LDFLAGS) -lpthread" \
100 ac_cv_func_pthread_cancel
=no \
104 $(eval
$(Build
/multithread
))
106 $(eval
$(call BuildPackage
,iperf
))
107 $(eval
$(call BuildPackage
,iperf-mt
))