Merge branch 'vendor/TCPDUMP' (early part)
[dragonfly.git] / usr.sbin / sendmail / Makefile
blobb1e291968da2bbac8ee9647fd69614cb020b0108
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 $
3 # $DragonFly: src/usr.sbin/sendmail/Makefile,v 1.19 2008/03/04 19:23:05 dillon Exp $
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail-8.14
6 SMDIR= ${SENDMAIL_DIR}/sendmail
7 .PATH: ${SMDIR}
9 CONTRIBDIR= ${SMDIR}
10 PATCHES= mci.c.patch main.c.patch srvrsmtp.c.patch
12 BINDIR= /usr/libexec/sendmail
14 PROG= sendmail
15 MAN= mailq.1 newaliases.1 aliases.5 sendmail.8
16 MLINKS+=sendmail.8 hoststat.8
17 MLINKS+=sendmail.8 purgestat.8
18 SRCS= 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 \
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 \
23 timers.c tls.c trace.c udb.c usersmtp.c util.c version.c ${PATCHES}
24 WARNS?= 2
25 BINOWN= root
26 BINGRP= smmsp
27 .ifdef SENDMAIL_SET_USER_ID
28 BINMODE=4555
29 .else
30 BINMODE=2555
31 .endif
33 # Define the database format to use for aliases et al.
34 DBMDEF= -DNEWDB
35 # If you don't want NIS alias/map support, comment out this line
36 NIS= -DNIS
37 # Map extensions
38 MAPS= -DMAP_REGEX -DDNSMAP
40 CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
41 CFLAGS+= ${DBMDEF} ${NIS} -DMILTER -DNETINET6 -DTCPWRAPPERS ${MAPS}
43 DPADD= ${LIBUTIL} ${LIBWRAP}
44 LDADD= -lutil -lwrap
46 .if exists(${.OBJDIR}/../../lib/libsm)
47 LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
48 .else
49 LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
50 .endif
51 LIBSM:= ${LIBSMDIR}/libsm.a
53 .if exists(${.OBJDIR}/../../lib/libsmutil)
54 LIBSMUTILDIR:= ${.OBJDIR}/../../lib/libsmutil
55 .else
56 LIBSMUTILDIR!= cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
57 .endif
58 LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a
60 DPADD+= ${LIBSMUTIL} ${LIBSM}
61 LDADD+= ${LIBSMUTIL} ${LIBSM}
63 SRCS+= sm_os.h
64 CLEANFILES+=sm_os.h
66 .if exists(${.CURDIR}/../../secure) && !defined(NO_CRYPT) && \
67 !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
68 # STARTTLS support
69 DISTRIBUTION= crypto
70 CFLAGS+= -DSTARTTLS -D_FFR_TLS_1
71 LDADD+= -lssl -lcrypto
72 DPADD+= ${LIBSSL} ${LIBCRYPTO}
73 .endif
75 # User customizations to the sendmail build environment
76 CFLAGS+=${SENDMAIL_CFLAGS}
77 DPADD+=${SENDMAIL_DPADD}
78 LDADD+=${SENDMAIL_LDADD}
79 LDFLAGS+=${SENDMAIL_LDFLAGS}
81 sm_os.h:
82 ${LN} -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_dragonfly.h sm_os.h
84 .include <bsd.prog.mk>