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