It seems I missed a directory when doing the __FreeBSD__ -> __DragonFly__
[dragonfly.git] / usr.sbin / sendmail / Makefile
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.5 2004/02/10 02:59:43 rob Exp $
4
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
6 SMDIR=  ${SENDMAIL_DIR}/src
7 .PATH: ${SMDIR}
8
9 BINDIR= /usr/libexec/sendmail
10
11 PROG=   sendmail
12 MAN=    mailq.1 newaliases.1 aliases.5 sendmail.8 
13 SRCS=   alias.c arpadate.c bf.c collect.c conf.c control.c \
14         convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c \
15         macro.c main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \
16         readcf.c recipient.c savemail.c sasl.c sfsasl.c shmticklib.c \
17         sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c timers.c \
18         tls.c trace.c udb.c usersmtp.c util.c version.c
19 BINOWN= root
20 BINGRP= smmsp
21 .ifdef SENDMAIL_SET_USER_ID
22 BINMODE=4555
23 .else
24 BINMODE=2555
25 .endif
26
27 # Define the database format to use for aliases et al.
28 DBMDEF= -DNEWDB
29 # If you don't want NIS alias/map support, comment out this line
30 NIS=    -DNIS
31 # Map extensions
32 MAPS=   -DMAP_REGEX -DDNSMAP
33
34 CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
35 CFLAGS+= ${DBMDEF} ${NIS} -DMILTER -DNETINET6 -DTCPWRAPPERS ${MAPS}
36 CFLAGS+= -D__FreeBSD__
37
38 DPADD=  ${LIBUTIL} ${LIBWRAP}
39 LDADD=  -lutil -lwrap
40
41 .if exists(${.OBJDIR}/../../lib/libsm)
42 LIBSMDIR:=      ${.OBJDIR}/../../lib/libsm
43 .else
44 LIBSMDIR!=      cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
45 .endif
46 LIBSM:=         ${LIBSMDIR}/libsm.a
47
48 .if exists(${.OBJDIR}/../../lib/libsmutil)
49 LIBSMUTILDIR:=  ${.OBJDIR}/../../lib/libsmutil
50 .else
51 LIBSMUTILDIR!=  cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
52 .endif
53 LIBSMUTIL:=     ${LIBSMUTILDIR}/libsmutil.a
54
55 DPADD+= ${LIBSMUTIL} ${LIBSM}
56 LDADD+= ${LIBSMUTIL} ${LIBSM}
57
58 SRCS+=  sm_os.h
59 CLEANFILES+=sm_os.h
60
61 .if exists(${.CURDIR}/../../secure) && !defined(NOCRYPT) && \
62         !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
63 # STARTTLS support
64 DISTRIBUTION=   crypto
65 CFLAGS+=        -DSTARTTLS -D_FFR_TLS_1
66 LDADD+=         -lssl -lcrypto
67 DPADD+=         ${LIBSSL} ${LIBCRYPTO}
68 .endif
69
70 # User customizations to the sendmail build environment
71 CFLAGS+=${SENDMAIL_CFLAGS}
72 DPADD+=${SENDMAIL_DPADD}
73 LDADD+=${SENDMAIL_LDADD}
74 LDFLAGS+=${SENDMAIL_LDFLAGS}
75
76 sm_os.h:
77         ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
78
79 .include <bsd.prog.mk>