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