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