2002-07-03 12:46:13 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# valgrind
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
VALGRIND_SITE:=http://developer.kde.org/~sewardj
|
2003-01-15 10:52:30 +01:00
|
|
|
VALGRIND_DIR:=$(BUILD_DIR)/valgrind-1.0.4
|
|
|
|
VALGRIND_SOURCE:=valgrind-1.0.4.tar.bz2
|
|
|
|
VALGRIND_PATCH:=$(SOURCE_DIR)/valgrind.patch.bz2
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(VALGRIND_SOURCE):
|
2002-11-21 00:16:10 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(VALGRIND_SITE)/$(VALGRIND_SOURCE)
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE)
|
|
|
|
bzcat $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) -xvf -
|
|
|
|
touch $(VALGRIND_DIR)/.unpacked
|
|
|
|
|
2002-07-27 11:13:00 +02:00
|
|
|
$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
|
2003-01-15 10:52:30 +01:00
|
|
|
bzcat $(VALGRIND_PATCH) | patch -d $(VALGRIND_DIR) -p1
|
2002-07-27 11:13:00 +02:00
|
|
|
touch $(VALGRIND_DIR)/.patched
|
|
|
|
|
|
|
|
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
|
2002-07-03 12:46:13 +02:00
|
|
|
(cd $(VALGRIND_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \
|
|
|
|
AR=$(TARGET_CROSS)ar NM=$(TARGET_CROSS)nm \
|
|
|
|
LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as \
|
|
|
|
./configure --prefix=/usr \
|
2003-01-08 22:34:23 +01:00
|
|
|
--includedir=/usr/include \
|
2002-07-03 12:46:13 +02:00
|
|
|
--disable-nls --without-uiout --disable-valgrindmi \
|
|
|
|
--disable-tui --disable-valgrindtk --without-x \
|
|
|
|
--without-included-gettext);
|
|
|
|
touch $(VALGRIND_DIR)/.configured
|
|
|
|
|
2003-01-08 19:31:05 +01:00
|
|
|
$(VALGRIND_DIR)/valgrind.so: $(VALGRIND_DIR)/.configured
|
2002-07-03 12:46:13 +02:00
|
|
|
make CC=$(TARGET_CC1) -C $(VALGRIND_DIR)
|
2002-07-27 11:13:00 +02:00
|
|
|
-$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so*
|
2003-01-08 19:31:05 +01:00
|
|
|
touch -c $(VALGRIND_DIR)/valgrind.so
|
2002-07-03 12:46:13 +02:00
|
|
|
|
2003-01-08 19:31:05 +01:00
|
|
|
$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/valgrind.so
|
2003-01-08 22:34:23 +01:00
|
|
|
PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \
|
|
|
|
$(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;
|
2002-07-27 10:54:01 +02:00
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
|
2003-01-15 10:52:30 +01: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-08 19:31:05 +01:00
|
|
|
touch -c $(TARGET_DIR)/usr/bin/valgrind
|
2002-07-03 12:46:13 +02:00
|
|
|
|
|
|
|
valgrind: $(TARGET_DIR)/usr/bin/valgrind
|
|
|
|
|
|
|
|
valgrind-clean:
|
|
|
|
make -C $(VALGRIND_DIR) clean
|
|
|
|
|
|
|
|
valgrind-dirclean:
|
|
|
|
rm -rf $(VALGRIND_DIR)
|
|
|
|
|