Index: crypto/openssh/Makefile.freebsd =================================================================== --- /dev/null +++ crypto/openssh/Makefile.freebsd @@ -0,0 +1,16 @@ +# Common options for OpenSSH applications/libs + +.include + +SSHDIR?= ${.CURDIR} + +# All OpenSSH applications are guaranteed to need ssh_namespace.h, and note that +# adding it to SRCS makes it a dependency of other objects. +CFLAGS+= -I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h + +# Our ldns can't really be detected without hacking around in autoconf bits from +# upstream, so just fake it here. +.if ${MK_LDNS} != "no" +CFLAGS+= -DHAVE_LDNS=1 +.endif Index: secure/lib/libssh/Makefile =================================================================== --- secure/lib/libssh/Makefile +++ secure/lib/libssh/Makefile @@ -42,14 +42,11 @@ SRCS+= getrrsetbyname.c .else LDNSDIR= ${SRCTOP}/contrib/ldns -CFLAGS+= -DHAVE_LDNS=1 -I${LDNSDIR} +CFLAGS+= -I${LDNSDIR} 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 @@ -65,4 +62,5 @@ .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat Index: secure/libexec/sftp-server/Makefile =================================================================== --- secure/libexec/sftp-server/Makefile +++ secure/libexec/sftp-server/Makefile @@ -5,17 +5,10 @@ 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 -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/libexec/ssh-keysign/Makefile =================================================================== --- secure/libexec/ssh-keysign/Makefile +++ secure/libexec/ssh-keysign/Makefile @@ -5,20 +5,11 @@ 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 - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/libexec/ssh-pkcs11-helper/Makefile =================================================================== --- secure/libexec/ssh-pkcs11-helper/Makefile +++ secure/libexec/ssh-pkcs11-helper/Makefile @@ -5,19 +5,10 @@ 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 - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/scp/Makefile =================================================================== --- secure/usr.bin/scp/Makefile +++ secure/usr.bin/scp/Makefile @@ -5,17 +5,10 @@ PROG= scp SRCS= scp.c sftp-common.c sftp-client.c sftp-glob.c progressmeter.c PACKAGE= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -SRCS+= ssh_namespace.h LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/sftp/Makefile =================================================================== --- secure/usr.bin/sftp/Makefile +++ secure/usr.bin/sftp/Makefile @@ -5,17 +5,10 @@ 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 -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/ssh-add/Makefile =================================================================== --- secure/usr.bin/ssh-add/Makefile +++ secure/usr.bin/ssh-add/Makefile @@ -5,17 +5,10 @@ PROG= ssh-add SRCS+= ssh-add.c ssh-sk-client.c PACKAGE= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -SRCS+= ssh_namespace.h LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/ssh-agent/Makefile =================================================================== --- secure/usr.bin/ssh-agent/Makefile +++ secure/usr.bin/ssh-agent/Makefile @@ -5,23 +5,14 @@ PROG= ssh-agent SRCS= ssh-agent.c PACKAGE= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -SRCS+= ssh_namespace.h -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif +LIBADD= crypto ssh .if defined(LOCALBASE) CFLAGS+= -DDEFAULT_PKCS11_WHITELIST='"/usr/lib*/*,${LOCALBASE}/lib*/*"' .endif -LIBADD+= crypto - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/ssh-keygen/Makefile =================================================================== --- secure/usr.bin/ssh-keygen/Makefile +++ secure/usr.bin/ssh-keygen/Makefile @@ -6,17 +6,10 @@ # XXX ssh-sk-client.c in libssh maybe? SRCS= ssh-keygen.c sshsig.c ssh-sk-client.c PACKAGE= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -SRCS+= ssh_namespace.h -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/ssh-keyscan/Makefile =================================================================== --- secure/usr.bin/ssh-keyscan/Makefile +++ secure/usr.bin/ssh-keyscan/Makefile @@ -5,17 +5,10 @@ PROG= ssh-keyscan SRCS= ssh-keyscan.c PACKAGE= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -SRCS+= ssh_namespace.h LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.bin/ssh/Makefile =================================================================== --- secure/usr.bin/ssh/Makefile +++ secure/usr.bin/ssh/Makefile @@ -16,15 +16,8 @@ # 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" -CFLAGS+= -DHAVE_LDNS=1 -.endif - .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h @@ -39,4 +32,5 @@ .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR} Index: secure/usr.sbin/sshd/Makefile =================================================================== --- secure/usr.sbin/sshd/Makefile +++ secure/usr.sbin/sshd/Makefile @@ -25,8 +25,6 @@ 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 @@ -34,12 +32,6 @@ # pam should always happen before ssh here for static linking LIBADD= pam ssh util -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .if ${MK_AUDIT} != "no" CFLAGS+= -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 LIBADD+= bsm @@ -71,4 +63,5 @@ .include +.include "${SSHDIR}/Makefile.freebsd" .PATH: ${SSHDIR}