# Makefile for slice
#
# Originally contributed at mailsplit, written by:
#   R E Quin, October 1986 University of Warwick (UK) Computer Science
#   warwick!req     +44 203 523193
#
# Modified and recontributed by:
#   Gary Puckering        3755 Riverside Dr.
#   Cognos Incorporated   Ottawa, Ontario
#   (613) 738-1440        CANADA  K1G 3N3
#
# This makefile is intended for the sys5 Augmented make.
# 
MAKE=make 
CLEAN=clean 
CC=cc 

# R is the root of the filesystem -- i.e. where to install things.
# PROG is what to make; BINDIR is where to put it.
# The binaries are installed in $R/$(BINDIR).
R=/usr/local
BINDIR=$R/bin
MANDIR=$R/man/man1
PROG=slice 
MANPAGE=slice.1

# HACKS are for -DBUGFIX style things.
HACKS=

# For BSD 4.2 or 4.3
USG=

# For USG System V version
# USG=-DUSG -lPW

CFLAGS=-O $(HACKS) $(USG)


# "make install " does a $(MAKE) $(CLEAN) at the end, so you can say
# CLEAN=  make -e install
# if you don't want to remove the garbage at the end, for example.
# This is useful primarily for testing the install: entry!

all: $(PROG)
 
slice: opts.h slice.o
	$(CC) $(CFLAGS) -o $(PROG) slice.o
 
install: slice slice.1
	chmod a+x $(PROG)
	/bin/cp $(PROG) $(BINDIR)
	chmod a+r $(MANPAGE)
	/bin/cp $(MANPAGE) $(MANDIR)
	$(MAKE) $(CLEAN)
 
clean: 
	rm -rf core *.o $(PROG) a.out
