# Makefile for lmbench results.
# $Id$
#
# Usage: make [ LIST="aix/* sunos/* ..." ] [ what ]
#
# What to make:
#	print			Prints the results 1 per page.
#	ps			Saves the postscript of 1 per page in PS/PS
#	4.ps			Saves the postscript of 4 per page in PS/PS4
#	8.ps			Saves the postscript of 8 per page in PS/PS8
#	x			Previews 1 per page using groff -X
#	summary	[default]	Ascii summary of the results
#	stats			Do statistics over a set of results
#	roff			Print the ascii summaries into a roff file
#	slides			Makes the pic for inclusion in slides
#
# This Makefile requires groff, gpic, and perl.  You could try it with
# other *roff processors; I have no idea if it works.
#
# XXX - this is all out of date.
#
# There are three sorts of graphical results:
#
# 1. Bargraphs comparing each system in the LIST on the measurements listed
#    in the BG list below (pretty much everything).
# 2. A 2-D graph for each system in LIST, displaying context switch times
#    as a function of (# of processes, size of each process).
# 3. A 2-D graph for each system in LIST, displaying memory read times as
#    a function of (stride size, memory size).
#
# The bargraphs are in a format of my own - the perl script in scripts
# called bargraph takes them as input and produces pic as output.
# It is a pretty straightforward format, you could probably incorparate
# into some Windows spreadsheet if you wanted to.  See tmp/*.bg after
# running make in this directory.
#
# The 2-D graphs are in a format that can (probably) be read by Xgraph.
# I've added a few extensions for titles, etc., that you could just
# take out.  See tmp/mem.* after running a make in this directory.
#
# This Makefile is of marginal usefulness to a site with just one machine.
# I intend to make results available so that people can compare, as well
# as a service where you can compare your results against the "best of
# the breed" for each vendor, as well as against best of the lot.

# List of result files to process.  Defaults to everything.
LIST=	`$(SCRIPTS)getlist $(LST)`	

# Grrrrr
SHELL=/bin/sh

SCRIPTS=../scripts/
SRCS= ../scripts/allctx ../scripts/allmem ../scripts/bargraph \
	../scripts/bghtml ../scripts/getbg ../scripts/getbw \
	../scripts/getctx ../scripts/getdisk ../scripts/getlist \
	../scripts/getmax ../scripts/getmem ../scripts/getpercent \
	../scripts/getresults ../scripts/getsummary ../scripts/gifs \
	../scripts/graph ../scripts/html-list ../scripts/html-man \
	../scripts/os ../scripts/percent ../scripts/save \
	../scripts/stats ../scripts/xroff 

MISC=	tmp/misc_mhz.bg \
	tmp/lat_ctx.bg \
	tmp/lat_ctx8.bg \
	tmp/lat_nullsys.bg \
	tmp/lat_signal.bg \
	tmp/lat_pagefault.bg \
	tmp/lat_mappings.bg \
	tmp/lat_fs_create.bg

PROC=	tmp/lat_nullproc.bg \
	tmp/lat_simpleproc.bg \
	tmp/lat_shproc.bg

LATENCY= \
	tmp/lat_pipe.bg \
	tmp/lat_connect.bg \
	tmp/lat_udp_local.bg \
	tmp/lat_rpc_udp_local.bg \
	tmp/lat_tcp_local.bg  \
	tmp/lat_rpc_tcp_local.bg 

BANDWIDTH= \
	tmp/bw_pipe.bg \
	tmp/bw_tcp_local.bg \
	tmp/bw_file.bg \
	tmp/bw_reread.bg \
	tmp/bw_mmap.bg \
	tmp/bw_bcopy_libc.bg \
	tmp/bw_bcopy_unrolled.bg \
	tmp/bw_mem_rdsum.bg \
	tmp/bw_mem_wr.bg

BG=	$(MISC) $(PROC) $(LATENCY) $(BANDWIDTH)

MK=@$(MAKE) -s
PRINT=groff -p | lpr -h
PS=groff -p | $(SCRIPTS)save PS/PS
PS8UP=groff -p | mpage -P- -8 -a | $(SCRIPTS)save PS/PS8
PS4UP=groff -p | mpage -P- -4 -a | $(SCRIPTS)save PS/PS4
SIZE=-big 
IMAGE=pbm
CLOSE=
GMEM=$(CLOSE) -grid -logx -xm -below
GCTX=$(CLOSE) -grid -below
GDISK=-below -close -grid -nolines
#IMAGE=gifmono

summary: $(SRCS)
	@$(SCRIPTS)getsummary $(LIST)

per                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        