# Makefile for XC
# This file was generated on Thu Apr 15 13:17:52 1993 GMT for COHERENT

BINMODE	= 4755
CATMAN	= 
CC		= cc
CFLAGS	= -O
GROUP	= uucp
INSDIR	= /usr/local/bin
LIBDIR	= /usr/local/lib/xc
#LDFLAGS	= -lcurses 
LDFLAGS	= -lterm 
MANDIR	= /usr/man/LOCAL
MANEXT	= 
MANMODE	= 0644
OWNER	= uucp

# you should have all of these files:

MANIFEST	=\
	.aus\
	.autocis\
	.callhq\
	.cisdial\
	.exrc\
	.pass\
	.phonelist\
	.rz\
	.sz\
	.temp_opt\
	.uni\
	.xc\
	Configure\
	Copyright\
	Makefile\
	Makefile.in\
	README\
	bsdinst.sh\
	call\
	callback\
	cisdownload\
	myman\
	xc.h.in\
	xc.nro\
	xcb+.c\
	xcdbglog.c\
	xcdial.c\
	xcmain.c\
	xcport.c\
	xcscrpt.c\
	xcsubs.c\
	xcterm.c\
	xcxmdm.c

OBJS =	xcb+.o\
		xcdbglog.o\
		xcdial.o\
		xcmain.o\
		xcport.o\
		xcscrpt.o\
		xcsubs.o\
		xcterm.o\
		xcxmdm.o

all:	xc
	@echo "All targets are up to date"
	@echo "Now you must execute 'make install'"

xc:		$(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o xc $(LDFLAGS) 

install: 	xc
	-mv $(INSDIR)/xc $(INSDIR)/xc-
	-chmog $(BINMODE) $(OWNER) $(GROUP) $(INSDIR)/xc
	-@ls -l ./xc $(INSDIR)/xc $(INSDIR)/xc-
	@echo
	@echo "The sample xc scripts (.aus .autocis .callhq .cisdial .exrc"
	@echo ".pass .phonelist .rz .sz .temp_opt .uni .xc) should be manually"
	@echo "moved to the $(LIBDIR) directory.  The shell scripts (call"
	@echo "callback cisdownload) should be moved to the $(INSDIR) directory."
	@echo
	@echo "We do not do this automatically, as you may want to recompile xc"
	@echo "with different options, yet not touch these scripts once you've"
	@echo "personalized them with your own passwords and telephone numbers."

install.man:	xc.out
	./bsdinst.sh -c -m $(MANMODE) xc.out $(MANDIR)/xc.$(MANEXT)
	touch install.man

xc.out:	xc.man
	if $(CATMAN); then				\
		nroff xc.man | col >xc.out;	\
	else							\
			cat xc.man >xc.out;		\
	fi

xc.man:	myman xc.nro
	cat myman xc.nro | grep -v '^\.tm ' | tbl >xc.man

clean:;	rm -f $(OBJS) xc xc.man xc.out core man catman\
		configure.out Makefile.xc xc.h *~ *\#

$(OBJS):	xc.h

shar:
	shar -awF -L51 -nXC -oXC -s jpr@jpr.com $(MANIFEST)
	@ls -l XC.??

taz:
	tar cf - $(MANIFEST) | compress > XC.TAR.Z
	@ls -l *.Z

tah:
	tar cf - $(MANIFEST) | compress -H > XC.TAR.Z
	@ls -l *.Z

lha:
	lha c XC $(MANIFEST)
	@ls -L XC.A XC.lha

shark:
	shark $(MANIFEST) > XC.SHK
	@ls -l *SHK
