mkfs: symlink support
[minix.git] / usr.bin / su / Makefile
blobcc3ac73b60ab10006c306ef7785bc35bc23eb67b
1 # $NetBSD: Makefile,v 1.50 2011/04/24 21:42:06 elric Exp $
2 # from: @(#)Makefile 8.1 (Berkeley) 7/19/93
4 .include <bsd.own.mk>
6 USE_PAM=no
7 USE_KERBEROS=no
9 USE_FORT?= yes # setuid
10 PROG= su
11 BINOWN= root
12 BINMODE=4555
14 .PATH.c: ${.CURDIR}/../newgrp
15 CPPFLAGS+=-I${.CURDIR}/../newgrp
16 CPPFLAGS+=-DLOGIN_CAP
17 CPPFLAGS+=-DALLOW_GROUP_CHANGE
18 CPPFLAGS+=-DALLOW_EMPTY_USER
19 CPPFLAGS+=-DGRUTIL_SETGROUPS_MAKESPACE
21 .if ${USE_PAM} != "no"
23 CPPFLAGS+=-DUSE_PAM
24 # XXX: Need libcrypt here, because libcrypto defines it too.
25 DPADD+= ${LIBPAM} ${LIBCRYPT} ${LIBUTIL} ${PAM_STATIC_DPADD}
26 LDADD+= -lpam -lcrypt -lutil ${PAM_STATIC_LDADD}
27 SRCS=su_pam.c grutil.c suutil.c
29 .else # USE_PAM == no
31 SRCS=su.c grutil.c suutil.c
33 DPADD+= ${LIBCRYPT} ${LIBUTIL}
34 LDADD+= -lcrypt -lutil
36 # Uncomment the following line to change the group that may su root to "sugroup"
38 #CPPFLAGS+=-DSU_GROUP=\"sugroup\"
40 # Uncomment the following line to make su
41 # treat group wheel (SUGROUP) and/or ROOTAUTH as an indirect
42 # list of groups.
43 #CPPFLAGS+=-DSU_INDIRECT_GROUP
45 .if (${USE_KERBEROS} != "no")
46 .ifdef AFS
47 DPADD+= ${LIBKAFS}
48 LDADD+= -lkafs
49 .endif
51 CPPFLAGS+=-DKERBEROS5
52 DPADD+= ${LIBKRB5} ${LIBASN1}
53 LDADD+= -lkrb5 -lasn1
55 DPADD+= ${LIBCRYPTO} ${LIBROKEN} ${LIBCOM_ERR}
56 LDADD+= -lcrypto -lroken -lcom_err
57 .endif
59 .if (${USE_SKEY} != "no")
60 CPPFLAGS+=-DSKEY
61 DPADD+= ${LIBSKEY}
62 LDADD+= -lskey
63 .endif
65 .ifdef SU_ROOTAUTH
66 CPPFLAGS+=-DSU_ROOTAUTH=\"${SU_ROOTAUTH}\"
67 .endif
69 .endif # USE_PAM == no
71 .include <bsd.prog.mk>