Update build for OpenSSL-1.0.0a.
[dragonfly.git] / usr.sbin / sendmail / Makefile
CommitLineData
984263bc
MD
1# @(#)Makefile 8.8 (Berkeley) 3/28/97
2# $FreeBSD: src/usr.sbin/sendmail/Makefile,v 1.15.2.13 2002/03/25 21:32:29 gshapiro Exp $
27532c65 3# $DragonFly: src/usr.sbin/sendmail/Makefile,v 1.19 2008/03/04 19:23:05 dillon Exp $
984263bc 4
e8b8add7 5SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail-8.14
3181538d 6SMDIR= ${SENDMAIL_DIR}/sendmail
984263bc
MD
7.PATH: ${SMDIR}
8
6d160766 9CONTRIBDIR= ${SMDIR}
e2ba133e 10PATCHES= main.c.patch srvrsmtp.c.patch
6d160766 11
984263bc
MD
12BINDIR= /usr/libexec/sendmail
13
14PROG= sendmail
15MAN= mailq.1 newaliases.1 aliases.5 sendmail.8
47ce99fa
GNS
16MLINKS+=sendmail.8 hoststat.8
17MLINKS+=sendmail.8 purgestat.8
984263bc
MD
18SRCS= alias.c arpadate.c bf.c collect.c conf.c control.c \
19 convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c \
20 macro.c main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \
3181538d
GNS
21 ratectrl.c readcf.c recipient.c savemail.c sasl.c sfsasl.c \
22 shmticklib.c sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c \
6d160766 23 timers.c tls.c trace.c udb.c usersmtp.c util.c version.c ${PATCHES}
01185282 24WARNS?= 0
984263bc
MD
25BINOWN= root
26BINGRP= smmsp
27.ifdef SENDMAIL_SET_USER_ID
28BINMODE=4555
29.else
30BINMODE=2555
31.endif
32
33# Define the database format to use for aliases et al.
34DBMDEF= -DNEWDB
35# If you don't want NIS alias/map support, comment out this line
36NIS= -DNIS
37# Map extensions
38MAPS= -DMAP_REGEX -DDNSMAP
39
40CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
41CFLAGS+= ${DBMDEF} ${NIS} -DMILTER -DNETINET6 -DTCPWRAPPERS ${MAPS}
42
43DPADD= ${LIBUTIL} ${LIBWRAP}
44LDADD= -lutil -lwrap
45
46.if exists(${.OBJDIR}/../../lib/libsm)
47LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
48.else
49LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
50.endif
51LIBSM:= ${LIBSMDIR}/libsm.a
52
53.if exists(${.OBJDIR}/../../lib/libsmutil)
54LIBSMUTILDIR:= ${.OBJDIR}/../../lib/libsmutil
55.else
56LIBSMUTILDIR!= cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
57.endif
58LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a
59
60DPADD+= ${LIBSMUTIL} ${LIBSM}
61LDADD+= ${LIBSMUTIL} ${LIBSM}
62
63SRCS+= sm_os.h
64CLEANFILES+=sm_os.h
65
cecff5c1 66.if exists(${.CURDIR}/../../secure) && !defined(NO_CRYPT) && \
97c14704 67 !defined(NO_OPENSSL)
984263bc 68# STARTTLS support
e8b8add7 69CFLAGS+= -DSTARTTLS -D_FFR_TLS_1
984263bc
MD
70LDADD+= -lssl -lcrypto
71DPADD+= ${LIBSSL} ${LIBCRYPTO}
72.endif
73
74# User customizations to the sendmail build environment
75CFLAGS+=${SENDMAIL_CFLAGS}
76DPADD+=${SENDMAIL_DPADD}
77LDADD+=${SENDMAIL_LDADD}
78LDFLAGS+=${SENDMAIL_LDFLAGS}
79
80sm_os.h:
3181538d 81 ${LN} -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_dragonfly.h sm_os.h
984263bc
MD
82
83.include <bsd.prog.mk>