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
>
21 PKG_FIXUP
= autoreconf
23 PKG_BUILD_PARALLEL
:= 1
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/kernel.mk
29 define Package
/valgrind
32 DEPENDS
:=@mips||mipsel||i386||x86_64||powerpc||arm_v7
+libpthread
+librt
33 TITLE
:=debugging and profiling tools for Linux
34 URL
:=http
://www.valgrind.org
37 define Package
/valgrind
/default
42 define Package
/valgrind-cachegrind
43 $(Package
/valgrind
/default
)
44 TITLE
+= (cache profiling
)
47 define Package
/valgrind-callgrind
48 $(Package
/valgrind
/default
)
49 TITLE
+= (callgraph profiling
)
52 define Package
/valgrind-drd
53 $(Package
/valgrind
/default
)
54 TITLE
+= (thread error detection
)
57 define Package
/valgrind-massif
58 $(Package
/valgrind
/default
)
59 TITLE
+= (heap profiling
)
62 define Package
/valgrind-helgrind
63 $(Package
/valgrind
/default
)
64 TITLE
+= (thread debugging
)
67 define Package
/valgrind-vgdb
68 $(Package
/valgrind
/default
)
69 TITLE
+= (GDB interface
)
72 define Package
/valgrind
/description
73 Valgrind is an award-winning suite of tools for debugging and
74 profiling Linux programs. With the tools that come with Valgrind
,
75 you can automatically detect many memory management and threading
76 bugs
, avoiding hours of frustrating bug-hunting
, making your
77 programs more stable. You can also perform detailed profiling
,
78 to speed up and reduce memory use of your programs.
81 CPU
:= $(patsubst x86_64
,amd64
,$(patsubst x86
,i386
,$(patsubst um
,$(ARCH
),$(LINUX_KARCH
))))
84 UNAME_R
=$(LINUX_VERSION
)
101 --disable-valgrindmi \
103 --disable-valgrindtk \
104 --without-included-gettext
106 define Package
/valgrind
/install
107 $(INSTALL_DIR
) $(1)/usr
/bin
108 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
109 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
111 .
/files
/default.supp \
112 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
113 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
114 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-core
*.xml \
116 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-linux
*.xml \
117 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
118 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
119 $(1)/usr
/lib
/valgrind
/
122 define Package
/valgrind-cachegrind
/install
123 $(INSTALL_DIR
) $(1)/usr
/bin
124 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
125 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
127 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
128 $(1)/usr
/lib
/valgrind
/
131 define Package
/valgrind-callgrind
/install
132 $(INSTALL_DIR
) $(1)/usr
/bin
133 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
134 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
136 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
137 $(1)/usr
/lib
/valgrind
/
140 define Package
/valgrind-drd
/install
141 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
143 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
144 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
145 $(1)/usr
/lib
/valgrind
/
148 define Package
/valgrind-massif
/install
149 $(INSTALL_DIR
) $(1)/usr
/bin
150 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
151 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
153 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
154 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
155 $(1)/usr
/lib
/valgrind
/
158 define Package
/valgrind-helgrind
/install
159 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
161 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
162 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
163 $(1)/usr
/lib
/valgrind
/
166 define Package
/valgrind-vgdb
/install
167 $(INSTALL_DIR
) $(1)/usr
/bin
168 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
171 $(eval
$(call BuildPackage
,valgrind
))
172 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
173 $(eval
$(call BuildPackage
,valgrind-callgrind
))
174 $(eval
$(call BuildPackage
,valgrind-drd
))
175 $(eval
$(call BuildPackage
,valgrind-massif
))
176 $(eval
$(call BuildPackage
,valgrind-helgrind
))
177 $(eval
$(call BuildPackage
,valgrind-vgdb
))