Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.bin / su / Makefile
blob46107e8db9bdec9be36555eef6e9413cc2d2c43b
1 # $NetBSD: Makefile,v 1.48 2007/10/27 15:37:45 christos Exp $
2 # from: @(#)Makefile 8.1 (Berkeley) 7/19/93
4 .include <bsd.own.mk>
6 USE_FORT?= yes # setuid
7 PROG= su
8 BINOWN= root
9 BINMODE=4555
11 .PATH.c: ${.CURDIR}/../newgrp
12 CPPFLAGS+=-I${.CURDIR}/../newgrp
13 CPPFLAGS+=-DLOGIN_CAP
14 CPPFLAGS+=-DALLOW_GROUP_CHANGE
15 CPPFLAGS+=-DALLOW_EMPTY_USER
16 CPPFLAGS+=-DGRUTIL_SETGROUPS_MAKESPACE
18 .if ${USE_PAM} != "no"
20 CPPFLAGS+=-DUSE_PAM
21 # XXX: Need libcrypt here, because libcrypto defines it too.
22 DPADD+= ${LIBPAM} ${LIBCRYPT} ${LIBUTIL} ${PAM_STATIC_DPADD}
23 LDADD+= -lpam -lcrypt -lutil ${PAM_STATIC_LDADD}
24 SRCS=su_pam.c grutil.c suutil.c
26 .else # USE_PAM == no
28 SRCS=su.c grutil.c suutil.c
30 DPADD+= ${LIBCRYPT} ${LIBUTIL}
31 LDADD+= -lcrypt -lutil
33 # Uncomment the following line to change the group that may su root to "sugroup"
35 #CPPFLAGS+=-DSU_GROUP=\"sugroup\"
37 # Uncomment the following line to make su
38 # treat group wheel (SUGROUP) and/or ROOTAUTH as an indirect
39 # list of groups.
40 #CPPFLAGS+=-DSU_INDIRECT_GROUP
42 .if (${USE_KERBEROS} != "no")
43 .ifdef AFS
44 DPADD+= ${LIBKAFS}
45 LDADD+= -lkafs
46 .endif
48 CPPFLAGS+=-DKERBEROS5 -I${DESTDIR}/usr/include/krb5
49 DPADD+= ${LIBKRB5} ${LIBASN1}
50 LDADD+= -lkrb5 -lasn1
52 DPADD+= ${LIBCRYPTO} ${LIBROKEN} ${LIBCOM_ERR}
53 LDADD+= -lcrypto -lroken -lcom_err
54 .endif
56 .if (${USE_SKEY} != "no")
57 CPPFLAGS+=-DSKEY
58 DPADD+= ${LIBSKEY}
59 LDADD+= -lskey
60 .endif
62 .ifdef SU_ROOTAUTH
63 CPPFLAGS+=-DSU_ROOTAUTH=\"${SU_ROOTAUTH}\"
64 .endif
66 .endif # USE_PAM == no
68 .include <bsd.prog.mk>