#
# Makefile for in.swhoisd
#
#TARGETDIR=/usr/sbin
TARGETDIR=/usr/local/sbin

LIBS=

all:	in.swhoisd whois

whois: whois.c
	gcc -o $@ $(LIBS) $@.c
	strip $@

in.swhoisd: in.swhoisd.c
	gcc -o $@ $(LIBS) $@.c
	strip $@

install: in.swhoisd
	cp -p in.swhoisd ${TARGETDIR}
	chown root:root ${TARGETDIR}/in.swhoisd
	chmod go-w ${TARGETDIR}/in.swhoisd
	cp -p swhoisd.header swhoisd.footer swhoisd.conf.sample /etc
	chown root:root /etc/swhoisd.header /etc/swhoisd.footer
	chown root:root /etc/swhoisd.conf.sample
	chmod go-w /etc/swhoisd.header /etc/swhoisd.footer
	chmod go-w /etc/swhoisd.conf.sample

clean:	
	rm -f core *.core *.o *.BAK *~ *.out

clobber: clean	
	rm -f in.swhoisd whois


