#
#	Definitions
#	Edit this...
#
CUNAME=cu			 	# the name of the executable cu
CU=/usr/local/bin/$(CUNAME)		# install destination
MAN=/usr/man/LOCAL/cu			# destination for manual pages

#
#	Compile the cu.
#
cu:		cu.c modemcap.h
		cc cu.c -o cu

#
#	Format the manual pages.
#
manual:		
		nroff cu.man.r >cu.man
		mv cu.man $(MAN)
		chown bin $(MAN)
		chgrp bin $(MAN)
		chmod a-w $(MAN)

#
#	The installation script.
#	This should be called by root only.
#

install:	cu manual
		strip cu
		chown root cu
		chgrp root cu
		mv cu $(CU)
		chmod +s,go-rw $(CU)

#
#	Clean up ...
#
clean:
		rm -f cu core cu.man cu.o

