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
://sourceware.org
/pub
/valgrind
/
16 PKG_HASH
:=037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
20 PKG_CPE_ID
:=cpe
:/a
:valgrind
:valgrind
22 PKG_FIXUP
= autoreconf
24 PKG_BUILD_PARALLEL
:= 1
28 include $(INCLUDE_DIR
)/package.mk
29 include $(INCLUDE_DIR
)/kernel.mk
31 define Package
/valgrind
34 DEPENDS
:=@mips||mipsel||i386||x86_64||powerpc||arm_v7
+libpthread
+librt
35 TITLE
:=debugging and profiling tools for Linux
36 URL
:=http
://www.valgrind.org
39 define Package
/valgrind
/default
44 define Package
/valgrind-cachegrind
45 $(Package
/valgrind
/default
)
46 TITLE
+= (cache profiling
)
49 define Package
/valgrind-callgrind
50 $(Package
/valgrind
/default
)
51 TITLE
+= (callgraph profiling
)
54 define Package
/valgrind-drd
55 $(Package
/valgrind
/default
)
56 TITLE
+= (thread error detection
)
59 define Package
/valgrind-massif
60 $(Package
/valgrind
/default
)
61 TITLE
+= (heap profiling
)
64 define Package
/valgrind-helgrind
65 $(Package
/valgrind
/default
)
66 TITLE
+= (thread debugging
)
69 define Package
/valgrind-vgdb
70 $(Package
/valgrind
/default
)
71 TITLE
+= (GDB interface
)
74 define Package
/valgrind
/description
75 Valgrind is an award-winning suite of tools for debugging and
76 profiling Linux programs. With the tools that come with Valgrind
,
77 you can automatically detect many memory management and threading
78 bugs
, avoiding hours of frustrating bug-hunting
, making your
79 programs more stable. You can also perform detailed profiling
,
80 to speed up and reduce memory use of your programs.
83 CPU
:= $(patsubst x86_64
,amd64
,$(patsubst x86
,i386
,$(patsubst um
,$(ARCH
),$(LINUX_KARCH
))))
86 UNAME_R
=$(LINUX_VERSION
)
88 ifeq ($(CONFIG_ARCH_64BIT
),y
)
103 --disable-valgrindmi \
105 --disable-valgrindtk \
106 --without-included-gettext \
110 define Package
/valgrind
/install
111 $(INSTALL_DIR
) $(1)/usr
/bin
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
113 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
115 .
/files
/default.supp \
116 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
117 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
118 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-core
*.xml \
119 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-linux
*.xml \
120 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
121 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
122 $(1)/usr
/lib
/valgrind
/
124 ifneq ($(ARCH
),aarch64
)
126 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
127 $(1)/usr
/lib
/valgrind
/
131 define Package
/valgrind-cachegrind
/install
132 $(INSTALL_DIR
) $(1)/usr
/bin
133 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
134 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
136 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
137 $(1)/usr
/lib
/valgrind
/
140 define Package
/valgrind-callgrind
/install
141 $(INSTALL_DIR
) $(1)/usr
/bin
142 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
143 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
145 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
146 $(1)/usr
/lib
/valgrind
/
149 define Package
/valgrind-drd
/install
150 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
152 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
153 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
154 $(1)/usr
/lib
/valgrind
/
157 define Package
/valgrind-massif
/install
158 $(INSTALL_DIR
) $(1)/usr
/bin
159 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
160 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
162 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
163 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
164 $(1)/usr
/lib
/valgrind
/
167 define Package
/valgrind-helgrind
/install
168 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
170 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
171 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
172 $(1)/usr
/lib
/valgrind
/
175 define Package
/valgrind-vgdb
/install
176 $(INSTALL_DIR
) $(1)/usr
/bin
177 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
180 $(eval
$(call BuildPackage
,valgrind
))
181 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
182 $(eval
$(call BuildPackage
,valgrind-callgrind
))
183 $(eval
$(call BuildPackage
,valgrind-drd
))
184 $(eval
$(call BuildPackage
,valgrind-massif
))
185 $(eval
$(call BuildPackage
,valgrind-helgrind
))
186 $(eval
$(call BuildPackage
,valgrind-vgdb
))