]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - secure/usr.sbin/sshd/Makefile
MFC r311585:
[FreeBSD/stable/10.git] / secure / usr.sbin / sshd / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 PROG=   sshd
6 SRCS=   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 auth-krb5.c \
14         auth2-gss.c gss-serv.c gss-serv-krb5.c \
15         loginrec.c auth-pam.c auth-shadow.c auth-sia.c md5crypt.c \
16         sftp-server.c sftp-common.c \
17         sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \
18         sandbox-seccomp-filter.c sandbox-capsicum.c sandbox-pledge.c \
19         sandbox-solaris.c
20
21 # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
22 SRCS+=  gss-genr.c
23
24 MAN=    sshd.8 sshd_config.5
25 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
26 SRCS+=  ssh_namespace.h
27
28 DPADD=  ${LIBSSH} ${LIBUTIL} ${LIBPAM}
29 LDADD=  -lssh -lutil ${MINUSLPAM}
30 USEPRIVATELIB= ssh
31
32 .if ${MK_LDNS} != "no"
33 CFLAGS+=        -DHAVE_LDNS=1
34 #DPADD+=        ${LIBLDNS}
35 #LDADD+=        -lldns
36 #USEPRIVATELIB+= ldns
37 .endif
38
39 .if ${MK_AUDIT} != "no"
40 CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
41 DPADD+=  ${LIBBSM}
42 LDADD+=  -lbsm
43 .endif
44
45 .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
46 CFLAGS+= -include krb5_config.h
47 SRCS+=  krb5_config.h
48 DPADD+=  ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \
49         ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
50 LDADD+=  -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \
51         -lcom_err -lroken -lwind -lheimbase -lheimipcc
52 .endif
53
54 .if ${MK_TCP_WRAPPERS} != "no"
55 CFLAGS+=        -DLIBWRAP
56 DPADD+=         ${LIBWRAP}
57 LDADD+=         -lwrap
58 .endif
59
60 DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
61 LDADD+= -lcrypt -lcrypto -lz
62
63 # Fix the order of NEEDED entries for libthr and libc. The libthr
64 # needs to interpose libc symbols, leaving the libthr loading as
65 # dependency of krb causes reversed order and broken interposing. Put
66 # the threading library last on the linker command line, just before
67 # the -lc added by a compiler driver.
68 .if ${MK_KERBEROS_SUPPORT} != "no"
69 DPADD+= ${LIBPTHREAD}
70 LDADD+= -lpthread
71 .endif
72
73 .if defined(LOCALBASE)
74 CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
75 .endif
76
77 .include <bsd.prog.mk>
78
79 .PATH:  ${SSHDIR}