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
24 include $(INCLUDE_DIR
)/package.mk
25 include $(INCLUDE_DIR
)/kernel.mk
27 define Package
/valgrind
30 DEPENDS
:=@mips||mipsel||i386||powerpc||arm_v7
+libpthread
+librt
31 TITLE
:=debugging and profiling tools for Linux
32 URL
:=http
://www.valgrind.org
35 define Package
/valgrind
/default
40 define Package
/valgrind-cachegrind
41 $(Package
/valgrind
/default
)
42 TITLE
+= (cache profiling
)
45 define Package
/valgrind-callgrind
46 $(Package
/valgrind
/default
)
47 TITLE
+= (callgraph profiling
)
50 define Package
/valgrind-drd
51 $(Package
/valgrind
/default
)
52 TITLE
+= (thread error detection
)
55 define Package
/valgrind-massif
56 $(Package
/valgrind
/default
)
57 TITLE
+= (heap profiling
)
60 define Package
/valgrind-helgrind
61 $(Package
/valgrind
/default
)
62 TITLE
+= (thread debugging
)
65 define Package
/valgrind-vgdb
66 $(Package
/valgrind
/default
)
67 TITLE
+= (GDB interface
)
70 define Package
/valgrind
/description
71 Valgrind is an award-winning suite of tools for debugging and
72 profiling Linux programs. With the tools that come with Valgrind
,
73 you can automatically detect many memory management and threading
74 bugs
, avoiding hours of frustrating bug-hunting
, making your
75 programs more stable. You can also perform detailed profiling
,
76 to speed up and reduce memory use of your programs.
79 CPU
:= $(patsubst x86
,i386
,$(LINUX_KARCH
))
82 UNAME_R
=$(LINUX_VERSION
)
89 --disable-valgrindmi \
91 --disable-valgrindtk \
92 --without-included-gettext
94 define Package
/valgrind
/install
95 $(INSTALL_DIR
) $(1)/usr
/bin
96 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/valgrind
* $(1)/usr
/bin
/
97 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
99 .
/files
/default.supp \
100 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/none-
* \
101 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_core
*.so \
102 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/$(CPU
)-*.xml \
103 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/32bit-core
*.xml \
104 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/32bit-linux
*.xml \
105 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/memcheck-
* \
106 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_memcheck
*.so \
107 $(1)/usr
/lib
/valgrind
/
110 define Package
/valgrind-cachegrind
/install
111 $(INSTALL_DIR
) $(1)/usr
/bin
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cg_
* $(1)/usr
/bin
/
113 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
115 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/cachegrind-
* \
116 $(1)/usr
/lib
/valgrind
/
119 define Package
/valgrind-callgrind
/install
120 $(INSTALL_DIR
) $(1)/usr
/bin
121 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/callgrind
* $(1)/usr
/bin
/
122 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
124 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/callgrind-
* \
125 $(1)/usr
/lib
/valgrind
/
128 define Package
/valgrind-drd
/install
129 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
131 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/drd-
* \
132 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_drd
*.so \
133 $(1)/usr
/lib
/valgrind
/
136 define Package
/valgrind-massif
/install
137 $(INSTALL_DIR
) $(1)/usr
/bin
138 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ms_print
$(1)/usr
/bin
/
139 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
141 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/massif-
* \
142 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_massif
*.so \
143 $(1)/usr
/lib
/valgrind
/
146 define Package
/valgrind-helgrind
/install
147 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
149 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/helgrind-
* \
150 $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/vgpreload_helgrind
*.so \
151 $(1)/usr
/lib
/valgrind
/
154 define Package
/valgrind-vgdb
/install
155 $(INSTALL_DIR
) $(1)/usr
/bin
156 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vgdb
$(1)/usr
/bin
/
159 $(eval
$(call BuildPackage
,valgrind
))
160 $(eval
$(call BuildPackage
,valgrind-cachegrind
))
161 $(eval
$(call BuildPackage
,valgrind-callgrind
))
162 $(eval
$(call BuildPackage
,valgrind-drd
))
163 $(eval
$(call BuildPackage
,valgrind-massif
))
164 $(eval
$(call BuildPackage
,valgrind-helgrind
))
165 $(eval
$(call BuildPackage
,valgrind-vgdb
))