xref: /freebsd/secure/usr.sbin/sshd/Makefile (revision 78b9f0095b4af3aca6c931b2c7b009ddb8a05125)
1# $FreeBSD$
2
3.include <src.opts.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-skey.c auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
14	auth2-none.c auth2-passwd.c auth2-pubkey.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 md5crypt.c \
18	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
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
28CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
29SRCS+=	ssh_namespace.h
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/blacklist/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