kernel: fix DMA error when BCM4331 is connected to BCM4706
[openwrt/svn-archive/archive.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.8.1
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:=288758010b271119a0ffc0183f1d6e38
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19
20 PKG_FIXUP = autoreconf
21 PKG_INSTALL := 1
22 PKG_BUILD_PARALLEL := 1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/kernel.mk
26
27 define Package/valgrind
28 SECTION:=devel
29 CATEGORY:=Development
30 DEPENDS:=@mips||mipsel||i386||powerpc||arm_v7 +libpthread +librt
31 TITLE:=debugging and profiling tools for Linux
32 URL:=http://www.valgrind.org
33 endef
34
35 define Package/valgrind/default
36 $(Package/valgrind)
37 DEPENDS := valgrind
38 endef
39
40 define Package/valgrind-cachegrind
41 $(Package/valgrind/default)
42 TITLE += (cache profiling)
43 endef
44
45 define Package/valgrind-callgrind
46 $(Package/valgrind/default)
47 TITLE += (callgraph profiling)
48 endef
49
50 define Package/valgrind-drd
51 $(Package/valgrind/default)
52 TITLE += (thread error detection)
53 endef
54
55 define Package/valgrind-massif
56 $(Package/valgrind/default)
57 TITLE += (heap profiling)
58 endef
59
60 define Package/valgrind-helgrind
61 $(Package/valgrind/default)
62 TITLE += (thread debugging)
63 endef
64
65 define Package/valgrind-vgdb
66 $(Package/valgrind/default)
67 TITLE += (GDB interface)
68 endef
69
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.
77 endef
78
79 CPU := $(patsubst x86,i386,$(LINUX_KARCH))
80
81 CONFIGURE_VARS += \
82 UNAME_R=$(LINUX_VERSION)
83
84 CONFIGURE_ARGS += \
85 --enable-only32bit \
86 --enable-tls \
87 --without-x \
88 --without-uiout \
89 --disable-valgrindmi \
90 --disable-tui \
91 --disable-valgrindtk \
92 --without-included-gettext
93
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
98 $(CP) \
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/
108 endef
109
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
114 $(CP) \
115 $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
116 $(1)/usr/lib/valgrind/
117 endef
118
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
123 $(CP) \
124 $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
125 $(1)/usr/lib/valgrind/
126 endef
127
128 define Package/valgrind-drd/install
129 $(INSTALL_DIR) $(1)/usr/lib/valgrind
130 $(CP) \
131 $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
132 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
133 $(1)/usr/lib/valgrind/
134 endef
135
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
140 $(CP) \
141 $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
142 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
143 $(1)/usr/lib/valgrind/
144 endef
145
146 define Package/valgrind-helgrind/install
147 $(INSTALL_DIR) $(1)/usr/lib/valgrind
148 $(CP) \
149 $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
150 $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
151 $(1)/usr/lib/valgrind/
152 endef
153
154 define Package/valgrind-vgdb/install
155 $(INSTALL_DIR) $(1)/usr/bin
156 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
157 endef
158
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))