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_MD5SUM
:=7c311a72a20388aceced1aa5573ce970
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@openwrt.org
>
22 PKG_LICENSE_FILES
:=COPYING
24 PKG_FIXUP
= autoreconf
26 PKG_BUILD_PARALLEL
:= 1
29 include $(INCLUDE_DIR
)/package.mk
30 include $(INCLUDE_DIR
)/kernel.mk
32 define Package
/valgrind
35 DEPENDS
:=@mips||mipsel||i386||x86_64||powerpc||arm_v7
+libpthread
+librt
36 TITLE
:=debugging and profiling tools for Linux
37 URL
:=http
://www.valgrind.org
40 define Package
/valgrind
/default
45 define Package
/valgrind-cachegrind
46 $(Package
/valgrind
/default
)
47 TITLE
+= (cache profiling
)
50 define Package
/valgrind-callgrind
51 $(Package
/valgrind
/default
)
52 TITLE
+= (callgraph profiling
)
55 define Package
/valgrind-drd
56 $(Package
/valgrind
/default
)
57 TITLE
+= (thread error detection
)
60 define Package
/valgrind-massif
61 $(Package
/valgrind
/default
)
62 TITLE
+= (heap profiling
)
65 define Package
/valgrind-helgrind
66 $(Package
/valgrind
/default
)
67 TITLE
+= (thread debugging
)
70 define Package
/valgrind-vgdb
71 $(Package
/valgrind
/default
)
72 TITLE
+= (GDB interface
)
75 define Package
/valgrind
/description
76 Valgrind is an award-winning suite of tools for debugging and
77 profiling Linux programs. With the tools that come with Valgrind
,
78 you can automatically detect many memory management and threading
79 bugs
, avoiding hours of frustrating bug-hunting
, making your
80 programs more stable. You can also perform detailed profiling
,
81 to speed up and reduce memory use of your programs.
84 CPU
:= $(patsubst x86_64
,amd64
,$(patsubst x86
,i386
,$(patsubst um
,$(ARCH
),$(LINUX_KARCH
))))
87 UNAME_R
=$(LINUX_VERSION
)
104 --disable-valgrindmi \
106 --disable-valgrindtk \
107 --without-included-gettext
109 define Package
/valgrind
/install
110 $(INSTALL_DIR
) $(1)/usr
/bin
111 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
112 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
114 .
/files
/default.supp \
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
116 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
117 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
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
/
125 define Package
/valgrind-cachegrind
/install
126 $(INSTALL_DIR
) $(1)/usr
/bin
127 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
128 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
130 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
131 $(1)/usr
/lib
/valgrind
/
134 define Package
/valgrind-callgrind
/install
135 $(INSTALL_DIR
) $(1)/usr
/bin
136 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
137 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
139 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
140 $(1)/usr
/lib
/valgrind
/
143 define Package
/valgrind-drd
/install
144 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
146 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
147 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
148 $(1)/usr
/lib
/valgrind
/
151 define Package
/valgrind-massif
/install
152 $(INSTALL_DIR
) $(1)/usr
/bin
153 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
154 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
156 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
157 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
158 $(1)/usr
/lib
/valgrind
/
161 define Package
/valgrind-helgrind
/install
162 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
164 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
165 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
166 $(1)/usr
/lib
/valgrind
/
169 define Package
/valgrind-vgdb
/install
170 $(INSTALL_DIR
) $(1)/usr
/bin
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
174 $(eval
$(call BuildPackage
,valgrind
))
175 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
176 $(eval
$(call BuildPackage
,valgrind-callgrind
))
177 $(eval
$(call BuildPackage
,valgrind-drd
))
178 $(eval
$(call BuildPackage
,valgrind-massif
))
179 $(eval
$(call BuildPackage
,valgrind-helgrind
))
180 $(eval
$(call BuildPackage
,valgrind-vgdb
))