Index: head/secure/Makefile =================================================================== --- head/secure/Makefile (revision 314657) +++ head/secure/Makefile (revision 314658) @@ -1,41 +1,41 @@ # $FreeBSD$ .include SUBDIR= lib .WAIT \ libexec ${_tests} usr.bin usr.sbin SUBDIR_PARALLEL= .if ${MK_TESTS} != "no" _tests= tests .endif # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \ usr.sbin/pkg_install usr.sbin/ppp usr.sbin/tcpdump/tcpdump .if ${MK_SENDMAIL} != "no" SPROGS+=usr.sbin/sendmail .endif # This target is used to rebuild these programs with crypto. secure: .MAKE .PHONY .for entry in ${SPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} cleandir; \ ${MAKE} obj; \ ${MAKE} all; \ ${MAKE} install .endfor # This target is used to rebuild these programs without crypto. insecure: .MAKE .PHONY .for entry in ${SPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} MK_CRYPT=no cleandir; \ ${MAKE} MK_CRYPT=no obj; \ ${MAKE} MK_CRYPT=no all; \ ${MAKE} MK_CRYPT=no install .endfor .include Index: head/secure/Makefile.inc =================================================================== --- head/secure/Makefile.inc (revision 314657) +++ head/secure/Makefile.inc (revision 314658) @@ -1,15 +1,15 @@ # $FreeBSD$ .include -.if exists(${.CURDIR}/../../lib/libcrypt/obj) -CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj +.if exists(${.CURDIR:H:H}/lib/libcrypt/obj) +CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt/obj .else -CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt +CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt .endif .if ${MK_OPENSSH} != "no" -SSHDIR= ${.CURDIR}/../../../crypto/openssh +SSHDIR= ${SRCTOP}/crypto/openssh .endif WARNS?= 0 Index: head/secure/lib/Makefile.inc =================================================================== --- head/secure/lib/Makefile.inc (revision 314657) +++ head/secure/lib/Makefile.inc (revision 314658) @@ -1,6 +1,6 @@ # $FreeBSD$ .include "../Makefile.inc" -.if exists(${.CURDIR}/../../../lib/Makefile.inc) -.include "${.CURDIR}/../../../lib/Makefile.inc" +.if exists(${.CURDIR:H:H:H}/lib/Makefile.inc) +.include "${.CURDIR:H:H:H}/lib/Makefile.inc" .endif Index: head/secure/lib/libcrypto/Makefile.inc =================================================================== --- head/secure/lib/libcrypto/Makefile.inc (revision 314657) +++ head/secure/lib/libcrypto/Makefile.inc (revision 314658) @@ -1,106 +1,106 @@ # $FreeBSD$ .include # OpenSSL version used for manual page generation OPENSSL_VER= 1.0.2k OPENSSL_DATE= 2017-01-26 -LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl +LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc CFLAGS+= -I${LCRYPTO_SRC} CFLAGS+= -DTERMIOS -DANSI_SOURCE CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H .include .if ${TARGET_ENDIANNESS} == 1234 CFLAGS+=-DL_ENDIAN .elif ${TARGET_ENDIANNESS} == 4321 CFLAGS+=-DB_ENDIAN .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" ASM_${MACHINE_CPUARCH}= .elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _ASM_AVX!= { \ echo vzeroall | \ ${CC} -x assembler -o /dev/null -c - 2> /dev/null; \ } && echo yes || echo no .if ${_ASM_AVX} == yes ASM_${MACHINE_CPUARCH}= .endif .endif .if defined(ASM_aarch64) CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM .elif defined(ASM_amd64) CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DECP_NISTZ256_ASM CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM CFLAGS+=-DGHASH_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+=-DWHIRLPOOL_ASM .elif defined(ASM_arm) CFLAGS+=-DAES_ASM -DBSAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DGHASH_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM .elif defined(ASM_i386) CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM CFLAGS+=-DGHASH_ASM CFLAGS+=-DRMD160_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+=-DWHIRLPOOL_ASM .endif MANDIR= ${SHAREDIR}/openssl/man/man .if defined(LIB) _docs= ${LIB} _skip= SSLeay_version des_modes _sec= 3 .else _docs= apps _skip= config _sec= 1 .endif man-update: .for manpage in ${MAN} @(sec=${manpage:E}; \ pod=${manpage:R}.pod; \ cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \ pod2man --section=$$sec --release="${OPENSSL_VER}" \ --date="${OPENSSL_DATE}" --center="OpenSSL" \ $$pod > ${.CURDIR}/man/${manpage}; \ rm -f $$pod; \ ${ECHO} ${manpage}) .endfor man-makefile-update: rm -f ${.CURDIR}/Makefile.man echo '# $$'FreeBSD'$$' >> ${.CURDIR}/Makefile.man echo '# DO NOT EDIT: generated from man-makefile-update target' >> \ ${.CURDIR}/Makefile.man for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ fn=`basename $$i .pod`; \ if ! echo '${_skip}' | grep -qw "$$fn"; then \ ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \ fi; \ done for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ fn=`basename $$i .pod`; \ if ! echo '${_skip}' | grep -qw "$$fn"; then \ perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \ awk "/^$$fn\$$/ { next; } \ { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \ ${.CURDIR}/Makefile.man; \ fi; \ done Index: head/secure/lib/libcrypto/engines/Makefile.inc =================================================================== --- head/secure/lib/libcrypto/engines/Makefile.inc (revision 314657) +++ head/secure/lib/libcrypto/engines/Makefile.inc (revision 314658) @@ -1,6 +1,6 @@ # $FreeBSD$ -LCRYPTO_SRC= ${.CURDIR}/../../../../../crypto/openssl +LCRYPTO_SRC= ${SRCTOP}/crypto/openssl .PATH: ${LCRYPTO_SRC}/engines ${LCRYPTO_SRC}/engines/ccgost SHLIBDIR?= /usr/lib/engines Index: head/secure/lib/libssh/Makefile =================================================================== --- head/secure/lib/libssh/Makefile (revision 314657) +++ head/secure/lib/libssh/Makefile (revision 314658) @@ -1,60 +1,60 @@ # $FreeBSD$ .include LIB= ssh PRIVATELIB= true SHLIB_MAJOR= 5 SRCS= ssh_api.c ssherr.c sshbuf.c sshkey.c sshbuf-getput-basic.c \ sshbuf-misc.c sshbuf-getput-crypto.c krl.c bitmap.c SRCS+= authfd.c authfile.c bufaux.c bufbn.c bufec.c buffer.c \ canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \ cipher-bf1.c cipher-ctr.c cipher-3des1.c cleanup.c \ compat.c crc32.c deattack.c fatal.c hostfile.c \ log.c match.c md-sha256.c moduli.c nchan.c packet.c opacket.c \ readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \ atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.o \ monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \ msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \ ssh-pkcs11.c smult_curve25519_ref.c \ poly1305.c chacha.c cipher-chachapoly.c \ ssh-ed25519.c digest-openssl.c digest-libc.c hmac.c \ sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c blocks.c \ kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \ kexdhc.c kexgexc.c kexecdhc.c kexc25519c.c \ kexdhs.c kexgexs.c kexecdhs.c kexc25519s.c \ platform-pledge.c platform-tracing.o PACKAGE= ssh # gss-genr.c should be in $SRCS but causes linking problems, so it is # compiled directly into sshd instead. # Portability layer SRCS+= bcrypt_pbkdf.c blowfish.c bsd-misc.c explicit_bzero.c fmt_scaled.c \ glob.c openssl-compat.c port-tun.c realpath.c strtonum.c \ timingsafe_bcmp.c vis.c xcrypt.c xmmap.c .if ${MK_LDNS} == "no" SRCS+= getrrsetbyname.c .else -LDNSDIR= ${.CURDIR}/../../../contrib/ldns +LDNSDIR= ${SRCTOP}/contrib/ldns CFLAGS+= -DHAVE_LDNS=1 -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 .endif NO_LINT= LIBADD+= crypto crypt z .include .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat