Makefile revision 274110
1# $FreeBSD: releng/10.0/secure/usr.sbin/sshd/Makefile 274110 2014-11-04 23:31:17Z 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 auth2-jpake.c \
13	monitor_mm.c monitor.c monitor_wrap.c kexdhs.c kexgexs.c kexecdhs.c \
14	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
21# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
22SRCS+=	gss-genr.c
23
24MAN=	sshd.8 sshd_config.5
25CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
26
27DPADD=	${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM}
28LDADD=	-lssh -lutil -lwrap ${MINUSLPAM}
29USEPRIVATELIB= ssh
30
31.if ${MK_LDNS} != "no"
32CFLAGS+=	-DHAVE_LDNS=1
33#DPADD+=	${LIBLDNS}
34#LDADD+=	-lldns
35#USEPRIVATELIB+= ldns
36.endif
37
38.if ${MK_AUDIT} != "no"
39CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
40DPADD+=  ${LIBBSM}
41LDADD+=  -lbsm
42.endif
43
44.if ${MK_KERBEROS_SUPPORT} != "no"
45CFLAGS+= -include krb5_config.h
46DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \
47	${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
48LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \
49	-lcom_err -lroken -lwind -lheimbase -lheimipcc
50.endif
51
52.if ${MK_OPENSSH_NONE_CIPHER} != "no"
53CFLAGS+= -DNONE_CIPHER_ENABLED
54.endif
55
56DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
57LDADD+= -lcrypt -lcrypto -lz
58
59# Fix the order of NEEDED entries for libthr and libc. The libthr
60# needs to interpose libc symbols, leaving the libthr loading as
61# dependency of krb causes reversed order and broken interposing. Put
62# the threading library last on the linker command line, just before
63# the -lc added by a compiler driver.
64.if ${MK_KERBEROS_SUPPORT} != "no"
65DPADD+= ${LIBPTHREAD}
66LDADD+= -lpthread
67.endif
68
69.if defined(LOCALBASE)
70CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
71.endif
72
73.include <bsd.prog.mk>
74
75.PATH:	${SSHDIR}
76
77${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
78.if ${MK_KERBEROS_SUPPORT} != "no"
79${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
80.endif
81