xref: /freebsd/secure/usr.sbin/sshd/Makefile (revision 7937bfbc0ca53fe7cdd0d54414f9296e273a518e)
1.include <src.opts.mk>
2.include "${SRCTOP}/secure/ssh.mk"
3
4CONFS=	moduli sshd_config
5CONFSDIR=	/etc/ssh
6PROG=	sshd
7SRCS=	sshd.c auth-rhosts.c auth-passwd.c \
8	audit.c audit-bsm.c audit-linux.c platform.c \
9	sshpty.c sshlogin.c servconf.c serverloop.c \
10	auth.c auth2.c auth-options.c session.c \
11	auth2-chall.c groupaccess.c \
12	auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
13	auth2-none.c auth2-passwd.c auth2-pubkey.c auth2-pubkeyfile.c \
14	monitor.c monitor_wrap.c auth-krb5.c \
15	auth2-gss.c gss-serv.c gss-serv-krb5.c \
16	loginrec.c auth-pam.c auth-shadow.c auth-sia.c \
17	srclimit.c sftp-server.c sftp-common.c \
18	sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \
19	sandbox-seccomp-filter.c sandbox-capsicum.c sandbox-pledge.c \
20	sandbox-solaris.c uidswap.c
21PACKAGE=	ssh
22
23# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
24SRCS+=	gss-genr.c
25
26MAN=	sshd.8 sshd_config.5
27
28# Don't rebuild based on moduli.c
29moduli: .MADE
30
31# pam should always happen before ssh here for static linking
32LIBADD=	pam ssh util
33
34.if ${MK_LDNS} != "no"
35CFLAGS+=	-DHAVE_LDNS=1
36#DPADD+=	${LIBLDNS}
37#LDADD+=	-lldns
38.endif
39
40.if ${MK_AUDIT} != "no"
41CFLAGS+= -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1
42LIBADD+=	bsm
43.endif
44
45.if ${MK_BLACKLIST_SUPPORT} != "no"
46CFLAGS+= -DUSE_BLACKLIST=1 -I${SRCTOP}/contrib/blocklist/include
47SRCS+=	blacklist.c
48LIBADD+= blacklist
49LDFLAGS+=-L${LIBBLACKLISTDIR}
50.endif
51
52.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
53CFLAGS+= -include krb5_config.h
54SRCS+=	krb5_config.h
55LIBADD+=	gssapi_krb5 gssapi krb5
56.endif
57
58.if ${MK_TCP_WRAPPERS} != "no"
59CFLAGS+=	-DLIBWRAP=1
60LIBADD+=	wrap
61.endif
62
63LIBADD+=	crypto
64
65.if defined(LOCALBASE)
66CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
67.endif
68
69.include <bsd.prog.mk>
70
71.PATH:	${SSHDIR}
72