Merge from vendor branch HEIMDAL:
[dragonfly.git] / bin / rmail / Makefile
1 #       @(#)Makefile    8.1 (Berkeley) 5/31/93
2 # $FreeBSD: src/bin/rmail/Makefile,v 1.8.2.6 2002/03/25 21:31:30 gshapiro Exp $
3 # $DragonFly: src/bin/rmail/Makefile,v 1.5 2005/02/06 06:16:40 okumoto Exp $
4
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
6 .PATH:  ${SENDMAIL_DIR}/rmail
7
8 WARNS?= 0       # XXX Not yet.
9
10 PROG=   rmail
11 SRCS=   rmail.c
12 MAN=    rmail.8
13 CFLAGS+=-I${SENDMAIL_DIR}/include -I.
14
15 # Fake __FreeBSD__ so sendmail uses a reasonable feature set.  osreldate.h
16 # will generate a __FreeBSD_version for us.
17 CFLAGS+= -D__FreeBSD__
18
19 .if exists(${.OBJDIR}/../../lib/libsm)
20 LIBSMDIR:=      ${.OBJDIR}/../../lib/libsm
21 .else
22 LIBSMDIR!=      cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
23 .endif
24 LIBSM:=         ${LIBSMDIR}/libsm.a
25
26 DPADD=  ${LIBSM}
27 LDADD=  ${LIBSM}
28
29 SRCS+=  sm_os.h
30 CLEANFILES+=sm_os.h
31
32 # User customizations to the sendmail build environment
33 CFLAGS+=${SENDMAIL_CFLAGS}
34 DPADD+=${SENDMAIL_DPADD}
35 LDADD+=${SENDMAIL_LDADD}
36 LDFLAGS+=${SENDMAIL_LDFLAGS}
37
38 # If you want to have your rmail queuing the mail only, uncomment the
39 # following:
40 # CFLAGS+= -DQUEUE_ONLY
41
42 # Not much point this being static. It calls a shared sendmail...
43 NOSHARED?= NO
44
45 sm_os.h:
46         ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
47
48 .include <bsd.prog.mk>