2004-02-11 07:44:47 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ltrace
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-09-24 09:34:48 +02:00
|
|
|
LTRACE_VERSION=0.5
|
2007-04-16 20:51:20 +02:00
|
|
|
LTRACE_SOURCE=ltrace_$(LTRACE_VERSION).orig.tar.gz
|
2007-09-24 09:34:48 +02:00
|
|
|
LTRACE_PATCH=ltrace_$(LTRACE_VERSION)-3.diff.gz
|
2004-02-11 07:44:47 +01:00
|
|
|
LTRACE_SITE=http://ftp.debian.org/debian/pool/main/l/ltrace
|
2007-04-16 20:51:20 +02:00
|
|
|
LTRACE_DIR=$(BUILD_DIR)/ltrace-$(LTRACE_VERSION)
|
2004-02-11 07:44:47 +01:00
|
|
|
LTRACE_BINARY=ltrace
|
|
|
|
LTRACE_TARGET_BINARY=usr/bin/ltrace
|
|
|
|
|
2007-04-16 20:51:20 +02:00
|
|
|
LTRACE_ARCH:=$(KERNEL_ARCH)
|
2004-09-03 06:12:31 +02:00
|
|
|
ifeq ("$(strip $(ARCH))","armeb")
|
|
|
|
LTRACE_ARCH:=arm
|
|
|
|
endif
|
|
|
|
|
2004-02-11 07:44:47 +01:00
|
|
|
$(DL_DIR)/$(LTRACE_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_SOURCE)
|
|
|
|
|
2007-04-16 20:51:20 +02:00
|
|
|
ifneq ($(LTRACE_PATCH),)
|
2007-09-24 09:34:48 +02:00
|
|
|
LTRACE_PATCH_FILE:=$(DL_DIR)/$(LTRACE_PATCH)
|
|
|
|
$(LTRACE_PATCH_FILE):
|
2007-04-16 20:51:20 +02:00
|
|
|
$(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_PATCH)
|
2005-04-14 10:00:27 +02:00
|
|
|
|
2007-04-16 20:51:20 +02:00
|
|
|
else
|
2007-09-24 09:34:48 +02:00
|
|
|
LTRACE_PATCH_FILE:=
|
2007-04-16 20:51:20 +02:00
|
|
|
endif
|
|
|
|
|
2007-09-24 09:34:48 +02:00
|
|
|
$(LTRACE_DIR)/.patched: $(DL_DIR)/$(LTRACE_SOURCE) $(LTRACE_PATCH_FILE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(LTRACE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-04-16 20:51:20 +02:00
|
|
|
ifneq ($(LTRACE_PATCH),)
|
2007-09-24 09:34:48 +02:00
|
|
|
$(ZCAT) $(LTRACE_PATCH_FILE) | patch -p1 -d $(LTRACE_DIR)
|
2007-04-16 20:51:20 +02:00
|
|
|
endif
|
|
|
|
toolchain/patch-kernel.sh $(LTRACE_DIR) package/ltrace ltrace\*.patch
|
|
|
|
$(CONFIG_UPDATE) $(@D)
|
|
|
|
chmod +x $(LTRACE_DIR)/configure
|
|
|
|
touch $@
|
2004-02-11 07:44:47 +01:00
|
|
|
|
2007-04-16 20:51:20 +02:00
|
|
|
$(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched
|
2007-08-22 11:56:41 +02:00
|
|
|
(cd $(LTRACE_DIR); rm -rf config.cache; \
|
2004-02-11 07:44:47 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2004-02-11 07:44:47 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
2007-04-16 20:51:20 +02:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-04-16 20:51:20 +02:00
|
|
|
touch $@
|
2004-02-11 07:44:47 +01:00
|
|
|
|
|
|
|
$(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
|
2004-09-03 06:12:31 +02:00
|
|
|
$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \
|
|
|
|
-C $(LTRACE_DIR)
|
2004-02-11 07:44:47 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
|
2007-09-24 09:34:48 +02:00
|
|
|
#$(MAKE) DESTDIR=$(TARGET_DIR) ARCH=$(LTRACE_ARCH) -C $(LTRACE_DIR) install
|
|
|
|
$(INSTALL) -D $(LTRACE_DIR)/$(LTRACE_BINARY) $@
|
|
|
|
ifeq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
$(INSTALL) -D $(LTRACE_DIR)/ltrace.1 \
|
|
|
|
$(TARGET_DIR)/usr/share/man/man1/ltrace.1
|
|
|
|
endif
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
|
2004-02-11 07:44:47 +01:00
|
|
|
|
2005-04-14 10:00:27 +02:00
|
|
|
ltrace: uclibc libelf $(TARGET_DIR)/$(LTRACE_TARGET_BINARY)
|
2004-02-11 07:44:47 +01:00
|
|
|
|
2007-09-24 09:34:48 +02:00
|
|
|
ltrace-source: $(DL_DIR)/$(LTRACE_SOURCE) $(LTRACE_PATCH_FILE)
|
2004-02-11 07:44:47 +01:00
|
|
|
|
|
|
|
ltrace-clean:
|
|
|
|
-$(MAKE) -C $(LTRACE_DIR) clean
|
2007-09-24 09:34:48 +02:00
|
|
|
rm -f $(LTRACE_DIR)/$(LTRACE_BINARY) \
|
|
|
|
$(TARGET_DIR)/usr/share/man/man1/ltrace.1*
|
2004-02-11 07:44:47 +01:00
|
|
|
|
|
|
|
ltrace-dirclean:
|
|
|
|
rm -rf $(LTRACE_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LTRACE)),y)
|
|
|
|
TARGETS+=ltrace
|
|
|
|
endif
|