Home | History | Annotate | Line # | Download | only in login
      1 #	$NetBSD: Makefile,v 1.59 2023/06/03 09:09:17 lukem Exp $
      2 #	@(#)Makefile	8.1 (Berkeley) 7/19/93
      3 
      4 .include <bsd.own.mk>
      5 
      6 USE_FORT?= yes	# setuid
      7 PROG=	login
      8 SRCS=	copyrightstr.c
      9 DPADD+=	${LIBUTIL} ${LIBCRYPT}
     10 LDADD+=	-lutil -lcrypt
     11 BINOWN=	root
     12 BINMODE=4555
     13 
     14 SRCS+=	common.c
     15 .if (${USE_PAM} != "no")
     16 SRCS+=	login_pam.c
     17 LDADD+=	-lpam ${PAM_STATIC_LDADD}
     18 DPADD+= ${LIBPAM} ${PAM_STATIC_DPADD}
     19 .else	# USE_PAM == no
     20 SRCS+=	login.c
     21 CPPFLAGS+=-DLOGIN_CAP -DSUPPORT_UTMP -DSUPPORT_UTMPX
     22 
     23 .if (${USE_KERBEROS} != "no")
     24 SRCS+= k5login.c
     25 CPPFLAGS+=-DKERBEROS5
     26 LDADD+= ${LIBKRB5_LDADD}
     27 DPADD+= ${LIBKRB5_DPADD}
     28 .endif
     29 
     30 .if (${USE_SKEY} != "no")
     31 CPPFLAGS+=-DSKEY
     32 DPADD+= ${LIBSKEY}
     33 LDADD+=	-lskey
     34 .endif
     35 .endif	# USE_PAM == no
     36 
     37 CLEANFILES+=	copyrightstr.c
     38 
     39 copyrightstr.c: ${NETBSDSRCDIR}/sys/conf/copyright
     40 	${_MKTARGET_CREATE}
     41 	rm -f ${.TARGET}
     42 	${TOOL_AWK} '\
     43 		BEGIN { print "const char copyrightstr[] =" }\
     44 		{ print "\""$$0"\\n\""}\
     45 		END { print "\"\\n\";" }\
     46 	' ${.ALLSRC} > ${.TARGET}
     47 
     48 COPTS.parse.c+=		${CC_WNO_STRINGOP_TRUNCATION}
     49 COPTS.common.c+=	${CC_WNO_STRINGOP_TRUNCATION}
     50 
     51 .include <bsd.prog.mk>
     52