Makefile revision 294693
1# $FreeBSD: stable/10/secure/usr.sbin/sshd/Makefile 294693 2016-01-24 22:28:18Z des $
2
3.include <bsd.own.mk>
4
5PROG=	sshd
6SRCS=	sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
7	audit.c audit-bsm.c audit-linux.c platform.c \
8	sshpty.c sshlogin.c servconf.c serverloop.c \
9	auth.c auth1.c auth2.c auth-options.c session.c \
10	auth-chall.c auth2-chall.c groupaccess.c \
11	auth-skey.c auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
12	auth2-none.c auth2-passwd.c auth2-pubkey.c \
13	monitor_mm.c monitor.c monitor_wrap.c kexdhs.c kexgexs.c kexecdhs.c \
14	kexc25519s.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 md5crypt.c \
17	sftp-server.c sftp-common.c \
18	roaming_common.c roaming_serv.c \
19	sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \
20	sandbox-seccomp-filter.c sandbox-capsicum.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
27SRCS+=	ssh_namespace.h
28
29DPADD=	${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM}
30LDADD=	-lssh -lutil -lwrap ${MINUSLPAM}
31USEPRIVATELIB= ssh
32
33.if ${MK_LDNS} != "no"
34CFLAGS+=	-DHAVE_LDNS=1
35#DPADD+=	${LIBLDNS}
36#LDADD+=	-lldns
37#USEPRIVATELIB+= ldns
38.endif
39
40.if ${MK_AUDIT} != "no"
41CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
42DPADD+=  ${LIBBSM}
43LDADD+=  -lbsm
44.endif
45
46.if ${MK_KERBEROS_SUPPORT} != "no"
47CFLAGS+= -include krb5_config.h
48SRCS+=	krb5_config.h
49DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \
50	${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
51LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \
52	-lcom_err -lroken -lwind -lheimbase -lheimipcc
53.endif
54
55DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
56LDADD+= -lcrypt -lcrypto -lz
57
58# Fix the order of NEEDED entries for libthr and libc. The libthr
59# needs to interpose libc symbols, leaving the libthr loading as
60# dependency of krb causes reversed order and broken interposing. Put
61# the threading library last on the linker command line, just before
62# the -lc added by a compiler driver.
63.if ${MK_KERBEROS_SUPPORT} != "no"
64DPADD+= ${LIBPTHREAD}
65LDADD+= -lpthread
66.endif
67
68.if defined(LOCALBASE)
69CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
70.endif
71
72.include <bsd.prog.mk>
73
74.PATH:	${SSHDIR}
75