summaryrefslogtreecommitdiffstats
path: root/secure/usr.bin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2013-09-10 22:26:11 +0000
committerdes <des@FreeBSD.org>2013-09-10 22:26:11 +0000
commit2a9ec0fc3edd2edc5766e11fa312e8ab8a128d5f (patch)
treeab68ba5a5b6f4e8ee717558d70c0221f0b1ef6dc /secure/usr.bin
parent7b25e61875a286fe4f9be2f6da79b6fed5cf609b (diff)
downloadFreeBSD-src-2a9ec0fc3edd2edc5766e11fa312e8ab8a128d5f.zip
FreeBSD-src-2a9ec0fc3edd2edc5766e11fa312e8ab8a128d5f.tar.gz
Clean up the OpenSSH build. It is now possible to build most components
as static binaries, if desired. The one exception is sshd, which runs into trouble due to libpam.a's includion of pam_ssh. Make OpenSSH use LDNS if available. This allows it to verify signed SSHFP records. Approved by: re (blanket)
Diffstat (limited to 'secure/usr.bin')
-rw-r--r--secure/usr.bin/scp/Makefile18
-rw-r--r--secure/usr.bin/sftp/Makefile20
-rw-r--r--secure/usr.bin/ssh-add/Makefile20
-rw-r--r--secure/usr.bin/ssh-agent/Makefile20
-rw-r--r--secure/usr.bin/ssh-keygen/Makefile22
-rw-r--r--secure/usr.bin/ssh-keyscan/Makefile16
-rw-r--r--secure/usr.bin/ssh/Makefile16
7 files changed, 110 insertions, 22 deletions
diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile
index fe248ab..c33470c 100644
--- a/secure/usr.bin/scp/Makefile
+++ b/secure/usr.bin/scp/Makefile
@@ -1,16 +1,30 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= scp
SRCS= scp.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+.if !defined(NO_SHARED)
# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
+.endif
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
-LDADD= -lssh -lcrypt -lcrypto -lz
+DPADD= ${LIBSSH}
+LDADD= -lssh
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+#DPADD+= ${LIBLDNS}
+#LDADD+= -lldns
+#USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile
index 8164dac..924e1a7 100644
--- a/secure/usr.bin/sftp/Makefile
+++ b/secure/usr.bin/sftp/Makefile
@@ -1,16 +1,30 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= sftp
SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c progressmeter.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
-# required when linking with a dynamic libssh
+.if !defined(NO_SHARED)
+# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
+.endif
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} ${LIBEDIT} ${LIBNCURSES}
-LDADD= -lssh -lcrypt -lcrypto -lz -ledit -lncurses
+DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSES}
+LDADD= -lssh -ledit -lncurses
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+#DPADD+= ${LIBLDNS}
+#LDADD+= -lldns
+#USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile
index cb14ce6..316a607 100644
--- a/secure/usr.bin/ssh-add/Makefile
+++ b/secure/usr.bin/ssh-add/Makefile
@@ -1,16 +1,30 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ssh-add
SRCS+= ssh-add.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
-# required when linking with a dynamic libssh
+.if !defined(NO_SHARED)
+# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
+.endif
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
-LDADD= -lssh -lcrypt -lcrypto -lz
+DPADD= ${LIBSSH}
+LDADD= -lssh
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+#DPADD+= ${LIBLDNS}
+#LDADD+= -lldns
+#USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile
index 29620d1..353abac 100644
--- a/secure/usr.bin/ssh-agent/Makefile
+++ b/secure/usr.bin/ssh-agent/Makefile
@@ -1,16 +1,30 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ssh-agent
SRCS= ssh-agent.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
-# required when linking with a dynamic libssh
+.if !defined(NO_SHARED)
+# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
+.endif
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
-LDADD= -lssh -lcrypt -lcrypto -lz
+DPADD= ${LIBSSH}
+LDADD= -lssh
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+#DPADD+= ${LIBLDNS}
+#LDADD+= -lldns
+#USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile
index 48e486e..75934d9 100644
--- a/secure/usr.bin/ssh-keygen/Makefile
+++ b/secure/usr.bin/ssh-keygen/Makefile
@@ -1,16 +1,30 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ssh-keygen
SRCS= ssh-keygen.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
-# required when linking with a dynamic libssh
-SRCS+= roaming_dummy.c
+.if !defined(NO_SHARED)
+# required when linking with a dynamic libssh
+SRCS+= roaming_dummy.c
+.endif
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
-LDADD= -lssh -lcrypt -lcrypto -lz
+DPADD= ${LIBSSH}
+LDADD= -lssh
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+DPADD+= ${LIBLDNS}
+LDADD+= -lldns
+USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile
index cc82d07..7dcb4d1 100644
--- a/secure/usr.bin/ssh-keyscan/Makefile
+++ b/secure/usr.bin/ssh-keyscan/Makefile
@@ -1,13 +1,25 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ssh-keyscan
SRCS= ssh-keyscan.c roaming_dummy.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
-DPADD= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
-LDADD= -lssh -lcrypt -lcrypto -lz
+DPADD= ${LIBSSH}
+LDADD= -lssh
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+#DPADD+= ${LIBLDNS}
+#LDADD+= -lldns
+#USEPRIVATELIB+= ldns
+.endif
+
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
+
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index a5e5808..459d21f 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -1,5 +1,4 @@
# $FreeBSD$
-#
.include <bsd.own.mk>
@@ -16,10 +15,17 @@ SRCS= ssh.c readconf.c clientloop.c sshtty.c \
# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
SRCS+= gss-genr.c
-DPADD= ${LIBSSH} ${LIBUTIL} ${LIBZ}
-LDADD= -lssh -lutil -lz
+DPADD= ${LIBSSH} ${LIBUTIL}
+LDADD= -lssh -lutil
USEPRIVATELIB= ssh
+.if ${MK_LDNS} != "no"
+CFLAGS+= -DHAVE_LDNS=1
+DPADD+= ${LIBLDNS}
+LDADD+= -lldns
+USEPRIVATELIB+= ldns
+.endif
+
.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
DPADD+= ${LIBGSSAPI}
@@ -30,8 +36,8 @@ LDADD+= -lgssapi
CFLAGS+= -DNONE_CIPHER_ENABLED
.endif
-DPADD+= ${LIBCRYPT} ${LIBCRYPTO}
-LDADD+= -lcrypt -lcrypto
+DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD+= -lcrypt -lcrypto -lz
.if defined(LOCALBASE)
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
OpenPOWER on IntegriCloud