Merge from vendor branch BINUTILS:
[dragonfly.git] / libexec / smrsh / Makefile
CommitLineData
984263bc
MD
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 $
b41c6d15 3# $DragonFly: src/libexec/smrsh/Makefile,v 1.6 2006/03/22 18:25:43 gshapiro Exp $
984263bc 4
b41c6d15 5SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail-8.13.6
984263bc
MD
6.PATH: ${SENDMAIL_DIR}/smrsh
7
8PROG= smrsh
9SRCS= smrsh.c
10MAN= smrsh.8
3181538d 11CFLAGS+=-I${SENDMAIL_DIR}/sendmail -I${SENDMAIL_DIR}/include -I.
984263bc
MD
12
13.if exists(${.OBJDIR}/../../lib/libsm)
14LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
15.else
16LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
17.endif
18LIBSM:= ${LIBSMDIR}/libsm.a
19
20DPADD= ${LIBSM}
21LDADD= ${LIBSM}
22
23SRCS+= sm_os.h
24CLEANFILES+=sm_os.h
25
3181538d
GNS
26PATCHES!= echo ${.CURDIR}/patches/*.patch
27.for patch in ${PATCHES}
28.for file in ${patch:R:T}
29CLEANFILES+= ${file}
30${file}: ${SENDMAIL_DIR}/smrsh/${file} ${patch}
31 patch -o ${.TARGET} -i ${patch} ${SENDMAIL_DIR}/smrsh/${file}
32.endfor
33.endfor
34
984263bc
MD
35# User customizations to the sendmail build environment
36CFLAGS+=${SENDMAIL_CFLAGS}
37DPADD+=${SENDMAIL_DPADD}
38LDADD+=${SENDMAIL_LDADD}
39LDFLAGS+=${SENDMAIL_LDFLAGS}
40
41sm_os.h:
3181538d 42 ${LN} -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_dragonfly.h sm_os.h
984263bc
MD
43
44.include <bsd.prog.mk>