2002-07-03 12:46:13 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# valgrind
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2007-04-03 17:36:16 +02:00
|
|
|
VALGRIND_VERSION=3.2.3
|
2005-07-22 11:49:20 +02:00
|
|
|
VALGRIND_SITE:=http://valgrind.org/downloads/
|
2006-09-25 09:27:46 +02:00
|
|
|
VALGRIND_DIR:=$(BUILD_DIR)/valgrind-$(VALGRIND_VERSION)
|
|
|
|
VALGRIND_SOURCE:=valgrind-$(VALGRIND_VERSION).tar.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
VALGRIND_CAT:=$(BZCAT)
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(VALGRIND_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(VALGRIND_SITE),$(VALGRIND_SOURCE))
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE)
|
2006-11-17 16:43:51 +01:00
|
|
|
$(VALGRIND_CAT) $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(VALGRIND_DIR)/.unpacked
|
2002-07-03 12:46:13 +02:00
|
|
|
|
2002-07-27 11:13:00 +02:00
|
|
|
$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
|
2005-06-24 10:36:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(VALGRIND_DIR) package/valgrind/ valgrind\*.patch
|
2002-07-27 11:13:00 +02:00
|
|
|
touch $(VALGRIND_DIR)/.patched
|
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
|
2003-01-17 09:03:59 +01:00
|
|
|
(cd $(VALGRIND_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2008-06-15 21:17:23 +02:00
|
|
|
CC="$(TARGET_CC) $(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include" \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--without-uiout --disable-valgrindmi \
|
|
|
|
--disable-tui --disable-valgrindtk \
|
|
|
|
--without-x --without-included-gettext \
|
2005-07-22 11:49:20 +02:00
|
|
|
--disable-tls \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(VALGRIND_DIR)/.configured
|
2002-07-03 12:46:13 +02:00
|
|
|
|
2008-06-15 22:44:05 +02:00
|
|
|
$(VALGRIND_DIR)/coregrind/valgrind: $(VALGRIND_DIR)/.configured
|
2003-02-12 09:10:40 +01:00
|
|
|
$(MAKE) -C $(VALGRIND_DIR)
|
2008-06-15 22:44:05 +02:00
|
|
|
touch -c $@
|
2002-07-03 12:46:13 +02:00
|
|
|
|
2008-06-15 22:44:05 +02:00
|
|
|
$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/coregrind/valgrind
|
2003-01-08 22:34:23 +01: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 \
|
2007-08-21 21:20:18 +02:00
|
|
|
-C $(VALGRIND_DIR) install
|
2005-08-08 13:48:35 +02: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 10:54:01 +02:00
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
|
2008-06-15 22:44:05 +02:00
|
|
|
touch -c $@
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
valgrind: $(TARGET_DIR)/usr/bin/valgrind
|
|
|
|
|
2003-11-12 10:31:12 +01:00
|
|
|
valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE)
|
|
|
|
|
2006-08-10 22:21:33 +02:00
|
|
|
valgrind-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(VALGRIND_DIR) clean
|
|
|
|
-rm -f $(TARGET_DIR)/usr/bin/valgrind*
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/valgrind
|
2002-07-03 12:46:13 +02:00
|
|
|
|
2006-08-10 22:21:33 +02:00
|
|
|
valgrind-dirclean:
|
2002-07-03 12:46:13 +02:00
|
|
|
rm -rf $(VALGRIND_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_VALGRIND),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=valgrind
|
|
|
|
endif
|