summaryrefslogtreecommitdiff
path: root/package/ltt/ltt.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-09-30 20:41:41 +0000
committerEric Andersen <andersen@codepoet.org>2005-09-30 20:41:41 +0000
commitf2a5ce4b9da5940604061294b2414e6d163ffc7b (patch)
tree2ad774b7cc900b93e52c025daee97a9c6beaf23a /package/ltt/ltt.mk
parent6628d4b2f68bdc61ac7e328c0d27b9affb43b4f0 (diff)
Add iostat, ltt, xfsprogs, and memtester
Diffstat (limited to 'package/ltt/ltt.mk')
-rw-r--r--package/ltt/ltt.mk116
1 files changed, 116 insertions, 0 deletions
diff --git a/package/ltt/ltt.mk b/package/ltt/ltt.mk
new file mode 100644
index 000000000..dfc317879
--- /dev/null
+++ b/package/ltt/ltt.mk
@@ -0,0 +1,116 @@
+#############################################################
+#
+# ltt
+#
+#############################################################
+LTT_VER:=0.9.5a
+LTT_SOURCE:=TraceToolkit-$(LTT_VER).tgz
+LTT_SITE:=http://www.opersys.com/ftp/pub/LTT
+LTT_CAT:=zcat
+LTT_DIR1:=$(TOOL_BUILD_DIR)/TraceToolkit-$(LTT_VER:a=)
+LTT_DIR2:=$(BUILD_DIR)/TraceToolkit-$(LTT_VER:a=)
+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
+
+$(LTT_DIR1)/.configured: $(LTT_DIR1)/.unpacked
+ (cd $(LTT_DIR1); rm -rf config.cache; \
+ ./configure \
+ --prefix=$(TOOL_BUILD_DIR) \
+ );
+ touch $(LTT_DIR1)/.configured
+
+$(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
+
+host-ltt-clean:
+ $(MAKE) -C $(LTT_DIR1) clean
+
+host-ltt-dirclean:
+ rm -rf $(LTT_DIR1)
+
+
+#############################################################
+#
+# 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) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ );
+ touch $(LTT_DIR2)/.configured
+
+$(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
+ $(STRIP) $(TARGET_DIR)/usr/bin/tracedaemon > /dev/null 2>&1
+ $(INSTALL) -D -m 0755 package/ltt/init-tracer $(TARGET_DIR)/etc/init.d/S27tracer
+
+ltt-tracedaemon: uclibc $(TARGET_DIR)/usr/bin/tracedaemon
+
+ltt-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LTT_DIR2) uninstall
+ -$(MAKE) -C $(LTT_DIR2) clean
+
+ltt-dirclean:
+ rm -rf $(LTT_DIR2)
+
+
+ltt: host-ltt-tracevisualizer ltt-tracedaemon
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LTT)),y)
+TARGETS+=ltt
+endif