ssh: move common Makefile boilerplate to a new ssh.mk
This moves SSHDIR and ssh_namespace.h handling to a common location,
and will simplify future work such as adding U2F support (D32509).
Reviewed by: kevans
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32808
(cherry picked from commit 9d63429fa1
)
This commit is contained in:
parent
d4754d707a
commit
a0880129a5
@ -1,15 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.if exists(${.CURDIR:H:H}/lib/libcrypt/obj)
|
||||
CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt/obj
|
||||
.else
|
||||
CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt
|
||||
.endif
|
||||
|
||||
.if ${MK_OPENSSH} != "no"
|
||||
SSHDIR= ${SRCTOP}/crypto/openssh
|
||||
.endif
|
||||
|
||||
WARNS?= 0
|
||||
|
@ -1,6 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
LIB= ssh
|
||||
PRIVATELIB= true
|
||||
@ -45,9 +46,6 @@ SRCS+= getrrsetbyname-ldns.c
|
||||
LIBADD+= ldns
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
|
||||
CFLAGS+= -include krb5_config.h
|
||||
SRCS+= krb5_config.h
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= sftp-server
|
||||
SRCS= sftp-server.c sftp-common.c sftp-server-main.c
|
||||
MAN= sftp-server.8
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-keysign
|
||||
SRCS= ssh-keysign.c readconf.c uidswap.c
|
||||
MAN= ssh-keysign.8
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
BINMODE=4555
|
||||
|
||||
LIBADD= ssh
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-pkcs11-helper
|
||||
SRCS= ssh-pkcs11.c ssh-pkcs11-helper.c
|
||||
MAN= ssh-pkcs11-helper.8
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
6
secure/ssh.mk
Normal file
6
secure/ssh.mk
Normal file
@ -0,0 +1,6 @@
|
||||
# Common Make variables for OpenSSH
|
||||
|
||||
SSHDIR= ${SRCTOP}/crypto/openssh
|
||||
|
||||
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= scp
|
||||
SRCS= scp.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= sftp
|
||||
SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c progressmeter.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh edit
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-add
|
||||
SRCS+= ssh-add.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-agent
|
||||
SRCS= ssh-agent.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-keygen
|
||||
SRCS= ssh-keygen.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
PROG= ssh-keyscan
|
||||
SRCS= ssh-keyscan.c
|
||||
PACKAGE= ssh
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
CONFS= ssh_config
|
||||
CONFSDIR= /etc/ssh
|
||||
@ -16,9 +17,6 @@ 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
|
||||
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
LIBADD= ssh
|
||||
|
||||
.if ${MK_LDNS} != "no"
|
||||
|
@ -1,6 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "${SRCTOP}/secure/ssh.mk"
|
||||
|
||||
CONFS= moduli sshd_config
|
||||
CONFSDIR= /etc/ssh
|
||||
@ -25,8 +26,6 @@ PACKAGE= ssh
|
||||
SRCS+= gss-genr.c
|
||||
|
||||
MAN= sshd.8 sshd_config.5
|
||||
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
|
||||
SRCS+= ssh_namespace.h
|
||||
|
||||
# Don't rebuild based on moduli.c
|
||||
moduli: .MADE
|
||||
|
Loading…
Reference in New Issue
Block a user