Add lmbench
authorKelvin Cheung <keguang.zhang@gmail.com>
Wed, 11 Nov 2009 02:51:02 +0000 (10:51 +0800)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 23 Mar 2010 22:07:30 +0000 (23:07 +0100)
Closes #661

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/Config.in
package/lmbench/Config.in [new file with mode: 0644]
package/lmbench/lmbench.mk [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index 79bd7f6e523a5aea200c9615a98dd51b30a65ec7..7cf730d40f33a8ac7e666b635ecad6cecbdda982 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,7 +5,7 @@
 
        X.org updated to 7.5.
 
-       New packages: librsync
+       New packages: librsync, lmbench
 
        Updated/fixed packages: busybox, dosfstools, e2fsprogs,
        freetype, iperf, libglib2, libpng, mdadm, memstat, mtd-utils,
@@ -13,6 +13,7 @@
 
        Issues resolved (http://bugs.uclibc.org):
 
+       #661: lmbench: new package
        #800: [PATCH] iperf update to 2.0.4
        #805: [PATCH] mdadm - version update
        #1111: Bump wget to 1.12 and migrate to Makefile.autotools.in
index 9f56c60eb1e99329a58b727c5944c23bcb3b0347..8504f23d1c87a16b6270271223c7118a9b8a9eb5 100644 (file)
@@ -86,6 +86,7 @@ source "package/libsysfs/Config.in"
 source "package/lockfile-progs/Config.in"
 source "package/logrotate/Config.in"
 source "package/lsof/Config.in"
+source "package/lmbench/Config.in"
 source "package/ltp-testsuite/Config.in"
 source "package/ltrace/Config.in"
 source "package/memstat/Config.in"
diff --git a/package/lmbench/Config.in b/package/lmbench/Config.in
new file mode 100644 (file)
index 0000000..704b3ff
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LMBENCH
+       bool "lmbench"
+       help
+         LMbench is a suite of simple, portable,
+         ANSI/C microbenchmarks for UNIX/POSIX.
+
+         http://sourceforge.net/projects/lmbench/
diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk
new file mode 100644 (file)
index 0000000..7083527
--- /dev/null
@@ -0,0 +1,47 @@
+#############################################################
+#
+# lmbench
+#
+#############################################################
+LMBENCH_VERSION:=3.0-a9
+LMBENCH_SOURCE:=lmbench-$(LMBENCH_VERSION).tgz
+LMBENCH_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/lmbench/development/lmbench-3.0-a9/
+LMBENCH_CAT:=$(ZCAT)
+LMBENCH_DIR:=$(BUILD_DIR)/lmbench-$(LMBENCH_VERSION)
+LMBENCH_BIN:=lmbench
+LMBENCH_TARGET_BIN:=usr/bin/$(LMBENCH_BIN)
+
+$(DL_DIR)/$(LMBENCH_SOURCE):
+       $(call DOWNLOAD,$(LMBENCH_SITE),$(LMBENCH_SOURCE))
+
+$(LMBENCH_DIR)/.unpacked: $(DL_DIR)/$(LMBENCH_SOURCE)
+       $(LMBENCH_CAT) $(DL_DIR)/$(LMBENCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(LMBENCH_DIR) package/lmbench lmbench-$(LMBENCH_VERSION)\*.patch
+       $(CONFIG_UPDATE) $(LMBENCH_DIR)
+       sed -i 's/CFLAGS=/CFLAGS+=/g' $(LMBENCH_DIR)/src/Makefile
+       touch $@
+
+$(LMBENCH_DIR)/bin/$(ARCH)/$(LMBENCH_BIN): $(LMBENCH_DIR)/.unpacked
+       $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC=$(TARGET_CC) -C $(LMBENCH_DIR)/src
+
+$(TARGET_DIR)/$(LMBENCH_TARGET_BIN): $(LMBENCH_DIR)/bin/$(ARCH)/$(LMBENCH_BIN)
+       $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC=$(TARGET_CC) BASE=$(TARGET_DIR)/usr -C $(LMBENCH_DIR)/src install
+
+lmbench: $(TARGET_DIR)/$(LMBENCH_TARGET_BIN)
+
+lmbench-source: $(DL_DIR)/$(LMBENCH_SOURCE)
+
+lmbench-clean:
+       -$(MAKE) -C $(LMBENCH_DIR)/src clean
+
+lmbench-dirclean:
+       rm -rf $(LMBENCH_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_PACKAGE_LMBENCH),y)
+TARGETS+=lmbench
+endif