aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/praliases/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/praliases/Makefile')
-rw-r--r--usr.sbin/praliases/Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile
index 5ed8869aa6c5..0b99a8e96c30 100644
--- a/usr.sbin/praliases/Makefile
+++ b/usr.sbin/praliases/Makefile
@@ -7,11 +7,19 @@ SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail
.PATH: ${SENDMAIL_DIR}/praliases
PROG= praliases
+SRCS= praliases.c
MAN= praliases.8
-CFLAGS+= -I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include
+CFLAGS+= -I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
CFLAGS+= -DNEWDB -DNOT_SENDMAIL
+.if exists(${.OBJDIR}/../../lib/libsm)
+LIBSMDIR:= ${.OBJDIR}/../../lib/libsm
+.else
+LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR
+.endif
+LIBSM:= ${LIBSMDIR}/libsm.a
+
.if exists(${.OBJDIR}/../../lib/libsmdb)
LIBSMDBDIR:= ${.OBJDIR}/../../lib/libsmdb
.else
@@ -26,8 +34,11 @@ LIBSMUTILDIR!= cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR
.endif
LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a
-DPADD= ${LIBSMDB} ${LIBSMUTIL}
-LDADD= ${LIBSMDB} ${LIBSMUTIL}
+DPADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
+LDADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
+
+SRCS+= sm_os.h
+CLEANFILES+=sm_os.h
# User customizations to the sendmail build environment
CFLAGS+= ${SENDMAIL_CFLAGS}
@@ -35,4 +46,7 @@ LDFLAGS+=${SENDMAIL_LDFLAGS}
DPADD+= ${SENDMAIL_DPADD}
LDADD+= ${SENDMAIL_LDADD}
+sm_os.h:
+ ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
+
.include <bsd.prog.mk>