CFLAGS=-O2 -m486 -Wall
LDFLAGS=-s -N

DIST=README Makefile identd.c identd.lsm rfc1413.txt

identd: identd.c

install: identd
	@echo Installing /usr/etc/in.identd
	cp identd /usr/etc/in.identd
	@if ! grep -q '^auth' /etc/inetd.conf ; \
	then echo 'Adding line to /etc/inetd.conf.  kill -HUP the inetd pid to make it active.'; \
	echo 'auth	stream	tcp	nowait	root	/usr/etc/tcpd	in.identd' >> /etc/inetd.conf; \
	@if ! grep -q '^auth' /etc/services ; \
	then echo 'Adding line to /etc/service.'; \
	echo 'auth		113/tcp		authentication' >> /etc/services; \
	fi

identd-0.1.tar.gz: FORCE
	$(RM) identd-0.1.tar.gz
	mkdir identd-0.1
	cp $(DIST) identd-0.1
	tar cfz identd-0.1.tar.gz identd-0.1
	$(RM) -r identd-0.1

.PHONY: FORCE
