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.4 2004/02/03 18:54:01 dillon Exp $
4
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
6 .PATH:  ${SENDMAIL_DIR}/rmail
7
8 PROG=   rmail
9 SRCS=   rmail.c
10 MAN=    rmail.8
11 CFLAGS+=-I${SENDMAIL_DIR}/include -I.
12
13 # Fake __FreeBSD__ so sendmail uses a reasonable feature set.  osreldate.h
14 # will generate a __FreeBSD_version for us.
15 CFLAGS+= -D__FreeBSD__
16
17 .if exists(${.OBJDIR}/../../lib/libsm)
18 LIBSMDIR:=      ${.OBJDIR}/../../lib/libsm
19 .else
20 LIBSMDIR!=      cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
21 .endif
22 LIBSM:=         ${LIBSMDIR}/libsm.a
23
24 DPADD=  ${LIBSM}
25 LDADD=  ${LIBSM}
26
27 SRCS+=  sm_os.h
28 CLEANFILES+=sm_os.h
29
30 # User customizations to the sendmail build environment
31 CFLAGS+=${SENDMAIL_CFLAGS}
32 DPADD+=${SENDMAIL_DPADD}
33 LDADD+=${SENDMAIL_LDADD}
34 LDFLAGS+=${SENDMAIL_LDFLAGS}
35
36 # If you want to have your rmail queuing the mail only, uncomment the
37 # following:
38 # CFLAGS+= -DQUEUE_ONLY
39
40 # Not much point this being static. It calls a shared sendmail...
41 NOSHARED?= NO
42
43 sm_os.h:
44         ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
45
46 .include <bsd.prog.mk>