#  	Copyright (c) 1988 Cascade Research
# 	  All Rights Reserved              
# 
#  	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF CASCADE RESEARCH
# 	The copyright notice above does not evidence any actual or     
# 	intended publication of such source code                       
# 
# 	@(#)Makefile	1.2 */
# 
#  WHO	MODIFICATION				DATE DONE
#  ---  -------------------------------------   ---------
#  cbs	Creation of Makefile for call.c		12-Apr-88

# Comment out if you don't have HonneyDANBER lockfiles.
HDB		= 1

# Full path to file containing list of valid systems for call.
CALLFILE	= /usr/lib/uucp/Call-sys

# Full path to call log file.
LOGFILE		= /usr/lib/uucp/Call-log

# Sprintf string for pathname of lockfile.
LOCKFILE	= /usr/spool/locks/LCK..%s

# Full path to kermit executable.
KERMIT		= /usr/local/bin/kermit

# Full path to cu executable.
CU		= /usr/bin/cu

# User and group id for uucp (used to chown the device back after call).
UIDUUCP		= 5
GIDUUCP		= 5

# Mode of device for kermit and uucp/cu (used to chmod the device during call). 
MODKER		= 00600
MODUUCP		= 00622

DEFS		= -DHDB=\"$(HDB)\" -DCALLFILE=\"$(CALLFILE)\" \
		  -DLOGFILE=\"$(LOGFILE)\" -DLOCKFILE=\"$(LOCKFILE)\" \
		  -DKERMIT=\"$(KERMIT)\" -DCU=\"$(CU)\" \
		  -DUIDUUCP=\"$(UIDUUCP)\" -DGIDUUCP=\"$(GIDUUCP)\" \
		  -DMODKER=\"$(MODKER)\" -DMODUUCP=\"$(MODUUCP)\"

# Directory for call executable
BINDIR		= /usr/local/bin

# Directory for call manual page ([nt]roff form)
MANDIR		= /usr/man/l_man/man1

############################################################################

SRC		= call.c
OBJ		= call.o
MAN		= call.1L
CFLAGS		= -O ${DEFS}
LFLAGS		=
LINTFLAGS	= ${DEFS}
ROFF		= psroff -man
LP		= remsh bugs rlp pluto

call:		$(OBJ)
		cc $(LFLAGS) $(OBJ) -o call

man:
		$(ROFF) $(MAN)
print:
		pr Makefile call.c | $(LP)
		$(ROFF) $(MAN) | $(LP)
clean:	
		-rm -f $(OBJ) call

install:
		-cp call $(BINDIR)
		-cp Call-sys $(CALLFILE)
		-cp call.1 $(MANDIR)
		-chmod 4555 $(BINDIR)/call
		-chown root $(BINDIR)/call
		-chgrp bin $(BINDIR)/call
		-chmod 600 $(CALLFILE)
		-chown root $(CALLFILE)
		-chgrp bin $(CALLFILE)
		-chmod 444 $(MANDIR)/call.1
