1 # $FreeBSD: src/secure/usr.sbin/sshd/Makefile,v 1.5.2.9 2003/02/03 17:31:12 des Exp $
2 # $DragonFly: src/secure/usr.sbin/sshd/Makefile,v 1.6 2004/09/05 11:53:58 dillon Exp $
6 SRCS= sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
7 sshpty.c sshlogin.c servconf.c serverloop.c uidswap.c \
8 auth.c auth1.c auth2.c auth-options.c session.c \
9 auth-chall.c auth2-chall.c groupaccess.c auth-skey.c \
10 auth-bsdauth.c auth2-pam-freebsd.c auth2-hostbased.c \
11 auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c \
12 monitor_mm.c monitor.c monitor_wrap.c monitor_fdpass.c \
13 kexdhs.c kexgexs.c misc.c dh.c kex.c channels.c \
17 SRCS+= loginrec.c xmmap.c
18 MAN= sshd.8 sshd_config.5
21 SRCS+= auth-passwd-freebsd.c
22 CFLAGS+=-DCUSTOM_SYS_AUTH_PASSWD
24 SRCS+= auth-skey.c.patch auth.h.patch auth2.c.patch \
25 loginrec.c.patch monitor.c.patch \
26 myproposal.h.patch servconf.c.patch session.c.patch sshd.c.patch
28 SRCS+= sshd.8.no_obj.patch sshd_config.5.no_obj.patch sshd_config.no_obj.patch
30 .if defined(MAKE_KERBEROS5)
32 CFLAGS+= -DKRB5 -DHEIMDAL
34 LDADD+= -lkrb5 -lasn1 -lcom_err -lmd -L${.OBJDIR}/../../../kerberos5/lib/libroken -lroken
35 DPADD+= ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD}
39 DPADD+= ${LIBOPIE} ${LIBMD}
42 CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
45 LDADD+= -lcrypt -lutil -lz -lwrap ${MINUSLPAM}
46 DPADD+= ${LIBCRYPT} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
48 # There's a privilege separation bug when PAM authentication is
49 # used and posix threads are disabled. Both descriptors of the socketpair
50 # used for the communication between the [net] and the [pam] process are
51 # left open, and when a timeout kills one procses the other does not see
52 # it because it still has both end points open. This eventually causes
53 # sshd to start rejecting connections. So, enable posix threading
54 # here even though I don't want to use it.
56 OPENSSH_USE_POSIX_THREADS=1
58 .if defined(OPENSSH_USE_POSIX_THREADS) && !defined(NOLIBC_R)
59 CFLAGS+=-DUSE_POSIX_THREADS
65 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.ALLSRC} ${DESTDIR}/etc/ssh
67 .include "../../Makefile.ssh.common"
68 .include <bsd.prog.mk>
70 .PATH: ${SSHDIR}/openbsd-compat