SRCS= xcpustate.c Bar.c s.c rstat.c rstat_clnt.c rstat_xdr.c 
OBJS= $(SRCS:.c=.o)

#  Things to consider adding to DEFS:
#
#  -DRSTAT -- support the rstat protocol for querying the rstatd running
#             on remote machines (using the -host option).  There's no harm 
#             in leaving this in, unless you think your users will query
#             machines they shouldn't.
#  -DSHOWAVG -- this has no effect except on Linux machines.  If defined,
#             a CPU bar showing the "average" CPU will be added.  
#  -DDEF_FONT -- the default font.  Leave this alone unless you don't want
#             to use the X default font (XtdefaultFont).  To force
#             a particular font, e.g. 9x15, -DDEF_FONT=\"9x15" will work.
#  -DDEF_INTERVAL -- the default update interval, normally 1 second.  This is
#             used when one isn't specified via the command line or an X 
#             resource. e.g. -DDEF_INTERVAL=2.5
#  -DINTERVAL_MIN -- the minimum interval, normally 0 seconds.  Set this
#             to something greater to keep xcpustate from overloading your
#             network or x-server with traffic, which it can easily do if
#             a small interval (e.g. 0.01 seconds) is specified.  For example,
#             to prevent intervals less than half a second, use 
#             -DINTERVAL_MIN=0.5

DEFS= -DRSTAT
CC= cc
RM= rm -f
SHAR= shar

# edit the MACH* flags for your architecture

# SunOS 4.x/openwin

# MACHDEFS= -DSUNOS4 # -DOMNI
# MACHLIBS= -lkvm
# MACHLIBDIR= -L/usr/openwin/lib
# MACHINCDIR= -I/usr/openwin/include

# SunOS 5.x/openwin

# MACHDEFS= -DSUNOS5
# MACHLIBS= -lkstat -lelf -lsocket -lnsl -lgen
# MACHLIBDIR= -L/usr/openwin/lib -R/usr/openwin/lib
# MACHINCDIR= -I/usr/openwin/include

# AIX 4.x

# MACHDEFS= -DSMP -DSYSV
# MACHLIBS= 
# MACHLIBDIR=
# MACHINCDIR= 

# Cygwin 1.3.22
# CC=gcc -traditional-cpp
# MACHDEFS= 
# MACHLIBS= -lrpc -lxpm -lSM -lICE
# MACHLIBDIR= -L/usr/X11R6/lib
# MACHINCDIR= 

# Operating Systems with X in /usr/X11R6
# MACHDEFS= 
# MACHLIBS= 
# MACHLIBDIR= -L/usr/X11R6/lib -R/usr/X11R6/lib
# MACHINCDIR=  -I/usr/X11R6/include

# Put definitions for your own machine here, if necessary.

MACHDEFS= 
MACHLIBS= 
MACHLIBDIR=
MACHINCDIR= 

CFLAGS = -O $(MACHINCDIR) $(DEFS) $(MACHDEFS)

XLIBS= -lXaw -lXmu -lXt -lXext -lX11
LIBDIR= $(MACHLIBDIR)

xcpustate: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LIBDIR) $(XLIBS) $(MACHLIBS)

clean: 
	$(RM) *.o xcpustate

veryclean: clean
	$(RM) rstat_* rstat.h xcpustate-*.shar Makefile

shar:
	$(SHAR) `awk '{print $$1}' MANIFEST` >xcpustate-`awk '{print $$7;exit}' patchlevel.h`.shar

rstat.c: rstat.h

rstat.h rstat_clnt.c rstat_xdr.c: rstat.x
	rpcgen rstat.x



syntax highlighted by Code2HTML, v. 0.9.1