iperf: remove bogus submenu
[openwrt/svn-archive/archive.git] / net / iperf / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=iperf
12 PKG_VERSION:=2.0.4
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=8c5bc14cc2ea55f18f22afe3c23e3dcb
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/iperf/Default
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:= +uclibcxx
25 TITLE:=Internet Protocol bandwidth measuring tool
26 URL:=http://dast.nlanr.net/Projects/Iperf/
27 endef
28
29 define Package/iperf/Default/description
30 Iperf is a modern alternative for measuring TCP and UDP bandwidth
31 performance, allowing the tuning of various parameters and
32 characteristics.
33 endef
34
35
36 define Package/iperf
37 $(call Package/iperf/Default)
38 TITLE+= (with single thread support)
39 endef
40
41 define Package/iperf/description
42 $(call Package/iperf/Default/description)
43 This package is built with single thread support.
44 endef
45
46
47 define Package/iperf-mt
48 $(call Package/iperf/Default)
49 DEPENDS+= +libpthread
50 TITLE+= (with multithread support)
51 endef
52
53 define Package/iperf-mt/description
54 $(call Package/iperf/Default/description)
55 This package is built with multithread support.
56 endef
57
58
59 define Build/Template
60
61 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
62 -$(MAKE) -C $(PKG_BUILD_DIR) clean
63 $(call Build/Configure/Default,$(3))
64 $(MAKE) -C $(PKG_BUILD_DIR)
65 ( cd $(PKG_BUILD_DIR)/src; mv -f iperf iperf-$(2) )
66 touch $$@
67
68 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
69
70 define Package/$(1)/install
71 $(INSTALL_DIR) $$(1)/usr/bin
72 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/src/iperf-$(2) $$(1)/usr/bin/iperf
73 endef
74
75 endef
76
77 CONFIGURE_ARGS += \
78 --disable-multicast \
79
80 CONFIGURE_VARS += \
81 CXX="g++-uc" \
82 CXXFLAGS="$$$$CXX_CFLAGS -fno-rtti" \
83
84
85 ifneq ($(SDK)$(CONFIG_PACKAGE_iperf),)
86 define Build/singlethread
87 $(call Build/Template,iperf,singlethread, \
88 --disable-threads \
89 )
90 endef
91 endif
92 $(eval $(Build/singlethread))
93
94 ifneq ($(SDK)$(CONFIG_PACKAGE_iperf-mt),)
95 define Build/multithread
96 $(call Build/Template,iperf-mt,multithread, \
97 --enable-threads=posix \
98 LDFLAGS="$(TARGET_LDFLAGS) -lpthread" \
99 ac_cv_func_pthread_cancel=no \
100 )
101 endef
102 endif
103 $(eval $(Build/multithread))
104
105 $(eval $(call BuildPackage,iperf))
106 $(eval $(call BuildPackage,iperf-mt))