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
:=60ddae962bc79e7c95cfc4667245707f
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
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 \
107 define Package
/valgrind
/install
108 $(INSTALL_DIR
) $(1)/usr
/bin
109 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
110 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
112 .
/files
/default.supp \
113 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
114 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
116 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-core
*.xml \
117 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(BITS
)-linux
*.xml \
118 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
119 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
120 $(1)/usr
/lib
/valgrind
/
123 define Package
/valgrind-cachegrind
/install
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
126 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
128 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
129 $(1)/usr
/lib
/valgrind
/
132 define Package
/valgrind-callgrind
/install
133 $(INSTALL_DIR
) $(1)/usr
/bin
134 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
135 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
137 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
138 $(1)/usr
/lib
/valgrind
/
141 define Package
/valgrind-drd
/install
142 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
144 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
145 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
146 $(1)/usr
/lib
/valgrind
/
149 define Package
/valgrind-massif
/install
150 $(INSTALL_DIR
) $(1)/usr
/bin
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
152 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
154 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
155 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
156 $(1)/usr
/lib
/valgrind
/
159 define Package
/valgrind-helgrind
/install
160 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
162 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
163 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
164 $(1)/usr
/lib
/valgrind
/
167 define Package
/valgrind-vgdb
/install
168 $(INSTALL_DIR
) $(1)/usr
/bin
169 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
172 $(eval
$(call BuildPackage
,valgrind
))
173 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
174 $(eval
$(call BuildPackage
,valgrind-callgrind
))
175 $(eval
$(call BuildPackage
,valgrind-drd
))
176 $(eval
$(call BuildPackage
,valgrind-massif
))
177 $(eval
$(call BuildPackage
,valgrind-helgrind
))
178 $(eval
$(call BuildPackage
,valgrind-vgdb
))