6aaf8b3f4c4f790c7cfc8746fcc0e653218056e2
[dragonfly.git] / secure / usr.sbin / sshd / Makefile
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.9 2005/07/07 12:43:36 corecode Exp $
3 #
4
5 PROG=   sshd
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
14
15 # Portability layer
16 SRCS+=  loginrec.c xmmap.c
17 MAN=    sshd.8 sshd_config.5
18
19 # Passwd routine
20 SRCS+=  auth-passwd-freebsd.c
21 CFLAGS+=-DCUSTOM_SYS_AUTH_PASSWD
22
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 
26
27 SRCS+=  sshd.8.no_obj.patch sshd_config.5.no_obj.patch
28
29 .if defined(MAKE_KERBEROS5)
30 DISTRIBUTION=krb5
31 CFLAGS+= -DKRB5 -DHEIMDAL
32 SRCS+=  auth-krb5.c
33 LDADD+=  -lkrb5 -lasn1 -lcom_err -lmd -L${.OBJDIR}/../../../kerberos5/lib/libroken -lroken
34 DPADD+=  ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD}
35 .endif
36
37 LDADD+= -lopie -lmd
38 DPADD+= ${LIBOPIE} ${LIBMD}
39
40 .if defined(X11BASE)
41 CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
42 .endif
43
44 LDADD+= -lcrypt -lutil -lz -lwrap ${MINUSLPAM}
45 DPADD+= ${LIBCRYPT} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
46
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.
54 #
55 OPENSSH_USE_POSIX_THREADS=1
56
57 .if defined(OPENSSH_USE_POSIX_THREADS) && !defined(NOLIBC_R)
58 CFLAGS+=-DUSE_POSIX_THREADS
59 LDADD+= -pthread
60 DPADD+= ${LIBC_R}
61 .endif
62
63 .include "../../Makefile.ssh.common"
64 .include <bsd.prog.mk>
65
66 .PATH: ${SSHDIR}/openbsd-compat
67