# Makefile for XC
# This file was generated by Configure on {{DATE}} by {{USER}}

BINMODE	= 755 
CATMAN	= /usr/man/cat1 
CC	= gcc 
CFLAGS	= -O3 -DRLINE
GROUP	= root 
INSDIR	= /usr/local/bin 
LIBDIR	= /usr/local/lib/xc 
LDFLAGS	= -ltermcap editline/libedit.a -s
MANDIR	=  /usr/man/man1 
MANEXT	= 1 
MANMODE	= 0444
OWNER	= root 
SHELL	= /bin/sh
# you should have all of these files:

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

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

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

zmodem:
	cd rzsz ;  $(MAKE) all

install: all
	@echo " "
	-chmod $(BINMODE) xc
	-mv xc $(INSDIR) 
	cd rzsz ; $(MAKE) install
	@echo " "
	@echo " "
	@echo "You will want to manually install 'phonelist' and"
	@echo "the 'xc.init' files in $(LIBDIR). Or alternatively they"
	@echo "may be installed in your home directory. Be careful not"
	@echo "to clobber your old versions!"
	@echo " "
	@echo "See the 'dotfiles' directory for sample scripts."
	@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."
	@echo " "

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 core  

clobber:	
	rm -f $(OBJS) xc core  
	cd editline ; $(MAKE) clean 
	cd rzsz ; $(MAKE) clean

$(OBJS): xc.h

eline:
	cd editline ; $(MAKE) all

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
