xref: /freebsd/usr.sbin/sendmail/Makefile (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1#	@(#)Makefile	8.8 (Berkeley) 3/28/97
2# $FreeBSD$
3
4.include <src.opts.mk>
5
6PACKAGE=sendmail
7SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
8SMDIR=	${SENDMAIL_DIR}/src
9.PATH: ${SMDIR}
10
11BINDIR=	${LIBEXECDIR}/sendmail
12
13PROG=	sendmail
14MAN=	mailq.1 newaliases.1 aliases.5 sendmail.8
15MLINKS+=sendmail.8 hoststat.8
16MLINKS+=sendmail.8 purgestat.8
17SRCS=	alias.c arpadate.c bf.c collect.c conf.c control.c \
18	convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c \
19	macro.c main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \
20	ratectrl.c readcf.c recipient.c savemail.c sasl.c sfsasl.c \
21	shmticklib.c sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c \
22	timers.c tlsh.c tls.c trace.c udb.c usersmtp.c util.c version.c
23BINOWN=	root
24BINGRP=	smmsp
25.ifdef SENDMAIL_SET_USER_ID
26BINMODE=4555
27.else
28BINMODE=2555
29.endif
30
31# Define the database format to use for aliases et al.
32DBMDEF=	-DNEWDB
33# If you don't want NIS alias/map support, comment out this line
34.if ${MK_NIS} != "no"
35NIS=	-DNIS
36.endif
37# Map extensions
38MAPS=	-DMAP_REGEX -DDNSMAP
39
40CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
41CFLAGS+= ${DBMDEF} ${NIS} ${MAPS}
42
43.if ${MK_INET6_SUPPORT} != "no"
44CFLAGS+= -DNETINET6
45.endif
46
47WARNS?=	0
48
49LIBADD=	util sm smutil
50
51SRCS+=	sm_os.h
52CLEANFILES+=sm_os.h
53
54.if ${MK_OPENSSL} != "no"
55# STARTTLS support
56CFLAGS+=	-DSTARTTLS -DTLS_EC
57LIBADD+=	ssl crypto
58.endif
59
60.if ${MK_TCP_WRAPPERS} != "no"
61CFLAGS+=	-DTCPWRAPPERS
62LIBADD+=	wrap
63.endif
64
65CFLAGS+=	${NO_WDEPRECATED_NON_PROTOTYPE}
66
67# User customizations to the sendmail build environment
68CFLAGS+=${SENDMAIL_CFLAGS}
69DPADD+=${SENDMAIL_DPADD}
70LDADD+=${SENDMAIL_LDADD}
71LDFLAGS+=${SENDMAIL_LDFLAGS}
72
73sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA
74	ln -sf ${.ALLSRC} ${.TARGET}
75
76.include <bsd.prog.mk>
77