[Packages] sshfs: fix dependency (#2660)
[packages.git] / utils / valgrind / Makefile
1 #
2 # Copyright (C) 2006 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:=valgrind
12 PKG_VERSION:=3.2.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://valgrind.org/downloads/
17 PKG_MD5SUM:=978847992b136c8d8cb5c6559a91df1c
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/valgrind
25   SECTION:=utils
26   CATEGORY:=Utilities
27   DEPENDS:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml
28   TITLE:=debugging and profiling Linux programs
29   URL:=http://www.valgrind.org
30 endef
31
32 define Package/valgrind/description
33         Valgrind is an award-winning suite of tools for debugging and
34         profiling Linux programs. With the tools that come with Valgrind,
35         you can automatically detect many memory management and threading
36         bugs, avoiding hours of frustrating bug-hunting, making your
37         programs more stable. You can also perform detailed profiling,
38         to speed up and reduce memory use of your programs.
39 endef
40
41 CONFIGURE_ARGS += \
42         --disable-tls \
43         --enable-only32bit \
44         --without-x \
45         --without-uiout \
46         --disable-valgrindmi \
47         --disable-tui \
48         --disable-valgrindtk \
49         --without-included-gettext
50
51 DEFAULT_SUPP += "uclibc.supp"
52
53 define Build/Compile    
54         $(MAKE) -C $(PKG_BUILD_DIR) \
55                 DESTDIR="$(PKG_INSTALL_DIR)" \
56                 all install
57 endef
58
59 define Package/valgrind/install 
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
62         $(INSTALL_BIN) ./files/valgrind.sh $(1)/usr/bin/
63         $(INSTALL_DIR) $(1)/usr/lib/valgrind
64         $(CP) ./files/uclibc.supp $(1)/usr/lib/valgrind/
65         $(CP) $(PKG_INSTALL_DIR)/usr/lib/valgrind/*-linux $(1)/usr/lib/valgrind/
66 endef
67
68 $(eval $(call BuildPackage,valgrind))