xref: /freebsd/usr.sbin/sendmail/Makefile (revision 17d6c636720d00f77e5d098daf4c278f89d84f7b)
1#	@(#)Makefile	8.8 (Berkeley) 3/28/97
2# $FreeBSD$
3
4MAINTAINER=	gshapiro@FreeBSD.org
5
6SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
7SMDIR=	${SENDMAIL_DIR}/src
8.PATH: ${SMDIR}
9
10BINDIR=	/usr/libexec/sendmail
11
12PROG=	sendmail
13MAN=	mailq.1 newaliases.1 aliases.5 sendmail.8
14SRCS=	alias.c arpadate.c bf_torek.c clock.c collect.c conf.c control.c \
15	convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c \
16	macro.c main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \
17	readcf.c recipient.c savemail.c sfsasl.c shmticklib.c srvrsmtp.c \
18	stab.c stats.c sysexits.c timers.c trace.c udb.c usersmtp.c util.c \
19	version.c
20BINOWN=	root
21BINMODE=4555
22
23# Define the database format to use for aliases et al.
24DBMDEF=	-DNEWDB
25# If you don't want NIS alias/map support, comment out this line
26NIS=	-DNIS
27# Map extensions
28MAPS=	-DMAP_REGEX
29
30CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include
31CFLAGS+= ${DBMDEF} ${NIS} -DNETINET6 -DTCPWRAPPERS ${MAPS}
32
33DPADD=	${LIBUTIL} ${LIBWRAP}
34LDADD=	-lutil -lwrap
35
36.if exists(${.OBJDIR}/../../lib/libsmutil)
37LIBSMUTILDIR:=	${.OBJDIR}/../../lib/libsmutil
38.else
39LIBSMUTILDIR!=	cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
40.endif
41LIBSMUTIL:=	${LIBSMUTILDIR}/libsmutil.a
42
43DPADD+=	${LIBSMUTIL}
44LDADD+=	${LIBSMUTIL}
45
46.if exists(${.CURDIR}/../../secure) && !defined(NOCRYPT) && \
47	!defined(NOSECURE) && !defined(NO_OPENSSL) && \
48	!defined(RELEASE_CRUNCH)
49# STARTTLS support
50DISTRIBUTION=	crypto
51CFLAGS+=	-DSTARTTLS -D_FFR_TLS_O_T -D_FFR_TLS_1 -D_FFR_TLS_TOREK
52LDADD+=		-lssl -lcrypto
53DPADD+=		${LIBSSL} ${LIBCRYPTO}
54.endif
55
56# User customizations to the sendmail build environment
57CFLAGS+=${SENDMAIL_CFLAGS}
58DPADD+=${SENDMAIL_DPADD}
59LDADD+=${SENDMAIL_LDADD}
60LDFLAGS+=${SENDMAIL_LDFLAGS}
61
62afterinstall:
63	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/sendmail.cf -a \
64	      ! -f ${DESTDIR}/etc/mail/sendmail.cf ]; then \
65		set -x; \
66		mv -f ${DESTDIR}/etc/sendmail.cf \
67		    ${DESTDIR}/etc/mail/sendmail.cf; \
68	fi
69
70.include <bsd.prog.mk>
71