obsolete
[openwrt.git] / obsolete-buildroot / make / valgrind.mk
1 #############################################################
2 #
3 # valgrind
4 #
5 #############################################################
6
7 VALGRIND_SITE:=http://developer.kde.org/~sewardj/
8 VALGRIND_DIR:=$(BUILD_DIR)/valgrind-2.1.1
9 VALGRIND_SOURCE:=valgrind-2.1.1.tar.bz2
10 VALGRIND_PATCH:=$(SOURCE_DIR)/valgrind.patch
11
12 $(DL_DIR)/$(VALGRIND_SOURCE):
13 $(WGET) -P $(DL_DIR) $(VALGRIND_SITE)/$(VALGRIND_SOURCE)
14
15 $(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE)
16 bzcat $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) -xvf -
17 touch $(VALGRIND_DIR)/.unpacked
18
19 $(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
20 cat $(VALGRIND_PATCH) | patch -d $(VALGRIND_DIR) -p1
21 touch $(VALGRIND_DIR)/.patched
22
23 $(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
24 (cd $(VALGRIND_DIR); rm -rf config.cache; \
25 $(TARGET_CONFIGURE_OPTS) \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --sbindir=/usr/sbin \
34 --libexecdir=/usr/lib \
35 --sysconfdir=/etc \
36 --datadir=/usr/share \
37 --localstatedir=/var \
38 --mandir=/usr/man \
39 --infodir=/usr/info \
40 $(DISABLE_NLS) \
41 --without-uiout --disable-valgrindmi \
42 --disable-tui --disable-valgrindtk \
43 --without-x --without-included-gettext \
44 );
45 touch $(VALGRIND_DIR)/.configured
46
47 $(VALGRIND_DIR)/coregrind/valgrind.so: $(VALGRIND_DIR)/.configured
48 $(MAKE) -C $(VALGRIND_DIR)
49 -$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so*
50 touch -c $(VALGRIND_DIR)/coregrind/valgrind.so
51
52 $(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/coregrind/valgrind.so
53 $(MAKE) \
54 prefix=$(TARGET_DIR)/usr \
55 exec_prefix=$(TARGET_DIR)/usr \
56 bindir=$(TARGET_DIR)/usr/bin \
57 sbindir=$(TARGET_DIR)/usr/sbin \
58 libexecdir=$(TARGET_DIR)/usr/lib \
59 datadir=$(TARGET_DIR)/usr/share \
60 sysconfdir=$(TARGET_DIR)/etc \
61 sharedstatedir=$(TARGET_DIR)/usr/com \
62 localstatedir=$(TARGET_DIR)/var \
63 libdir=$(TARGET_DIR)/usr/lib \
64 infodir=$(TARGET_DIR)/usr/info \
65 mandir=$(TARGET_DIR)/usr/man \
66 includedir=$(TARGET_DIR)/usr/include \
67 -C $(VALGRIND_DIR) install;
68 rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
69 #mkdir -p $(TARGET_DIR)/etc/default
70 #cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind
71 #mkdir -p $(TARGET_DIR)/usr/lib/valgrind
72 #cp $(VALGRIND_DIR)/woody.supp $(TARGET_DIR)/usr/lib/valgrind/
73 touch -c $(TARGET_DIR)/usr/bin/valgrind
74
75 ifeq ($(ARCH),i386)
76 valgrind: $(TARGET_DIR)/usr/bin/valgrind
77 else
78 valgrind:
79 endif
80
81 valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE)
82
83 valgrind-clean:
84 $(MAKE) -C $(VALGRIND_DIR) clean
85
86 valgrind-dirclean:
87 rm -rf $(VALGRIND_DIR)
88
This page took 0.047223 seconds and 5 git commands to generate.