2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://valgrind.org
/downloads
/
17 PKG_MD5SUM
:=0539e2fa4aadb2cd4ca4bba65b1fe8b5
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/valgrind
24 DEPENDS
:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml
25 TITLE
:=debugging and profiling Linux programs
26 URL
:=http
://www.valgrind.org
29 define Package
/valgrind
/description
30 Valgrind is an award-winning suite of tools for debugging and
31 profiling Linux programs. With the tools that come with Valgrind
,
32 you can automatically detect many memory management and threading
33 bugs
, avoiding hours of frustrating bug-hunting
, making your
34 programs more stable. You can also perform detailed profiling
,
35 to speed up and reduce memory use of your programs.
43 --disable-valgrindmi \
45 --disable-valgrindtk \
46 --without-included-gettext
48 DEFAULT_SUPP
+= "uclibc.supp"
51 $(TARGET_CC
) $(TARGET_CFLAGS
) -c
-o
$(PKG_BUILD_DIR
)/abort.o .
/src
/abort.c
52 $(TARGET_CROSS
)ar rcu
$(PKG_BUILD_DIR
)/abort.a
$(PKG_BUILD_DIR
)/abort.o
53 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
54 $(TARGET_CONFIGURE_OPTS
) \
55 DESTDIR
="$(PKG_INSTALL_DIR)" \
56 CFLAGS
="$(TARGET_CFLAGS)" \
57 AM_CFLAGS_X86_LINUX
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
58 AM_CFLAGS_AMD64_LINUX
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
59 AM_CFLAGS_PPC32_LINUX
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
60 AM_CFLAGS_PPC64_LINUX
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
61 TOOL_LDADD_COMMON
="-lgcc $(PKG_BUILD_DIR)/abort.a" \
65 define Package
/valgrind
/install
66 $(INSTALL_DIR
) $(1)/usr
/bin
67 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
68 $(INSTALL_BIN
) .
/files
/valgrind.sh
$(1)/usr
/bin
/
69 $(INSTALL_DIR
) $(1)/usr
/lib
/valgrind
70 $(CP
) .
/files
/uclibc.supp
$(1)/usr
/lib
/valgrind
/
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/valgrind
/*-linux
$(1)/usr
/lib
/valgrind
/
74 $(eval
$(call BuildPackage
,valgrind
))