AUTOMAKE_OPTIONS= foreign
sbin_PROGRAMS	= ypbind
ypbind_SOURCES	= ypbind.c slave.c xdr_ypbind.c daemon.c openmax.c \
		  lockreg.c locktest.c errorlog.c readn.c writen.c \
		  daemon.h ourhdr.h ypbind.h
man_MANS	= ypbind.8

CFLAGS		= @CFLAGS@ @WARNFLAGS@
LDADD		= @RESOLV@
EXTRA_DIST	= yp.conf.example

ypbind.8: ypbind.man
	-$(RM) -f $@
	cd $(top_builddir) && sed -e "s+@SBINDIR@+${sbindir}+g" $< > $@ || $(RM) $@

dist-hook:
	-mkdir $(distdir)/rpcsvc
	-cp -p rpcsvc/yp_prot.h $(distdir)/rpcsvc

.DELETE_ON_ERROR:
