aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makemap/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/makemap/Makefile')
-rw-r--r--usr.sbin/makemap/Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile
index b14ef27e7f78..15219fd45110 100644
--- a/usr.sbin/makemap/Makefile
+++ b/usr.sbin/makemap/Makefile
@@ -7,11 +7,19 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
.PATH: ${SENDMAIL_DIR}/makemap
PROG= makemap
+SRCS= makemap.c
MAN= makemap.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 @@ DPADD+=${SENDMAIL_DPADD}
LDADD+=${SENDMAIL_LDADD}
LDFLAGS+=${SENDMAIL_LDFLAGS}
+sm_os.h:
+ ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
+
.include <bsd.prog.mk>