#
# Makefile for nisttime and usnotime.
#
# Unixware uncomment the INSTALL=/usr/ucb/install and comment out the
# INSTALL=/usr/bin/install line.
#
# Set BINDIR and MANDIR to point where you want the executables and
# Manual pages
#
#
INSTALL=/usr/bin/install
# Unixware install program.
#INSTALL=/usr/ucb/install
BINDIR=/usr/local/bin
MANDIR=/usr/local/man/man8

nisttime: nisttime.c
	$(CC) -s -O -o nisttime nisttime.c

install: nisttime
	rm -f /$(BINDIR)/nisttime /$(BINDIR)/usnotime $(MANDIR)/nisttime.8
	rm -f $(MANDIR)/usnotime.8
	$(INSTALL) -o root -m 0755 -d $(BINDIR)
	$(INSTALL) -o root -m 0755 nisttime $(BINDIR)
	$(INSTALL) -o root -m 0755 -d $(MANDIR) 
	$(INSTALL) -o root -m 0644 nisttime.8 $(MANDIR)
	ln $(BINDIR)/nisttime $(BINDIR)/usnotime
	ln $(MANDIR)/nisttime.8 $(MANDIR)/usnotime.8
	@echo
	@echo
	@echo "Be sure to add the system names (nisttime and usnotime) and the"
	@echo "appropriate telephone numbers to the cu configuration files,"
	@echo "See nisttime(8) for example system name entries in an HDB style"
	@echo "cu configuration file.  See Chapter 12, \"Managing Taylor UUCP\""
	@echo "in the \"Linux Network Administrators' Guide\", for help with"
	@echo "Taylor UUCP configuration files."
	@echo

clean: nisttime
	rm -f nisttime 
