# Makefile for top level of lmbench
# $Id: Makefile,v 1.5 1994/11/26 01:52:57 lm Exp $

# Possible things to make:
#
# build		(default) go to the source directory and build the benchmark
# results	go to the source directory and build and run the benchmark
# rerun		run the benchmark again
# see		see the results that came with this release
#		Go to the Results directory and read the Makefile.
# doc.lpr	print the documentation
# doc.x		preview the documentation (needs X, groff, pic, etc)
# clean		go to the subdirs and make clean
# get		make sure all files are checked out
# shar		build a shippable shar archive

SHELL=/bin/sh

build:
	cd src && make

results:
	cd src && make results

rerun:
	cd src && make rerun

see:
	cd Results && make summary percent | more

doc.lpr:
	cd doc && make PS && lpr *.PS

doc.x:
	cd doc && make x

clean:
	for i in doc src Results scripts; do \
		echo ===== $$i =====; \
		(cd $$i && co -q Makefile && make clean); \
	done
	/bin/rm -f bin/*
	rccs clean -s -e

get:
	for i in doc src Results scripts; do \
		echo ===== $$i =====; \
		(cd $$i && rccs get -s); \
	done
	rccs get -s

info:
	for i in doc src Results scripts; do \
		echo ===== $$i =====; \
		(cd $$i && rccs info); \
	done

# XXX - . must be named lmbench for this to work
shar:
	make clean
	co -q Makefile
	make get
	cd .. && \
	find lmbench -type f -print  | egrep -v 'noship|RCS' > /tmp/FILES
	cd .. && shar -S -a -n lmbench1.0 -L 50K < /tmp/FILES 
