Use __func__, instead of hardcode the function name.
[dragonfly.git] / usr.sbin / sendmail / Makefile
blob0b46f39c8b1869f4f6c49f742db6a08fe1b34ae8
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 BINOWN= root
25 BINGRP= smmsp
26 .ifdef SENDMAIL_SET_USER_ID
27 BINMODE=4555
28 .else
29 BINMODE=2555
30 .endif
32 # Define the database format to use for aliases et al.
33 DBMDEF= -DNEWDB
34 # If you don't want NIS alias/map support, comment out this line
35 NIS= -DNIS
36 # Map extensions
37 MAPS= -DMAP_REGEX -DDNSMAP
39 CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
40 CFLAGS+= ${DBMDEF} ${NIS} -DMILTER -DNETINET6 -DTCPWRAPPERS ${MAPS}
42 DPADD= ${LIBUTIL} ${LIBWRAP}
43 LDADD= -lutil -lwrap
45 .if exists(${.OBJDIR}/../../lib/libsm)
46 LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
47 .else
48 LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
49 .endif
50 LIBSM:= ${LIBSMDIR}/libsm.a
52 .if exists(${.OBJDIR}/../../lib/libsmutil)
53 LIBSMUTILDIR:= ${.OBJDIR}/../../lib/libsmutil
54 .else
55 LIBSMUTILDIR!= cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
56 .endif
57 LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a
59 DPADD+= ${LIBSMUTIL} ${LIBSM}
60 LDADD+= ${LIBSMUTIL} ${LIBSM}
62 SRCS+= sm_os.h
63 CLEANFILES+=sm_os.h
65 .if exists(${.CURDIR}/../../secure) && !defined(NO_CRYPT) && \
66 !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
67 # STARTTLS support
68 DISTRIBUTION= crypto
69 CFLAGS+= -DSTARTTLS -D_FFR_TLS_1
70 LDADD+= -lssl -lcrypto
71 DPADD+= ${LIBSSL} ${LIBCRYPTO}
72 .endif
74 # User customizations to the sendmail build environment
75 CFLAGS+=${SENDMAIL_CFLAGS}
76 DPADD+=${SENDMAIL_DPADD}
77 LDADD+=${SENDMAIL_LDADD}
78 LDFLAGS+=${SENDMAIL_LDFLAGS}
80 sm_os.h:
81 ${LN} -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_dragonfly.h sm_os.h
83 .include <bsd.prog.mk>