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
:=288758010b271119a0ffc0183f1d6e38
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@openwrt.org
>
20 PKG_FIXUP
= autoreconf
22 PKG_BUILD_PARALLEL
:= 1
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/kernel.mk
28 define Package
/valgrind
31 DEPENDS
:=@mips||mipsel||i386||x86_64||powerpc||arm_v7
+libpthread
+librt
32 TITLE
:=debugging and profiling tools for Linux
33 URL
:=http
://www.valgrind.org
36 define Package
/valgrind
/default
41 define Package
/valgrind-cachegrind
42 $(Package
/valgrind
/default
)
43 TITLE
+= (cache profiling
)
46 define Package
/valgrind-callgrind
47 $(Package
/valgrind
/default
)
48 TITLE
+= (callgraph profiling
)
51 define Package
/valgrind-drd
52 $(Package
/valgrind
/default
)
53 TITLE
+= (thread error detection
)
56 define Package
/valgrind-massif
57 $(Package
/valgrind
/default
)
58 TITLE
+= (heap profiling
)
61 define Package
/valgrind-helgrind
62 $(Package
/valgrind
/default
)
63 TITLE
+= (thread debugging
)
66 define Package
/valgrind-vgdb
67 $(Package
/valgrind
/default
)
68 TITLE
+= (GDB interface
)
71 define Package
/valgrind
/description
72 Valgrind is an award-winning suite of tools for debugging and
73 profiling Linux programs. With the tools that come with Valgrind
,
74 you can automatically detect many memory management and threading
75 bugs
, avoiding hours of frustrating bug-hunting
, making your
76 programs more stable. You can also perform detailed profiling
,
77 to speed up and reduce memory use of your programs.
80 CPU
:= $(patsubst x86_64
,amd64
,$(patsubst x86
,i386
,$(LINUX_KARCH
)))
83 UNAME_R
=$(LINUX_VERSION
)
98 --disable-valgrindmi \
100 --disable-valgrindtk \
101 --without-included-gettext
103 define Package
/valgrind
/install
104 $(INSTALL_DIR
) $(1)/usr
/bin
105 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
106 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
108 .
/files
/default.supp \
109 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
110 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
111 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
112 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-core
*.xml \
113 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-linux
*.xml \
114 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
116 $(1)/usr
/lib
/valgrind
/
119 define Package
/valgrind-cachegrind
/install
120 $(INSTALL_DIR
) $(1)/usr
/bin
121 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
122 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
124 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
125 $(1)/usr
/lib
/valgrind
/
128 define Package
/valgrind-callgrind
/install
129 $(INSTALL_DIR
) $(1)/usr
/bin
130 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
131 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
133 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
134 $(1)/usr
/lib
/valgrind
/
137 define Package
/valgrind-drd
/install
138 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
140 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
141 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
142 $(1)/usr
/lib
/valgrind
/
145 define Package
/valgrind-massif
/install
146 $(INSTALL_DIR
) $(1)/usr
/bin
147 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
148 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
150 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
151 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
152 $(1)/usr
/lib
/valgrind
/
155 define Package
/valgrind-helgrind
/install
156 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
158 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
159 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
160 $(1)/usr
/lib
/valgrind
/
163 define Package
/valgrind-vgdb
/install
164 $(INSTALL_DIR
) $(1)/usr
/bin
165 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
168 $(eval
$(call BuildPackage
,valgrind
))
169 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
170 $(eval
$(call BuildPackage
,valgrind-callgrind
))
171 $(eval
$(call BuildPackage
,valgrind-drd
))
172 $(eval
$(call BuildPackage
,valgrind-massif
))
173 $(eval
$(call BuildPackage
,valgrind-helgrind
))
174 $(eval
$(call BuildPackage
,valgrind-vgdb
))