summaryrefslogtreecommitdiffstats
path: root/rules/memtester.make
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2005-07-15 08:21:23 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2005-07-15 08:21:23 +0000
commit7672fc7434944a8e486f41cdfe96ddef1aaa2530 (patch)
tree73ff7df6487dd02c04a99e04eac880f6c03dae02 /rules/memtester.make
parent17703f84211d9ef3a86a0db9317dfff45a6360ce (diff)
downloadptxdist-7672fc7434944a8e486f41cdfe96ddef1aaa2530.tar.gz
ptxdist-7672fc7434944a8e486f41cdfe96ddef1aaa2530.tar.xz
added memtester
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@2950 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/memtester.make')
-rw-r--r--rules/memtester.make143
1 files changed, 143 insertions, 0 deletions
diff --git a/rules/memtester.make b/rules/memtester.make
new file mode 100644
index 000000000..0c9e6cac4
--- /dev/null
+++ b/rules/memtester.make
@@ -0,0 +1,143 @@
+# -*-makefile-*-
+# $Id: template 2922 2005-07-11 19:17:53Z rsc $
+#
+# Copyright (C) 2005 by Sascha Hauer
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+ifdef PTXCONF_MEMTESTER
+PACKAGES += memtester
+endif
+
+#
+# Paths and names
+#
+MEMTESTER_VERSION = 4.0.5
+MEMTESTER = memtester-$(MEMTESTER_VERSION)
+MEMTESTER_SUFFIX = tar.gz
+MEMTESTER_URL = http://pyropus.ca/software/memtester/$(MEMTESTER).$(MEMTESTER_SUFFIX)
+MEMTESTER_SOURCE = $(SRCDIR)/$(MEMTESTER).$(MEMTESTER_SUFFIX)
+MEMTESTER_DIR = $(BUILDDIR)/$(MEMTESTER)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+memtester_get: $(STATEDIR)/memtester.get
+
+memtester_get_deps = $(MEMTESTER_SOURCE)
+
+$(STATEDIR)/memtester.get: $(memtester_get_deps)
+ @$(call targetinfo, $@)
+ @$(call get_patches, $(MEMTESTER))
+ touch $@
+
+$(MEMTESTER_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, $(MEMTESTER_URL))
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+memtester_extract: $(STATEDIR)/memtester.extract
+
+memtester_extract_deps = $(STATEDIR)/memtester.get
+
+$(STATEDIR)/memtester.extract: $(memtester_extract_deps)
+ @$(call targetinfo, $@)
+ @$(call clean, $(MEMTESTER_DIR))
+ @$(call extract, $(MEMTESTER_SOURCE))
+ @$(call patchin, $(MEMTESTER))
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+memtester_prepare: $(STATEDIR)/memtester.prepare
+
+#
+# dependencies
+#
+memtester_prepare_deps = \
+ $(STATEDIR)/memtester.extract \
+ $(STATEDIR)/virtual-xchain.install
+
+MEMTESTER_PATH = PATH=$(CROSS_PATH)
+MEMTESTER_ENV = $(CROSS_ENV)
+#MEMTESTER_ENV += PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig
+#MEMTESTER_ENV +=
+
+$(STATEDIR)/memtester.prepare: $(memtester_prepare_deps)
+ @$(call targetinfo, $@)
+ echo "all: memtester" > $(MEMTESTER_DIR)/Makefile.ptxdist
+ echo "memtester: tests.o memtester.o" >> $(MEMTESTER_DIR)/Makefile.ptxdist
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+memtester_compile: $(STATEDIR)/memtester.compile
+
+memtester_compile_deps = $(STATEDIR)/memtester.prepare
+
+$(STATEDIR)/memtester.compile: $(memtester_compile_deps)
+ @$(call targetinfo, $@)
+ cd $(MEMTESTER_DIR) && $(MEMTESTER_ENV) $(MEMTESTER_PATH) make -f Makefile.ptxdist
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+memtester_install: $(STATEDIR)/memtester.install
+
+$(STATEDIR)/memtester.install: $(STATEDIR)/memtester.compile
+ @$(call targetinfo, $@)
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+memtester_targetinstall: $(STATEDIR)/memtester.targetinstall
+
+memtester_targetinstall_deps = $(STATEDIR)/memtester.compile
+
+$(STATEDIR)/memtester.targetinstall: $(memtester_targetinstall_deps)
+ @$(call targetinfo, $@)
+
+ @$(call install_init,default)
+ @$(call install_fixup,PACKAGE,memtester)
+ @$(call install_fixup,PRIORITY,optional)
+ @$(call install_fixup,VERSION,$(MEMTESTER_VERSION))
+ @$(call install_fixup,SECTION,base)
+ @$(call install_fixup,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
+ @$(call install_fixup,DEPENDS,)
+ @$(call install_fixup,DESCRIPTION,missing)
+
+ @$(call install_copy, 0, 0, 0755, $(MEMTESTER_DIR)/memtester, /usr/sbin/memtester)
+
+ @$(call install_finish)
+
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+memtester_clean:
+ rm -rf $(STATEDIR)/memtester.*
+ rm -rf $(IMAGEDIR)/memtester_*
+ rm -rf $(MEMTESTER_DIR)
+
+# vim: syntax=make