2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://valgrind.org
/downloads
/
16 PKG_HASH
:=67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
21 PKG_FIXUP
= autoreconf
23 PKG_BUILD_PARALLEL
:= 1
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/kernel.mk
30 define Package
/valgrind
33 DEPENDS
:=@mips||mipsel||i386||x86_64||powerpc||arm_v7
+libpthread
+librt
34 TITLE
:=debugging and profiling tools for Linux
35 URL
:=http
://www.valgrind.org
38 define Package
/valgrind
/default
43 define Package
/valgrind-cachegrind
44 $(Package
/valgrind
/default
)
45 TITLE
+= (cache profiling
)
48 define Package
/valgrind-callgrind
49 $(Package
/valgrind
/default
)
50 TITLE
+= (callgraph profiling
)
53 define Package
/valgrind-drd
54 $(Package
/valgrind
/default
)
55 TITLE
+= (thread error detection
)
58 define Package
/valgrind-massif
59 $(Package
/valgrind
/default
)
60 TITLE
+= (heap profiling
)
63 define Package
/valgrind-helgrind
64 $(Package
/valgrind
/default
)
65 TITLE
+= (thread debugging
)
68 define Package
/valgrind-vgdb
69 $(Package
/valgrind
/default
)
70 TITLE
+= (GDB interface
)
73 define Package
/valgrind
/description
74 Valgrind is an award-winning suite of tools for debugging and
75 profiling Linux programs. With the tools that come with Valgrind
,
76 you can automatically detect many memory management and threading
77 bugs
, avoiding hours of frustrating bug-hunting
, making your
78 programs more stable. You can also perform detailed profiling
,
79 to speed up and reduce memory use of your programs.
82 CPU
:= $(patsubst x86_64
,amd64
,$(patsubst x86
,i386
,$(patsubst um
,$(ARCH
),$(LINUX_KARCH
))))
85 UNAME_R
=$(LINUX_VERSION
)
102 --disable-valgrindmi \
104 --disable-valgrindtk \
105 --without-included-gettext \
108 define Package
/valgrind
/install
109 $(INSTALL_DIR
) $(1)/usr
/bin
110 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
111 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
113 .
/files
/default.supp \
114 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
116 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
117 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-core
*.xml \
118 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-linux
*.xml \
119 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
120 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
121 $(1)/usr
/lib
/valgrind
/
124 define Package
/valgrind-cachegrind
/install
125 $(INSTALL_DIR
) $(1)/usr
/bin
126 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
127 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
129 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
130 $(1)/usr
/lib
/valgrind
/
133 define Package
/valgrind-callgrind
/install
134 $(INSTALL_DIR
) $(1)/usr
/bin
135 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
136 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
138 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
139 $(1)/usr
/lib
/valgrind
/
142 define Package
/valgrind-drd
/install
143 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
145 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
146 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
147 $(1)/usr
/lib
/valgrind
/
150 define Package
/valgrind-massif
/install
151 $(INSTALL_DIR
) $(1)/usr
/bin
152 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
153 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
155 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
156 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
157 $(1)/usr
/lib
/valgrind
/
160 define Package
/valgrind-helgrind
/install
161 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
163 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
164 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
165 $(1)/usr
/lib
/valgrind
/
168 define Package
/valgrind-vgdb
/install
169 $(INSTALL_DIR
) $(1)/usr
/bin
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
173 $(eval
$(call BuildPackage
,valgrind
))
174 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
175 $(eval
$(call BuildPackage
,valgrind-callgrind
))
176 $(eval
$(call BuildPackage
,valgrind-drd
))
177 $(eval
$(call BuildPackage
,valgrind-massif
))
178 $(eval
$(call BuildPackage
,valgrind-helgrind
))
179 $(eval
$(call BuildPackage
,valgrind-vgdb
))