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