iperf: Upgrade to version 2.0.8
[openwrt/staging/mkresin.git] / package / network / utils / iperf / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iperf
11 PKG_VERSION:=2.0.8
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/iperf2
17 PKG_MD5SUM:=e5887f799d8dc64a974c6c2f2e5cc339
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20 PKG_LICENSE:=BSD-3-Clause
21
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/uclibc++.mk
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/iperf/Default
28 SECTION:=net
29 CATEGORY:=Network
30 DEPENDS:= $(CXX_DEPENDS)
31 TITLE:=Internet Protocol bandwidth measuring tool
32 URL:=http://sourceforge.net/projects/iperf2/
33 endef
34
35 define Package/iperf/Default/description
36 Iperf is a modern alternative for measuring TCP and UDP bandwidth
37 performance, allowing the tuning of various parameters and
38 characteristics.
39 endef
40
41 define Package/iperf
42 $(call Package/iperf/Default)
43 TITLE+= (with single thread support)
44 VARIANT:=single
45 endef
46
47 define Package/iperf/description
48 $(call Package/iperf/Default/description)
49 This package is built with single thread support.
50 endef
51
52 define Package/iperf-mt
53 $(call Package/iperf/Default)
54 DEPENDS+= +libpthread
55 TITLE+= (with multithread support)
56 VARIANT:=mt
57 endef
58
59 define Package/iperf-mt/description
60 $(call Package/iperf/Default/description)
61 This package is built with multithread support.
62 endef
63
64 TARGET_CFLAGS += -D_GNU_SOURCE
65 CONFIGURE_ARGS += --disable-multicast
66
67 ifeq ($(BUILD_VARIANT),single)
68 CONFIGURE_ARGS += --disable-threads
69 endif
70
71 CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
72
73 ifeq ($(BUILD_VARIANT),mt)
74 CONFIGURE_VARS += LIBS="-lpthread"
75 endif
76
77 define Package/iperf/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
80 endef
81 Package/iperf-mt/install = $(Package/iperf/install)
82
83 $(eval $(call BuildPackage,iperf))
84 $(eval $(call BuildPackage,iperf-mt))