If snapshots are disabled and the snapshots directory contains no
[dragonfly.git] / libexec / smrsh / Makefile
blobdf931d578cb1c25646826fbda0f8a9e0e855f781
1 # @(#)Makefile 8.1 (Berkeley) 7/2/95
2 # $FreeBSD: src/libexec/smrsh/Makefile,v 1.1.6.6 2002/03/25 21:31:40 gshapiro Exp $
3 # $DragonFly: src/libexec/smrsh/Makefile,v 1.9 2007/04/14 17:43:48 gshapiro Exp $
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail-8.14
6 .PATH: ${SENDMAIL_DIR}/smrsh
8 PROG= smrsh
9 SRCS= smrsh.c
10 MAN= smrsh.8
11 CFLAGS+=-I${SENDMAIL_DIR}/sendmail -I${SENDMAIL_DIR}/include -I.
13 .if exists(${.OBJDIR}/../../lib/libsm)
14 LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
15 .else
16 LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
17 .endif
18 LIBSM:= ${LIBSMDIR}/libsm.a
20 DPADD= ${LIBSM}
21 LDADD= ${LIBSM}
23 SRCS+= sm_os.h
24 CLEANFILES+=sm_os.h
26 PATCHES!= echo ${.CURDIR}/patches/*.patch
27 .for patch in ${PATCHES}
28 .for file in ${patch:R:T}
29 CLEANFILES+= ${file}
30 ${file}: ${SENDMAIL_DIR}/smrsh/${file} ${patch}
31 patch -o ${.TARGET} -i ${patch} ${SENDMAIL_DIR}/smrsh/${file}
32 .endfor
33 .endfor
35 # User customizations to the sendmail build environment
36 CFLAGS+=${SENDMAIL_CFLAGS}
37 DPADD+=${SENDMAIL_DPADD}
38 LDADD+=${SENDMAIL_LDADD}
39 LDFLAGS+=${SENDMAIL_LDFLAGS}
41 sm_os.h:
42 ${LN} -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_dragonfly.h sm_os.h
44 .include <bsd.prog.mk>