Makefile revision 204355
1285612Sdelphij# $FreeBSD: head/secure/usr.sbin/sshd/Makefile 204355 2010-02-26 12:12:54Z ru $
2285612Sdelphij#
3285612Sdelphij
4285612Sdelphij.include <bsd.own.mk>
5285612Sdelphij
6285612SdelphijPROG=	sshd
7285612SdelphijSRCS=	sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
8285612Sdelphij	sshpty.c sshlogin.c servconf.c serverloop.c \
9285612Sdelphij	auth.c auth1.c auth2.c auth-options.c session.c \
10285612Sdelphij	auth-chall.c auth2-chall.c groupaccess.c \
11285612Sdelphij	auth-skey.c auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
12285612Sdelphij	auth2-none.c auth2-passwd.c auth2-pubkey.c auth2-jpake.c \
13285612Sdelphij	monitor_mm.c monitor.c monitor_wrap.c kexdhs.c kexgexs.c \
14285612Sdelphij	auth-krb5.c \
15285612Sdelphij	auth2-gss.c gss-serv.c gss-serv-krb5.c \
16285612Sdelphij	loginrec.c auth-pam.c auth-shadow.c auth-sia.c md5crypt.c \
17285612Sdelphij	audit.c audit-bsm.c platform.c sftp-server.c sftp-common.c \
18285612Sdelphij	roaming_common.c
19285612Sdelphij
20285612Sdelphij# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
21285612SdelphijSRCS+=	gss-genr.c
22285612Sdelphij
23285612SdelphijMAN=	sshd.8 sshd_config.5
24285612SdelphijCFLAGS+=-I${SSHDIR} -include ssh_namespace.h
25285612Sdelphij
26285612SdelphijDPADD=	${LIBSSH} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
27285612SdelphijLDADD=	-lssh -lutil -lz -lwrap ${MINUSLPAM}
28285612Sdelphij
29285612Sdelphij.if ${MK_AUDIT} != "no"
30285612SdelphijCFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
31285612SdelphijDPADD+=  ${LIBBSM}
32285612SdelphijLDADD+=  -lbsm
33285612Sdelphij.endif
34285612Sdelphij
35285612Sdelphij.if ${MK_KERBEROS_SUPPORT} != "no"
36285612SdelphijCFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DHAVE_GSSAPI_GSSAPI_KRB5_H=1 -DKRB5 -DHEIMDAL
37285612SdelphijDPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBASN1}
38285612SdelphijLDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lasn1
39285612Sdelphij.endif
40285612Sdelphij
41285612Sdelphij.if defined(X11BASE)
42285612Sdelphij# Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
43285612Sdelphij# 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
44285612Sdelphij# so we need to provide the default for users with old make.conf
45285612Sdelphij# settings.
46285612SdelphijLOCALBASE?=	/usr/local
47285612Sdelphij
48181834Sroberto# Users may override either LOCALBASE or X11BASE to move the location
49285612Sdelphij# of xauth
50285612SdelphijX11BASE?=	${LOCALBASE}
51285612SdelphijCFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
52285612Sdelphij.endif
53181834Sroberto
54181834SrobertoDPADD+=	${LIBCRYPTO} ${LIBCRYPT}
55285612SdelphijLDADD+=	-lcrypto -lcrypt
56181834Sroberto
57181834Sroberto.include <bsd.prog.mk>
58285612Sdelphij
59285612Sdelphij.PATH:	${SSHDIR}
60285612Sdelphij
61285612Sdelphij${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
62285612Sdelphij