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.8 2005/04/08 11:26:52 joerg 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
16 SRCS+= loginrec.c xmmap.c
17 MAN= sshd.8 sshd_config.5
20 SRCS+= auth-passwd-freebsd.c
21 CFLAGS+=-DCUSTOM_SYS_AUTH_PASSWD
23 SRCS+= auth-skey.c.patch auth.h.patch auth2.c.patch \
24 loginrec.c.patch monitor.c.patch \
25 myproposal.h.patch servconf.c.patch session.c.patch sshd.c.patch
27 SRCS+= sshd.8.no_obj.patch sshd_config.5.no_obj.patch sshd_config.no_obj.patch
29 .if defined(MAKE_KERBEROS5)
31 CFLAGS+= -DKRB5 -DHEIMDAL
33 LDADD+= -lkrb5 -lasn1 -lcom_err -lmd -L${.OBJDIR}/../../../kerberos5/lib/libroken -lroken
34 DPADD+= ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD}
38 DPADD+= ${LIBOPIE} ${LIBMD}
41 CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
44 LDADD+= -lcrypt -lutil -lz -lwrap ${MINUSLPAM}
45 DPADD+= ${LIBCRYPT} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
47 # There's a privilege separation bug when PAM authentication is
48 # used and posix threads are disabled. Both descriptors of the socketpair
49 # used for the communication between the [net] and the [pam] process are
50 # left open, and when a timeout kills one procses the other does not see
51 # it because it still has both end points open. This eventually causes
52 # sshd to start rejecting connections. So, enable posix threading
53 # here even though I don't want to use it.
55 OPENSSH_USE_POSIX_THREADS=1
57 .if defined(OPENSSH_USE_POSIX_THREADS) && !defined(NOLIBC_R)
58 CFLAGS+=-DUSE_POSIX_THREADS
64 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.ALLSRC} ${DESTDIR}/etc/ssh
66 .include "../../Makefile.ssh.common"
67 .include <bsd.prog.mk>
69 .PATH: ${SSHDIR}/openbsd-compat