home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.muug.mb.ca
/
2014.06.ftp.muug.mb.ca.tar
/
ftp.muug.mb.ca
/
pub
/
src
/
top
/
Makefile.orig
< prev
next >
Wrap
Makefile
|
1992-05-26
|
3KB
|
110 lines
# Makefile for "top", a top 10 process display for Unix
#
# This makefile is for top, version 2.5
#
# Written by William LeFebvre, Rice University graduate student
# installation information:
# OWNER - name (or uid) for the installed executable's owner
# GROUP - group name (or gid) for the installed executable's group
# MODE - mode for the installed executable (should start with a 0)
# BINDIR - directory where the executable should live
# MANDIR - directory where the manual page should live
# MAN - troff macros for manual pages
# TROFF - most appropriate troff command
OWNER = root
GROUP = staff
MODE = 755
BINDIR = /export/sun4/sunos4.1/Misc/Bin
MANDIR = /export/sun4/sunos4.1/Misc/Man/man1
MAN = man
TROFF = troff
# Values for the two defaults in "top":
# TOPN - default number of processes to display
# DELAY - default delay between updates
#
# set TOPN to -1 to indicate infinity (so that top will display as many
# as the screen will hold).
TOPN = -1
#TOPN = 10
DELAY = 5
TABLE =
# Top maintains an internal hash table for translating uid to username.
# This hash table must be big enough to hold every name in /etc/passwd.
# It is possible, but not necessary, to specify the hash table size in
# this Makefile. Just uncomment the following line and provide a number.
#TABLE = -DTable_size=
TARFILES = README Changes Changes.scs Makefile top.c commands.c display.c \
kernel.c screen.c utils.c getopt.c \
boolean.h layout.h screen.h top.h top.local.h bzero.c \
sigconv.awk top.man
CFILES = top.c commands.c display.c kernel.c screen.c utils.c getopt.c
OBJS = top.o commands.o display.o kernel.o screen.o utils.o getopt.o
LINTFLAGS = -x
# Top uses the preprocessor variables "sun", "pyr" and "scs" for specific
# changes required by Suns, Pyramids and Symmetrics. No changes to "CFLAGS"
# or "CDEFS" are required for these architectres.
# To make a version for 4.1, # uncomment the following two lines:
#CDEFS = -DFOUR_ONE
#OBJS = top.o commands.o display.o kernel.o screen.o getopt.o bzero.o
# To make a version for sunOS 4.0, uncomment the following two lines:
CDEFS = -Dsunos4
LIBS= -lkvm
CFLAGS = -O $(CDEFS)
all: top top.1
top: $(OBJS)
cc $(CFLAGS) -o top $(OBJS) -ltermcap -lm $(LIBS)
top.o: top.c Makefile
cc -c $(CFLAGS) $(TABLE) -DDefault_TOPN=$(TOPN) -DDefault_DELAY=$(DELAY) top.c
lint: sigdesc.h
lint $(LINTFLAGS) -DDefault_TOPN=$(TOPN) -DDefault_DELAY=$(DELAY) $(CFILES)
# include file dependencies
top.o: boolean.h layout.h screen.h top.h top.local.h
commands.o: sigdesc.h
display.o: boolean.h layout.h screen.h top.h top.local.h
kernel.o: top.local.h
screen.o: boolean.h screen.h
utils.o: top.h
# automatically built include file
sigdesc.h: sigconv.awk /usr/include/signal.h
awk -f sigconv.awk /usr/include/signal.h >sigdesc.h
# top.1 is built by combining the actual text with the default information
top.1: top.man Makefile
echo '.nr N' $(TOPN) > top.1
echo '.nr D' $(DELAY) >>top.1
cat top.man >>top.1
top.cat: top.1
nroff -$(MAN) top.1 | cat -s >top.cat
troff: top.1
$(TROFF) -man top.1
tar:
rm -f top.tar
tar cvf top.tar $(TARFILES)
clean:
rm -f *.o top top.cat top.tar top.1 core
install: top top.1
install -s -o $(OWNER) -m $(MODE) -g $(GROUP) top $(BINDIR)
install -c top.1 $(MANDIR)