2005-09-30 22:41:41 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ltt
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
LTT_VERSION:=0.9.5a
|
|
|
|
LTT_SOURCE:=TraceToolkit-$(LTT_VERSION).tgz
|
2005-09-30 22:41:41 +02:00
|
|
|
LTT_SITE:=http://www.opersys.com/ftp/pub/LTT
|
2006-10-01 17:17:52 +02:00
|
|
|
LTT_CAT:=$(ZCAT)
|
2007-07-11 16:06:06 +02:00
|
|
|
LTT_DIR1:=$(TOOL_BUILD_DIR)/TraceToolkit-$(LTT_VERSION:a=)
|
|
|
|
LTT_DIR2:=$(BUILD_DIR)/TraceToolkit-$(LTT_VERSION:a=)
|
2005-09-30 22:41:41 +02:00
|
|
|
LTT_BINARY:=Visualizer/tracevisualizer
|
|
|
|
LTT_TARGET_BINARY:=Daemon/tracedaemon
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LTT_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LTT_SITE)/$(LTT_SOURCE)
|
|
|
|
|
|
|
|
ltt-source: $(DL_DIR)/$(LTT_SOURCE)
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build tracevisualizer for use on the host system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(LTT_DIR1)/.unpacked: $(DL_DIR)/$(LTT_SOURCE)
|
|
|
|
$(LTT_CAT) $(DL_DIR)/$(LTT_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(LTT_DIR1) package/ltt ltt\*.patch
|
|
|
|
touch $(LTT_DIR1)/.unpacked
|
|
|
|
|
2006-04-07 00:13:51 +02:00
|
|
|
# Build without GTK if not available
|
2006-12-13 08:19:58 +01:00
|
|
|
LTT_WITHOUT_GTK:=$(shell which gtk-config > /dev/null 2>&1 || echo "--without-gtk")
|
2006-04-07 00:13:51 +02:00
|
|
|
|
2005-09-30 22:41:41 +02:00
|
|
|
$(LTT_DIR1)/.configured: $(LTT_DIR1)/.unpacked
|
|
|
|
(cd $(LTT_DIR1); rm -rf config.cache; \
|
|
|
|
./configure \
|
|
|
|
--prefix=$(TOOL_BUILD_DIR) \
|
2006-04-07 00:13:51 +02:00
|
|
|
$(LTT_WITHOUT_GTK) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(LTT_DIR1)/.configured
|
2005-09-30 22:41:41 +02:00
|
|
|
|
|
|
|
$(LTT_DIR1)/$(LTT_BINARY): $(LTT_DIR1)/.configured
|
|
|
|
$(MAKE) -C $(LTT_DIR1)/LibLTT
|
|
|
|
$(MAKE) -C $(LTT_DIR1)/Visualizer
|
|
|
|
|
|
|
|
$(TOOL_BUILD_DIR)/bin/tracevisualizer: $(LTT_DIR1)/$(LTT_BINARY)
|
|
|
|
$(MAKE) -C $(LTT_DIR1)/LibLTT install
|
|
|
|
$(MAKE) -C $(LTT_DIR1)/Visualizer install
|
|
|
|
|
|
|
|
host-ltt-tracevisualizer: $(TOOL_BUILD_DIR)/bin/tracevisualizer
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
host-ltt-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(LTT_DIR1) clean
|
2005-09-30 22:41:41 +02:00
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
host-ltt-dirclean:
|
|
|
|
rm -rf $(LTT_DIR1)
|
2005-09-30 22:41:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build tracedaemon for use on the target system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(LTT_DIR2)/.unpacked: $(DL_DIR)/$(LTT_SOURCE)
|
|
|
|
$(LTT_CAT) $(DL_DIR)/$(LTT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(LTT_DIR2) package/ltt ltt\*.patch
|
|
|
|
touch $(LTT_DIR2)/.unpacked
|
|
|
|
|
|
|
|
$(LTT_DIR2)/.configured: $(LTT_DIR2)/.unpacked
|
|
|
|
(cd $(LTT_DIR2); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-09-30 22:41:41 +02:00
|
|
|
./configure \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2005-09-30 22:41:41 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(LTT_DIR2)/.configured
|
2005-09-30 22:41:41 +02:00
|
|
|
|
|
|
|
$(LTT_DIR2)/$(LTT_TARGET_BINARY): $(LTT_DIR2)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(LTT_DIR2)/LibUserTrace
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(LTT_DIR2)/Daemon
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/tracedaemon: $(LTT_DIR2)/$(LTT_TARGET_BINARY)
|
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \
|
|
|
|
-C $(LTT_DIR2)/LibUserTrace install
|
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \
|
|
|
|
-C $(LTT_DIR2)/Daemon install
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/bin/tracedaemon > /dev/null 2>&1
|
2007-05-10 00:48:41 +02:00
|
|
|
$(INSTALL) -D -m 0755 package/ltt/S27tracer $(TARGET_DIR)/etc/init.d
|
2005-09-30 22:41:41 +02:00
|
|
|
|
|
|
|
ltt-tracedaemon: uclibc $(TARGET_DIR)/usr/bin/tracedaemon
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
ltt-clean:
|
2005-09-30 22:41:41 +02:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LTT_DIR2) uninstall
|
|
|
|
-$(MAKE) -C $(LTT_DIR2) clean
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
ltt-dirclean:
|
|
|
|
rm -rf $(LTT_DIR2)
|
2005-09-30 22:41:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
ltt: host-ltt-tracevisualizer ltt-tracedaemon
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LTT),y)
|
2005-09-30 22:41:41 +02:00
|
|
|
TARGETS+=ltt
|
|
|
|
endif
|