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