PROG=	smtp-vilter
SRCS=	smtp-vilter.c conf.c socket.c

CFLAGS+= -pthread -Wall -I../../include -I/usr/src/gnu/usr.sbin/sendmail/include 
LDADD+=  -lpthread -lmilter -L/usr/local/lib -lm

PIPE=	-pipe

MAN=	smtp-vilter.8 smtp-vilter.conf.5
MANDIR= /usr/local/man/cat

BINOWN = 	root
BINMOD =	0555
BINDIR= 	/usr/local/sbin

.include <bsd.prog.mk> 

.if (${ELF_TOOLCHAIN:L} == "yes")
LDADD+= -export-dynamic
.endif

.if defined(WITH_LDAP)
CFLAGS+= -I/usr/local/include -DWITH_LDAP
LDADD+=	-lldap_r -llber
.elif defined(WANT_LDAP)
LDADD+=	-lldap_r -llber
.endif

.if !defined(WANT_LIBMILTER)
PROG=
SRCS=
.END:
	@echo "smtp-vilter requires a sendmail installation with milter support"
.endif

