#
#	Makefile for uustatus and findpath
#	...by Robert J. Granvin
#	January 26, 1989
#


#
#	You will need to be root to make the install.
#
#	If you are running SVR4, you'll need to "-DSVR4".
#
#	If you want uustatus to display sites marked as WRONG TIME TO CALL,
#	add -DWTTC to the FLAGS line.  (This is only valid for uustatus).
#
#	Add -DNEEDDIRENT to FLAGS if you don't have /usr/include/dirent.h,
#	or want to use the supplied dirent.h.
#
#	Define OWNER and GROUP to be the same as UUCPOWN and UUCPGRP as
#	defined in uustatus.h
#
#	Define BINDIR to where you want the binaries installed.
#

#	XENIX
#
# FLAGS=-O -DM_XENIX -DWTTC -DNEEDDIRENT
FLAGS=-O -DM_XENIX -DWTTC
LIBS=-lcurses -ltermcap
CC=cc
# LIBS=-lcurses
#
#	SUN
#
#FLAGS=-g -DSUN -DWTTC -DBINDIR="$(BINDIR)"
#LIBS=-lcurses -ltermcap
#CC=/usr/5bin/cc
#
#
#
OWNER=uucp
GROUP=uucp
BINDIR=/usr/local/bin


all:	uustatus findpath

uustatus:	uustatus.c uustatus.h basename.fun touch.fun
	$(CC) $(FLAGS) -o uustatus uustatus.c $(LIBS)

findpath:	findpath.c basename.fun strrep.fun
	$(CC) $(FLAGS) -o findpath findpath.c -lPW

clean:
	rm -f *.o core

clobber: clean
	rm -f uustatus findpath

install: uustatus_only findpath_only

uustatus_only: uustatus
	rm -f $(BINDIR)/uustatus 
	strip uustatus
	cp uustatus $(BINDIR)
	chown $(OWNER) $(BINDIR)/uustatus
	chmod 4755 $(BINDIR)/uustatus

findpath_only: findpath
	rm -f $(BINDIR)/findpath 
	strip findpath
	cp findpath $(BINDIR)
	chmod 755 $(BINDIR)/findpath

