iperf: move to trunk and add myself as maintainer
[openwrt/openwrt.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.5
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/$(PKG_NAME)
17 PKG_MD5SUM:=44b5536b67719f4250faed632a3cd016
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/uclibc++.mk
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/iperf/Default
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:= $(CXX_DEPENDS)
30 TITLE:=Internet Protocol bandwidth measuring tool
31 URL:=http://sourceforge.net/projects/iperf/
32 endef
33
34 define Package/iperf/Default/description
35 Iperf is a modern alternative for measuring TCP and UDP bandwidth
36 performance, allowing the tuning of various parameters and
37 characteristics.
38 endef
39
40 define Package/iperf
41 $(call Package/iperf/Default)
42 TITLE+= (with single thread support)
43 VARIANT:=single
44 endef
45
46 define Package/iperf/description
47 $(call Package/iperf/Default/description)
48 This package is built with single thread support.
49 endef
50
51 define Package/iperf-mt
52 $(call Package/iperf/Default)
53 DEPENDS+= +libpthread
54 TITLE+= (with multithread support)
55 VARIANT:=mt
56 endef
57
58 define Package/iperf-mt/description
59 $(call Package/iperf/Default/description)
60 This package is built with multithread support.
61 endef
62
63 CONFIGURE_ARGS += --disable-multicast
64 CONFIGURE_VARS += ac_cv_func_malloc_0_nonnull=yes
65
66 ifeq ($(BUILD_VARIANT),single)
67 CONFIGURE_ARGS += --disable-threads
68 else
69 CONFIGURE_ARGS += --enable-threads=posix
70 CONFIGURE_VARS += ac_cv_func_pthread_cancel=no
71 endif
72
73 CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
74
75 ifeq ($(BUILD_VARIANT),mt)
76 CONFIGURE_VARS += LIBS="-lpthread"
77 endif
78
79 define Package/iperf/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
82 endef
83 Package/iperf-mt/install = $(Package/iperf/install)
84
85 $(eval $(call BuildPackage,iperf))
86 $(eval $(call BuildPackage,iperf-mt))