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

Archive Download this file



interactive