#	from: @(#)Makefile	5.6 (Berkeley) 9/27/90
#	$Id: Makefile,v 1.2 1996/09/12 08:26:47 sjg Exp $

PROG=	rdistd
MAN=	rdistd.8

SRCS= rdistd.c server.c filesys.c filesys-os.c

SRCS+= common.c message.c setargs.c

RDISTSRC?=${.CURDIR}/src
.PATH:	${RDISTSRC}/src

CFLAGS+= -U_ANSI_SOURCE -UUSE_SSL
CFLAGS+=  -I${.CURDIR}/../rdist/obj.${MACHINE} -I${.CURDIR}/../rdist
CFLAGS+= -I${RDISTSRC}/include -I${RDISTSRC}/config
.if ${MACHINE} == "i386" || ${MACHINE} == "sparc"
CFLAGS+= -DOS_H=\"os-netbsd1.h\"
LDADD+= -L/usr/lib -lcompat
.elif ${MACHINE} == "sun386i"
CFLAGS+= -DOS_H=\"os-sunos4.h\"
.else
CFLAGS+= -DOS_H=\"os-`${RDISTSRC}/config/os-type`.h\"
.endif

.include <bsd.prog.mk>

BINDIR=/usr/local/bin

rdistd.8: ${RDISTSRC}/doc/rdistd.man
	ln -s ${RDISTSRC}/doc/rdistd.man $@
