#	@(#)Makefile	5.3 (Berkeley) 5/11/90
#
#	RIPE version marten@ripe.net
#	1.2 92/07/24

# There are three defines that can be used:
#
# RIPE	- Have whois.ripe.net as default host, and have a "-a" flag to
#	  search not only the RIPE database but also the NSF and US NIC
#	  databases

# CLEVER- Use a educated guess of the whereabouts of the nearest server
#	  This is done by taking the top-level domain of the current
#	  machine, and looking for a CNAME record for a server with name
#	  <top-level-domain>-whois.ripe.net
#	  If this machine does not exsist or the current machine's top-level
#	  domain could not be found,it will fall back to whois.ripe.net
#	  the default for this RIPE version of whois
#	  The CLEVER option implies the RIPE option.

# TOPDOMAIN=\"<top-level-domain>\"
#	- This option will fix the default host to be
#	  <top-level-domain>-whois.ripe.net, which may point to a secondary
#	  server inside your top-level domain. If there is no such secondary
#	  server, it will point to whois.ripe.net, the default. This option
#	  overrules the CLEVER option.
#	  The TOPDOMAIN option implies the RIPE option.

DEFINES= -DRIPE
PROG=	 whois
DESTDIR= /usr/ucb
MANDIR=  /usr/man/man1
LIBS=    -lresolv
LIBS=
CFLAGS=  -O ${DEFINES}

whois: Makefile whois.c
	cc ${CFLAGS} whois.c -o ${PROG} ${LIBS}

install: ${PROG}
	install -c -s -m 755 ${PROG} ${DESTDIR}
	install -c    -m 444 whois.man ${MANDIR}/whois.1

clean:
	rm -f whois.o whois core ripe-whois.tar*

dist: whois.c Makefile README whois.man
	tar cvf ripe-whois.tar whois.c Makefile README whois.man
	compress ripe-whois.tar
