xref: /freebsd/secure/usr.sbin/sshd/Makefile (revision bb15ca603fa442c72dde3f3cb8b46db6970e3950)
1# $FreeBSD$
2#
3
4.include <bsd.own.mk>
5
6PROG=	sshd
7SRCS=	sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
8	audit.c audit-bsm.c audit-linux.c platform.c \
9	sshpty.c sshlogin.c servconf.c serverloop.c \
10	auth.c auth1.c auth2.c auth-options.c session.c \
11	auth-chall.c auth2-chall.c groupaccess.c \
12	auth-skey.c auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
13	auth2-none.c auth2-passwd.c auth2-pubkey.c auth2-jpake.c \
14	monitor_mm.c monitor.c monitor_wrap.c kexdhs.c kexgexs.c kexecdhs.c \
15	auth-krb5.c \
16	auth2-gss.c gss-serv.c gss-serv-krb5.c \
17	loginrec.c auth-pam.c auth-shadow.c auth-sia.c md5crypt.c \
18	sftp-server.c sftp-common.c \
19	roaming_common.c roaming_serv.c \
20	sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c
21
22# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
23SRCS+=	gss-genr.c
24
25MAN=	sshd.8 sshd_config.5
26CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
27
28DPADD=	${LIBSSH} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
29LDADD=	-lssh -lutil -lz -lwrap ${MINUSLPAM}
30
31.if ${MK_AUDIT} != "no"
32CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
33DPADD+=  ${LIBBSM}
34LDADD+=  -lbsm
35.endif
36
37.if ${MK_KERBEROS_SUPPORT} != "no"
38CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DHAVE_GSSAPI_GSSAPI_KRB5_H=1 -DKRB5 -DHEIMDAL
39DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBASN1}
40LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lasn1
41.endif
42
43.if defined(X11BASE)
44# Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
45# 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
46# so we need to provide the default for users with old make.conf
47# settings.
48LOCALBASE?=	/usr/local
49
50# Users may override either LOCALBASE or X11BASE to move the location
51# of xauth
52X11BASE?=	${LOCALBASE}
53CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
54.endif
55
56DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
57LDADD+=	-lcrypto -lcrypt
58
59.include <bsd.prog.mk>
60
61.PATH:	${SSHDIR}
62
63${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
64