[package] valgrind: update to 3.8.0
[openwrt/svn-archive/archive.git] / utils / valgrind / Makefile
1 #
2 # Copyright (C) 2006-2012 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:=valgrind
11 PKG_VERSION:=3.8.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://valgrind.org/downloads/
16 PKG_MD5SUM:=ec04dfd1256307432b2a7b520398c526
17
18 PKG_FIXUP = autoreconf
19 PKG_INSTALL := 1
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/kernel.mk
23
24 define Package/valgrind
25 SECTION:=utils
26 CATEGORY:=Utilities
27 DEPENDS:=@mips||mipsel||i386||powerpc||TARGET_omap4 +libpthread +librt
28 TITLE:=debugging and profiling tools for Linux
29 URL:=http://www.valgrind.org
30 endef
31
32 define Package/valgrind/default
33 $(Package/valgrind)
34 DEPENDS := valgrind
35 endef
36
37 define Package/valgrind-cachegrind
38 $(Package/valgrind/default)
39 TITLE += (cache profiling)
40 endef
41
42 define Package/valgrind-callgrind
43 $(Package/valgrind/default)
44 TITLE += (callgraph profiling)
45 endef
46
47 define Package/valgrind-drd
48 $(Package/valgrind/default)
49 TITLE += (thread error detection)
50 endef
51
52 define Package/valgrind-massif
53 $(Package/valgrind/default)
54 TITLE += (heap profiling)
55 endef
56
57 define Package/valgrind-helgrind
58 $(Package/valgrind/default)
59 TITLE += (thread debugging)
60 endef
61
62 define Package/valgrind-vgdb
63 $(Package/valgrind/default)
64 TITLE += (GDB interface)
65 endef
66
67 define Package/valgrind/description
68 Valgrind is an award-winning suite of tools for debugging and
69 profiling Linux programs. With the tools that come with Valgrind,
70 you can automatically detect many memory management and threading
71 bugs, avoiding hours of frustrating bug-hunting, making your
72 programs more stable. You can also perform detailed profiling,
73 to speed up and reduce memory use of your programs.
74 endef
75
76 CPU := $(patsubst x86,i386,$(LINUX_KARCH))
77
78 CONFIGURE_VARS += \
79 UNAME_R=$(LINUX_VERSION)
80
81 CONFIGURE_ARGS += \
82 --enable-only32bit \
83 --enable-tls \
84 --without-x \
85 --without-uiout \
86 --disable-valgrindmi \
87 --disable-tui \
88 --disable-valgrindtk \
89 --without-included-gettext
90
91 define Package/valgrind/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/valgrind* $(1)/usr/bin/
94 $(INSTALL_DIR) $(1)/usr/lib/valgrind
95 $(CP) \
96 ./files/default.supp \
97 $(PKG_INSTALL_DIR)/usr/lib/valgrind/none-* \
98 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_core*.so \
99 $(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \
100 $(PKG_INSTALL_DIR)/usr/lib/valgrind/32bit-core*.xml \
101 $(PKG_INSTALL_DIR)/usr/lib/valgrind/32bit-linux*.xml \
102 $(PKG_INSTALL_DIR)/usr/lib/valgrind/memcheck-* \
103 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_memcheck*.so \
104 $(1)/usr/lib/valgrind/
105 endef
106
107 define Package/valgrind-cachegrind/install
108 $(INSTALL_DIR) $(1)/usr/bin
109 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cg_* $(1)/usr/bin/
110 $(INSTALL_DIR) $(1)/usr/lib/valgrind
111 $(CP) \
112 $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
113 $(1)/usr/lib/valgrind/
114 endef
115
116 define Package/valgrind-callgrind/install
117 $(INSTALL_DIR) $(1)/usr/bin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/callgrind* $(1)/usr/bin/
119 $(INSTALL_DIR) $(1)/usr/lib/valgrind
120 $(CP) \
121 $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
122 $(1)/usr/lib/valgrind/
123 endef
124
125 define Package/valgrind-drd/install
126 $(INSTALL_DIR) $(1)/usr/lib/valgrind
127 $(CP) \
128 $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
129 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
130 $(1)/usr/lib/valgrind/
131 endef
132
133 define Package/valgrind-massif/install
134 $(INSTALL_DIR) $(1)/usr/bin
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ms_print $(1)/usr/bin/
136 $(INSTALL_DIR) $(1)/usr/lib/valgrind
137 $(CP) \
138 $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
139 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
140 $(1)/usr/lib/valgrind/
141 endef
142
143 define Package/valgrind-helgrind/install
144 $(INSTALL_DIR) $(1)/usr/lib/valgrind
145 $(CP) \
146 $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
147 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
148 $(1)/usr/lib/valgrind/
149 endef
150
151 define Package/valgrind-vgdb/install
152 $(INSTALL_DIR) $(1)/usr/bin
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
154 endef
155
156 $(eval $(call BuildPackage,valgrind))
157 $(eval $(call BuildPackage,valgrind-cachegrind))
158 $(eval $(call BuildPackage,valgrind-callgrind))
159 $(eval $(call BuildPackage,valgrind-drd))
160 $(eval $(call BuildPackage,valgrind-massif))
161 $(eval $(call BuildPackage,valgrind-helgrind))
162 $(eval $(call BuildPackage,valgrind-vgdb))