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