2002-05-23 21:21:23 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# strace
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
STRACE_VERSION:=4.5.15
|
|
|
|
STRACE_SOURCE:=strace-$(STRACE_VERSION).tar.bz2
|
2005-06-09 14:15:00 +02:00
|
|
|
STRACE_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/strace
|
2006-11-17 16:43:51 +01:00
|
|
|
STRACE_CAT:=$(BZCAT)
|
2007-07-11 16:06:06 +02:00
|
|
|
STRACE_DIR:=$(BUILD_DIR)/strace-$(STRACE_VERSION)
|
2002-05-23 21:21:23 +02:00
|
|
|
|
2007-01-29 18:02:31 +01:00
|
|
|
BR2_STRACE_CFLAGS:=
|
|
|
|
ifeq ($(BR2_LARGEFILE),)
|
|
|
|
BR2_STRACE_CFLAGS+=-U_LARGEFILE64_SOURCE -U__USE_LARGEFILE64 -U__USE_FILE_OFFSET64
|
|
|
|
endif
|
2003-01-17 09:03:59 +01:00
|
|
|
|
2002-05-23 21:21:23 +02:00
|
|
|
$(DL_DIR)/$(STRACE_SOURCE):
|
2003-01-17 09:03:59 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE)
|
2002-05-23 21:21:23 +02:00
|
|
|
|
|
|
|
strace-source: $(DL_DIR)/$(STRACE_SOURCE)
|
|
|
|
|
2003-01-17 09:03:59 +01:00
|
|
|
$(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(STRACE_CAT) $(DL_DIR)/$(STRACE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-08-04 00:14:39 +02:00
|
|
|
toolchain/patch-kernel.sh $(STRACE_DIR) package/strace strace\*.patch
|
2007-01-29 18:02:31 +01:00
|
|
|
$(CONFIG_UPDATE) $(STRACE_DIR)
|
2003-01-17 09:03:59 +01:00
|
|
|
touch $(STRACE_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
|
|
|
|
(cd $(STRACE_DIR); rm -rf config.cache; \
|
2007-01-29 18:02:31 +01:00
|
|
|
$(if $(BR_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-01-29 18:02:31 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(BR2_STRACE_CFLAGS)" \
|
2008-03-24 20:29:34 +01:00
|
|
|
ac_cv_header_linux_if_packet_h=yes \
|
|
|
|
ac_cv_header_linux_netlink_h=yes \
|
2003-01-17 09:03:59 +01:00
|
|
|
./configure \
|
2006-11-17 12:52:58 +01:00
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--host=$(REAL_GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-01-17 09:03:59 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(STRACE_DIR)/.configured
|
2003-01-17 09:03:59 +01:00
|
|
|
|
|
|
|
$(STRACE_DIR)/strace: $(STRACE_DIR)/.configured
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(STRACE_DIR)
|
2003-01-17 09:03:59 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/strace: $(STRACE_DIR)/strace
|
|
|
|
install -c $(STRACE_DIR)/strace $(TARGET_DIR)/usr/bin/strace
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/bin/strace > /dev/null 2>&1
|
2005-08-04 05:49:25 +02:00
|
|
|
ifeq ($(strip $(BR2_CROSS_TOOLCHAIN_TARGET_UTILS)),y)
|
|
|
|
mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/target_utils
|
|
|
|
install -c $(TARGET_DIR)/usr/bin/strace \
|
|
|
|
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/target_utils/strace
|
|
|
|
endif
|
2002-05-23 21:21:23 +02:00
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
strace: uclibc $(TARGET_DIR)/usr/bin/strace
|
2002-05-23 21:21:23 +02:00
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
strace-clean:
|
2007-02-06 19:12:22 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/strace
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(STRACE_DIR) clean
|
2002-05-23 21:21:23 +02:00
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
strace-dirclean:
|
|
|
|
rm -rf $(STRACE_DIR)
|
2002-05-23 21:21:23 +02:00
|
|
|
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_STRACE)),y)
|
|
|
|
TARGETS+=strace
|
|
|
|
endif
|