2002-07-03 18:46:13 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# valgrind
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2006-09-25 15:27:46 +08:00
|
|
|
VALGRIND_VERSION=3.2.1
|
2005-07-22 17:49:20 +08:00
|
|
|
VALGRIND_SITE:=http://valgrind.org/downloads/
|
2006-09-25 15:27:46 +08:00
|
|
|
VALGRIND_DIR:=$(BUILD_DIR)/valgrind-$(VALGRIND_VERSION)
|
|
|
|
VALGRIND_SOURCE:=valgrind-$(VALGRIND_VERSION).tar.bz2
|
2006-11-17 23:43:51 +08:00
|
|
|
VALGRIND_CAT:=$(BZCAT)
|
2002-07-03 18:46:13 +08:00
|
|
|
|
|
|
|
$(DL_DIR)/$(VALGRIND_SOURCE):
|
2002-11-21 07:16:10 +08:00
|
|
|
$(WGET) -P $(DL_DIR) $(VALGRIND_SITE)/$(VALGRIND_SOURCE)
|
2002-07-03 18:46:13 +08:00
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE)
|
2006-11-17 23:43:51 +08:00
|
|
|
$(VALGRIND_CAT) $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-11-24 14:53:24 +08:00
|
|
|
touch $(VALGRIND_DIR)/.unpacked
|
2002-07-03 18:46:13 +08:00
|
|
|
|
2002-07-27 17:13:00 +08:00
|
|
|
$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
|
2005-06-24 16:36:13 +08:00
|
|
|
toolchain/patch-kernel.sh $(VALGRIND_DIR) package/valgrind/ valgrind\*.patch
|
2002-07-27 17:13:00 +08:00
|
|
|
touch $(VALGRIND_DIR)/.patched
|
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
|
2003-01-17 16:03:59 +08:00
|
|
|
(cd $(VALGRIND_DIR); rm -rf config.cache; \
|
2003-03-05 03:16:19 +08:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2003-01-17 16:03:59 +08:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-05 03:16:19 +08:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 16:03:59 +08:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 11:52:21 +08:00
|
|
|
--libdir=/lib \
|
2003-01-17 16:03:59 +08:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 15:18:18 +08:00
|
|
|
$(DISABLE_NLS) \
|
2003-01-17 16:03:59 +08:00
|
|
|
--without-uiout --disable-valgrindmi \
|
|
|
|
--disable-tui --disable-valgrindtk \
|
|
|
|
--without-x --without-included-gettext \
|
2005-07-22 17:49:20 +08:00
|
|
|
--disable-tls \
|
2003-01-17 16:03:59 +08:00
|
|
|
);
|
2005-11-24 14:53:24 +08:00
|
|
|
touch $(VALGRIND_DIR)/.configured
|
2002-07-03 18:46:13 +08:00
|
|
|
|
2004-10-15 10:27:38 +08:00
|
|
|
$(VALGRIND_DIR)/none/vgskin_none.so: $(VALGRIND_DIR)/.configured
|
2003-02-12 16:10:40 +08:00
|
|
|
$(MAKE) -C $(VALGRIND_DIR)
|
2002-07-27 17:13:00 +08:00
|
|
|
-$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so*
|
2004-10-15 10:27:38 +08:00
|
|
|
touch -c $(VALGRIND_DIR)/none/vgskin_none.so
|
2002-07-03 18:46:13 +08:00
|
|
|
|
2004-10-15 10:27:38 +08:00
|
|
|
$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/none/vgskin_none.so
|
2003-01-09 05:34:23 +08:00
|
|
|
$(MAKE) \
|
|
|
|
prefix=$(TARGET_DIR)/usr \
|
|
|
|
exec_prefix=$(TARGET_DIR)/usr \
|
|
|
|
bindir=$(TARGET_DIR)/usr/bin \
|
|
|
|
sbindir=$(TARGET_DIR)/usr/sbin \
|
|
|
|
libexecdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
datadir=$(TARGET_DIR)/usr/share \
|
|
|
|
sysconfdir=$(TARGET_DIR)/etc \
|
|
|
|
sharedstatedir=$(TARGET_DIR)/usr/com \
|
|
|
|
localstatedir=$(TARGET_DIR)/var \
|
|
|
|
libdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
infodir=$(TARGET_DIR)/usr/info \
|
|
|
|
mandir=$(TARGET_DIR)/usr/man \
|
|
|
|
includedir=$(TARGET_DIR)/usr/include \
|
|
|
|
-C $(VALGRIND_DIR) install;
|
2005-08-08 19:48:35 +08:00
|
|
|
mv $(TARGET_DIR)/usr/bin/valgrind $(TARGET_DIR)/usr/bin/valgrind.bin
|
|
|
|
cp package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/
|
|
|
|
cp package/valgrind/valgrind.sh $(TARGET_DIR)/usr/bin/valgrind
|
|
|
|
chmod a+x $(TARGET_DIR)/usr/bin/valgrind
|
2002-07-27 16:54:01 +08:00
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
|
2003-07-14 17:13:51 +08:00
|
|
|
#mkdir -p $(TARGET_DIR)/etc/default
|
|
|
|
#cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind
|
|
|
|
#mkdir -p $(TARGET_DIR)/usr/lib/valgrind
|
|
|
|
#cp $(VALGRIND_DIR)/woody.supp $(TARGET_DIR)/usr/lib/valgrind/
|
2003-01-09 02:31:05 +08:00
|
|
|
touch -c $(TARGET_DIR)/usr/bin/valgrind
|
2002-07-03 18:46:13 +08:00
|
|
|
|
|
|
|
valgrind: $(TARGET_DIR)/usr/bin/valgrind
|
|
|
|
|
2003-11-12 17:31:12 +08:00
|
|
|
valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE)
|
|
|
|
|
2006-08-11 04:21:33 +08:00
|
|
|
valgrind-clean:
|
2003-01-17 16:03:59 +08:00
|
|
|
$(MAKE) -C $(VALGRIND_DIR) clean
|
2002-07-03 18:46:13 +08:00
|
|
|
|
2006-08-11 04:21:33 +08:00
|
|
|
valgrind-dirclean:
|
2002-07-03 18:46:13 +08:00
|
|
|
rm -rf $(VALGRIND_DIR)
|
|
|
|
|
2005-02-10 11:06:39 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_VALGRIND)),y)
|
|
|
|
TARGETS+=valgrind
|
|
|
|
endif
|