nuke $Id$ in /packages as well
[openwrt.org/packages.git] / utils / valgrind / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
 
include $(TOPDIR)/rules.mk
 
PKG_NAME:=valgrind
PKG_VERSION:=3.3.1
PKG_RELEASE:=1
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://valgrind.org/downloads/
PKG_MD5SUM:=0539e2fa4aadb2cd4ca4bba65b1fe8b5
 
include $(INCLUDE_DIR)/package.mk
 
define Package/valgrind
  SECTION:=utils
  CATEGORY:=Utilities
  DEPENDS:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml
  TITLE:=debugging and profiling Linux programs
  URL:=http://www.valgrind.org
endef
 
define Package/valgrind/description
        Valgrind is an award-winning suite of tools for debugging and
        profiling Linux programs. With the tools that come with Valgrind,
        you can automatically detect many memory management and threading
        bugs, avoiding hours of frustrating bug-hunting, making your
        programs more stable. You can also perform detailed profiling,
        to speed up and reduce memory use of your programs.
endef
 
CONFIGURE_ARGS += \
        --disable-tls \
        --enable-only32bit \
        --without-x \
        --without-uiout \
        --disable-valgrindmi \
        --disable-tui \
        --disable-valgrindtk \
        --without-included-gettext
 
DEFAULT_SUPP += "uclibc.supp"
 
define Build/Compile
        $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c
        $(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                CFLAGS="$(TARGET_CFLAGS)" \
                AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
                AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
                AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
                AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
                TOOL_LDADD_COMMON="-lgcc $(PKG_BUILD_DIR)/abort.a" \
                all install
endef
 
define Package/valgrind/install 
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
        $(INSTALL_BIN) ./files/valgrind.sh $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/lib/valgrind
        $(CP) ./files/uclibc.supp $(1)/usr/lib/valgrind/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/valgrind/*-linux $(1)/usr/lib/valgrind/
endef
 
$(eval $(call BuildPackage,valgrind))
 
comments