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
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/iperf
/Default
26 TITLE
:=Internet Protocol bandwidth measuring tool
27 URL
:=http
://sourceforge.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
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.
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.
59 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
60 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
61 $(call Build
/Configure
/Default
,$(3))
62 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)
63 ( cd
$(PKG_BUILD_DIR
)/src
; mv
-f iperf iperf-
$(2) )
66 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
68 define Package
/$(1)/install
69 $(INSTALL_DIR
) $$(1)/usr
/bin
70 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/src
/iperf-
$(2) $$(1)/usr
/bin
/iperf
80 CXXFLAGS
="$$$$CXXFLAGS -fno-rtti" \
82 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf
),)
83 define Build
/singlethread
84 $(call Build
/Template
,iperf
,singlethread
, \
89 $(eval
$(Build
/singlethread
))
91 ifneq ($(SDK
)$(CONFIG_PACKAGE_iperf-mt
),)
92 define Build
/multithread
93 $(call Build
/Template
,iperf-mt
,multithread
, \
94 --enable-threads
=posix \
95 LDFLAGS
="$(TARGET_LDFLAGS) -lpthread" \
96 ac_cv_func_pthread_cancel
=no \
100 $(eval
$(Build
/multithread
))
102 $(eval
$(call BuildPackage
,iperf
))
103 $(eval
$(call BuildPackage
,iperf-mt
))