
#
#	@(#)Makefile	5.3 (Berkeley) 5/11/90
#	1.2 92/07/24
#
#	whois RIPE version marten@ripe.net
#       the complete toolset + extension to whois david@ripe.net

#
# The following defines 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 other databases
#         that are mirrored by RIPE
# SYSV  - use this one for system V machines
#
# GLIBC - define this if you use GNU libc


DEFINES= -DRIPE
PROG=	 whois cryptpw
DESTDIR= /usr/local/bin
MANDIR=  /usr/local/man/man1
INSTALL= install
# LIBS=    -lresolv 
CFLAGS=  ${DEFINES}
#
# for BSDI
CC=shlicc2 -Wall -ansi -pedantic -O6 -m486
#
# for Linux
#CC=gcc -Wall -ansi -pedantic -O6 -m486
#LIBS=-lcrypt
#
# for most systems
#CC=gcc -Wall -ansi -pedantic -O6 -lsocket -lnsl 

all: $(PROG)

whois: Makefile whois.c
	$(CC) ${CFLAGS} whois.c -o whois ${LIBS}
	$(CC) ${CFLAGS} -DNETWORKUPDATE whois.c -o networkupdate ${LIBS}
	
cryptpw: Makefile cryptpw.c
	$(CC) ${CFLAGS} cryptpw.c -o cryptpw ${LIBS}

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

clean:
	rm -f whois.o whois cryptpw cryptpw.o networkupdate networkupdate.o core

CURRENTNAME=ripe-whois-tools-2.2

dist: whois.c cryptpw.c Makefile README whois.man
	[ -d $(CURRENTNAME) ] || mkdir $(CURRENTNAME)
	cp Makefile README whois.c cryptpw.c whois.man $(CURRENTNAME)
	tar cvf - $(CURRENTNAME) | gzip -c9 > $(CURRENTNAME).tar.gz
