license info - revert r43155
[openwrt/openwrt.git] / package / devel / valgrind / Makefile
1 #
2 # Copyright (C) 2006-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=valgrind
11 PKG_VERSION:=3.10.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://valgrind.org/downloads/
16 PKG_MD5SUM:=7c311a72a20388aceced1aa5573ce970
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19 PKG_LICENSE:=GPL-2.0+
20
21 PKG_FIXUP = autoreconf
22 PKG_INSTALL := 1
23 PKG_BUILD_PARALLEL := 1
24 PKG_USE_MIPS16:=0
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/kernel.mk
28
29 define Package/valgrind
30 SECTION:=devel
31 CATEGORY:=Development
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
35 endef
36
37 define Package/valgrind/default
38 $(Package/valgrind)
39 DEPENDS := valgrind
40 endef
41
42 define Package/valgrind-cachegrind
43 $(Package/valgrind/default)
44 TITLE += (cache profiling)
45 endef
46
47 define Package/valgrind-callgrind
48 $(Package/valgrind/default)
49 TITLE += (callgraph profiling)
50 endef
51
52 define Package/valgrind-drd
53 $(Package/valgrind/default)
54 TITLE += (thread error detection)
55 endef
56
57 define Package/valgrind-massif
58 $(Package/valgrind/default)
59 TITLE += (heap profiling)
60 endef
61
62 define Package/valgrind-helgrind
63 $(Package/valgrind/default)
64 TITLE += (thread debugging)
65 endef
66
67 define Package/valgrind-vgdb
68 $(Package/valgrind/default)
69 TITLE += (GDB interface)
70 endef
71
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.
79 endef
80
81 CPU := $(patsubst x86_64,amd64,$(patsubst x86,i386,$(patsubst um,$(ARCH),$(LINUX_KARCH))))
82
83 CONFIGURE_VARS += \
84 UNAME_R=$(LINUX_VERSION)
85
86 ifeq ($(ARCH),x86_64)
87 CONFIGURE_ARGS += \
88 --enable-only64bit
89 BITS := 64bit
90 else
91 CONFIGURE_ARGS += \
92 --enable-only32bit
93 BITS := 32bit
94 endif
95
96 CONFIGURE_ARGS += \
97 --enable-tls \
98 --without-x \
99 --without-mpicc \
100 --without-uiout \
101 --disable-valgrindmi \
102 --disable-tui \
103 --disable-valgrindtk \
104 --without-included-gettext
105
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
110 $(CP) \
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/
120 endef
121
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
126 $(CP) \
127 $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
128 $(1)/usr/lib/valgrind/
129 endef
130
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
135 $(CP) \
136 $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
137 $(1)/usr/lib/valgrind/
138 endef
139
140 define Package/valgrind-drd/install
141 $(INSTALL_DIR) $(1)/usr/lib/valgrind
142 $(CP) \
143 $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
144 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
145 $(1)/usr/lib/valgrind/
146 endef
147
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
152 $(CP) \
153 $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
154 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
155 $(1)/usr/lib/valgrind/
156 endef
157
158 define Package/valgrind-helgrind/install
159 $(INSTALL_DIR) $(1)/usr/lib/valgrind
160 $(CP) \
161 $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
162 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
163 $(1)/usr/lib/valgrind/
164 endef
165
166 define Package/valgrind-vgdb/install
167 $(INSTALL_DIR) $(1)/usr/bin
168 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
169 endef
170
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))