xref: /freebsd/usr.sbin/sendmail/Makefile (revision 95a2b4d17234fb78177add37c8882d133855c3d0)
122751f56SPeter Wemm#	@(#)Makefile	8.8 (Berkeley) 3/28/97
297d92980SPeter Wemm# $FreeBSD$
358162a73SPeter Wemm
4c6063d0dSWarner Losh.include <src.opts.mk>
5e1fe3dbaSRuslan Ermilov
69c4fa87cSGlen BarberPACKAGE=sendmail
764a0982bSEnji CooperSENDMAIL_DIR=${SRCTOP}/contrib/sendmail
888c75941SGregory Neil ShapiroSMDIR=	${SENDMAIL_DIR}/src
922751f56SPeter Wemm.PATH: ${SMDIR}
1058162a73SPeter Wemm
117fdd45b0SBryan DreweryBINDIR=	${LIBEXECDIR}/sendmail
128ea9610dSPeter Wemm
1322751f56SPeter WemmPROG=	sendmail
1490e655eaSDavid E. O'BrienMAN=	mailq.1 newaliases.1 aliases.5 sendmail.8
157d0ac6f3SGregory Neil ShapiroMLINKS+=sendmail.8 hoststat.8
167d0ac6f3SGregory Neil ShapiroMLINKS+=sendmail.8 purgestat.8
176ebfa57dSGregory Neil ShapiroSRCS=	alias.c arpadate.c bf.c collect.c conf.c control.c \
1888c75941SGregory Neil Shapiro	convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c \
1988c75941SGregory Neil Shapiro	macro.c main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \
20f673db9fSGregory Neil Shapiro	ratectrl.c readcf.c recipient.c savemail.c sasl.c sfsasl.c \
21f673db9fSGregory Neil Shapiro	shmticklib.c sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c \
225b0945b5SGregory Neil Shapiro	timers.c tlsh.c tls.c trace.c udb.c usersmtp.c util.c version.c
23c9842b5aSRuslan ErmilovBINOWN=	root
246ebfa57dSGregory Neil ShapiroBINGRP=	smmsp
256ebfa57dSGregory Neil Shapiro.ifdef SENDMAIL_SET_USER_ID
2690e655eaSDavid E. O'BrienBINMODE=4555
276ebfa57dSGregory Neil Shapiro.else
286ebfa57dSGregory Neil ShapiroBINMODE=2555
296ebfa57dSGregory Neil Shapiro.endif
3090e655eaSDavid E. O'Brien
3190e655eaSDavid E. O'Brien# Define the database format to use for aliases et al.
3290e655eaSDavid E. O'BrienDBMDEF=	-DNEWDB
3390e655eaSDavid E. O'Brien# If you don't want NIS alias/map support, comment out this line
34e1fe3dbaSRuslan Ermilov.if ${MK_NIS} != "no"
3590e655eaSDavid E. O'BrienNIS=	-DNIS
366c58990dSBjoern A. Zeeb.endif
3790e655eaSDavid E. O'Brien# Map extensions
386ebfa57dSGregory Neil ShapiroMAPS=	-DMAP_REGEX -DDNSMAP
3990e655eaSDavid E. O'Brien
406ebfa57dSGregory Neil ShapiroCFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
412486c641SEnji CooperCFLAGS+= ${DBMDEF} ${NIS} ${MAPS}
420c56527fSGregory Neil Shapiro
43e1fe3dbaSRuslan Ermilov.if ${MK_INET6_SUPPORT} != "no"
440c56527fSGregory Neil ShapiroCFLAGS+= -DNETINET6
450c56527fSGregory Neil Shapiro.endif
4690e655eaSDavid E. O'Brien
47ccbcdcd5SGregory Neil ShapiroWARNS?=	0
4871ccf092SEd Schouten
492486c641SEnji CooperLIBADD=	util sm smutil
506ebfa57dSGregory Neil Shapiro
516ebfa57dSGregory Neil ShapiroSRCS+=	sm_os.h
526ebfa57dSGregory Neil ShapiroCLEANFILES+=sm_os.h
5388c75941SGregory Neil Shapiro
5404efeffeSWarner Losh.if ${MK_OPENSSL} != "no"
5585e427ccSGregory Neil Shapiro# STARTTLS support
565b0945b5SGregory Neil ShapiroCFLAGS+=	-DSTARTTLS -DTLS_EC
57c6db8143SBaptiste DaroussinLIBADD+=	ssl crypto
5885e427ccSGregory Neil Shapiro.endif
5985e427ccSGregory Neil Shapiro
602486c641SEnji Cooper.if ${MK_TCP_WRAPPERS} != "no"
612486c641SEnji CooperCFLAGS+=	-DTCPWRAPPERS
622486c641SEnji CooperLIBADD+=	wrap
632486c641SEnji Cooper.endif
642486c641SEnji Cooper
65*95a2b4d1SMateusz GuzikCFLAGS+=	${NO_WDEPRECATED_NON_PROTOTYPE}
66*95a2b4d1SMateusz Guzik
67cf1fec42SGregory Neil Shapiro# User customizations to the sendmail build environment
68cf1fec42SGregory Neil ShapiroCFLAGS+=${SENDMAIL_CFLAGS}
69cf1fec42SGregory Neil ShapiroDPADD+=${SENDMAIL_DPADD}
70c6cc6025SGregory Neil ShapiroLDADD+=${SENDMAIL_LDADD}
71c6cc6025SGregory Neil ShapiroLDFLAGS+=${SENDMAIL_LDFLAGS}
72cf1fec42SGregory Neil Shapiro
73b791fbe6SBryan Drewerysm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA
74b791fbe6SBryan Drewery	ln -sf ${.ALLSRC} ${.TARGET}
75049239a4SPeter Wemm
7622751f56SPeter Wemm.include <bsd.prog.mk>
77