diff --git a/crypto/external/bsd/openssl/lib/Makefile b/crypto/external/bsd/openssl/lib/Makefile index c3dd8bb2b637..2fe43acc8675 100644 --- a/crypto/external/bsd/openssl/lib/Makefile +++ b/crypto/external/bsd/openssl/lib/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.5 2018/09/23 15:08:41 christos Exp $ +# $NetBSD: Makefile,v 1.6 2023/05/07 16:22:10 christos Exp $ .include "bsd.own.mk" # OpenSSL libraries. -SUBDIR= libcrypto libcryptotest libdes +SUBDIR= libapps liblegacy libcrypto libcryptotest libdes SUBDIR+= .WAIT libssl # depends on libcrypto diff --git a/crypto/external/bsd/openssl/lib/libapps/Makefile b/crypto/external/bsd/openssl/lib/libapps/Makefile new file mode 100644 index 000000000000..b50b54e7e695 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libapps/Makefile @@ -0,0 +1,66 @@ +# $NetBSD: Makefile,v 1.1 2023/05/07 16:22:10 christos Exp $ + +# RCSid: +# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp +# +# @(#) Copyright (c) 1994 Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@quick.com.au +# +LIBISPRIVATE= yes +LIB= apps +USE_FORT?= yes # cryptographic software +USE_SHLIBDIR= no +USE_FIPS= no +#DBG=-g + +.include +.include + +# XXX: There's a bit of work to do before we can enable warnings. +WARNS=0 +CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses -Wno-implicit-int-float-conversion +# XXX: This warning seems to trigger incorrectly +CWARNFLAGS.clang+= -Wno-atomic-alignment + +LINTFLAGS+= -X 161 # constant in conditional context +LINTFLAGS+= -X 129 # expression has null effect +LINTFLAGS+= -X 117 # bitwise '>>' on signed value possibly nonportable +LINTFLAGS+= -X 231 # argument '%s' unused in function '%s' +LINTFLAGS+= -X 220 # fallthrough on case statement +LINTFLAGS+= -X 118 # semantics of '%s' change in ANSI C; use explicit cast + +CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${.CURDIR} +CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include +CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp +CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes +CPPFLAGS+= -I${OPENSSLSRC}/../include +CPPFLAGS+= -I${OPENSSLSRC}/apps/lib +CPPFLAGS+= -I${OPENSSLSRC}/apps/include + + +CRYPTODIST= ${NETBSDSRCDIR}/crypto +OPENSSLINC= ${OPENSSLSRC}/include/openssl + +.include "${NETBSDSRCDIR}/crypto/Makefile.openssl" +.PATH: ${OPENSSLSRC} ${OPENSSLINC} +.PATH: ${OPENSSLSRC}/../include/openssl +.PATH: ${OPENSSLSRC}/providers/implementations/digests +.PATH: ${OPENSSLSRC}/providers/implementations/macs + +.include "srcs.inc" + +AFLAGS+=-DELF + +OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh + +.include + diff --git a/crypto/external/bsd/openssl/lib/libapps/PROTO.in b/crypto/external/bsd/openssl/lib/libapps/PROTO.in new file mode 100644 index 000000000000..f52f913e4169 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libapps/PROTO.in @@ -0,0 +1,12 @@ +# $NetBSD: PROTO.in,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/@proto@ + +@PROTO@_SRCS += \ +@SRCS@ + +SRCS += ${@PROTO@_SRCS} + +.for appssrc in ${@PROTO@_SRCS} +CPPFLAGS.${appssrc} += -I${OPENSSLSRC}/@proto@ ${@PROTO@CPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/libapps/apps_lib.inc b/crypto/external/bsd/openssl/lib/libapps/apps_lib.inc new file mode 100644 index 000000000000..bb52a90f9e7f --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libapps/apps_lib.inc @@ -0,0 +1,29 @@ +# $NetBSD: apps_lib.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/apps/lib + +APPS_LIB_SRCS += \ +app_libctx.c \ +app_params.c \ +app_provider.c \ +app_rand.c \ +app_x509.c \ +apps.c \ +apps_ui.c \ +columns.c \ +cmp_mock_srv.c \ +engine.c \ +engine_loader.c \ +fmt.c \ +http_server.c \ +names.c \ +opt.c \ +s_cb.c \ +s_socket.c \ +tlssrp_depr.c \ + +SRCS += ${APPS_LIB_SRCS} + +.for commonsrc in ${APPS_LIB_SRCS} +CPPFLAGS.${commonsrc} += -I${OPENSSLSRC}/apps/lib ${APPS_LIBCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/libapps/mkinc b/crypto/external/bsd/openssl/lib/libapps/mkinc new file mode 100755 index 000000000000..14fa25f7cfd7 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libapps/mkinc @@ -0,0 +1,29 @@ +#!/bin/sh + +BUILD=../../openssl-3.0.8 + +create() { + sed -e "s,@proto@,$proto,g" -e "s/@PROTO@/$PROTO/g" -e "/@SRCS@/ { +r $fn.out +d +}" PROTO.in > $fn.inc +rm -f $fn.out +} + +d= +for i in $(find ${BUILD} -name 'libapps-lib-*.d'); do + nd=$(dirname "$i" | sed -e s,${BUILD}/,,) + if [ "$nd" != "$d" ]; then + if [ -n "$d" ]; then + create + fi + fn=$(echo $nd | tr '/' '_') + proto=$nd + PROTO=$(echo $fn | tr '[a-z]' '[A-Z]') + d=$nd + rm -f $fn.out + fi + echo $(basename $i) | \ + sed -e 's/.*-lib-//' -e 's/\.d/.c \\/' >> $fn.out +done +create diff --git a/crypto/external/bsd/openssl/lib/libapps/srcs.inc b/crypto/external/bsd/openssl/lib/libapps/srcs.inc new file mode 100644 index 000000000000..025e30a31e20 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libapps/srcs.inc @@ -0,0 +1,12 @@ +# $NetBSD: srcs.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +APPSINCS= \ +apps_lib.inc \ + +.for appsinc in ${APPSINCS} +.if exists(${.CURDIR}/arch/${APPS_MACHINE_CPU}/${appsinc}) +.include "${.CURDIR}/arch/${APPS_MACHINE_CPU}/${appsinc}" +.else +.include "${appsinc}" +.endif +.endfor diff --git a/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c b/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c index 76a582f0e541..66f10443ea4e 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c +++ b/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c @@ -20,6 +20,21 @@ #include #include "crypto/sha.h" +unsigned char *ossl_sha1(const unsigned char *d, size_t n, unsigned char *md) +{ + SHA_CTX c; + static unsigned char m[SHA_DIGEST_LENGTH]; + + if (md == NULL) + md = m; + if (!SHA1_Init(&c)) + return NULL; + SHA1_Update(&c, d, n); + SHA1_Final(md, &c); + OPENSSL_cleanse(&c, sizeof(c)); + return md; +} + unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) { static unsigned char m[SHA_DIGEST_LENGTH]; diff --git a/crypto/external/bsd/openssl/lib/liblegacy/Makefile b/crypto/external/bsd/openssl/lib/liblegacy/Makefile new file mode 100644 index 000000000000..9791791136e0 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/Makefile @@ -0,0 +1,86 @@ +# $NetBSD: Makefile,v 1.1 2023/05/07 16:22:10 christos Exp $ + +# RCSid: +# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp +# +# @(#) Copyright (c) 1994 Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@quick.com.au +# +NOLINT= # don't build a lint library +NOPROFILE= # don't build a profile library +NOPICINSTALL= # don't install _pic.a library +LIB= legacy +USE_FORT?= yes # cryptographic software +#DBG=-g + +.include +.include + +# XXX: There's a bit of work to do before we can enable warnings. +WARNS=0 +CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses -Wno-implicit-int-float-conversion +# XXX: This warning seems to trigger incorrectly +CWARNFLAGS.clang+= -Wno-atomic-alignment + +LINTFLAGS+= -X 161 # constant in conditional context +LINTFLAGS+= -X 129 # expression has null effect +LINTFLAGS+= -X 117 # bitwise '>>' on signed value possibly nonportable +LINTFLAGS+= -X 231 # argument '%s' unused in function '%s' +LINTFLAGS+= -X 220 # fallthrough on case statement +LINTFLAGS+= -X 118 # semantics of '%s' change in ANSI C; use explicit cast + +CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${.CURDIR} +CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include +CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp +CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes +CPPFLAGS+= -I${OPENSSLSRC}/../include +CPPFLAGS+= -I${OPENSSLSRC}/providers/common/include +CPPFLAGS+= -I${OPENSSLSRC}/providers/implementations/include +CPPFLAGS+= -I${.CURDIR}/../libdefault + + +CRYPTODIST= ${NETBSDSRCDIR}/crypto +OPENSSLINC= ${OPENSSLSRC}/include/openssl + +.include "${NETBSDSRCDIR}/crypto/Makefile.openssl" +.PATH: ${OPENSSLSRC} ${OPENSSLINC} +.PATH: ${OPENSSLSRC}/../include/openssl +.PATH: ${OPENSSLSRC}/providers/implementations/digests +.PATH: ${OPENSSLSRC}/providers/implementations/macs + +.include "srcs.inc" + +AFLAGS+=-DELF + +OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh + + +SHLIB_MAJOR=0 +SHLIB_MINOR=0 + +LIBDIR=${OSSL_MODULESDIR} + +.if ${MKPIC} != "no" +.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so +libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so +.else +libinstall:: +.endif + +LDFLAGS+=-Wl,--version-script=${.CURDIR}/${LIB}.map + +.include + +${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION} + ${_MKTARGET_INSTALL} + ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${.ALLSRC} ${.TARGET} diff --git a/crypto/external/bsd/openssl/lib/liblegacy/PROTO.in b/crypto/external/bsd/openssl/lib/liblegacy/PROTO.in new file mode 100644 index 000000000000..b0db41e2bc5b --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/PROTO.in @@ -0,0 +1,12 @@ +# $NetBSD: PROTO.in,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/@proto@ + +@PROTO@_SRCS += \ +@SRCS@ + +SRCS += ${@PROTO@_SRCS} + +.for legacysrc in ${@PROTO@_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/@proto@ ${@PROTO@CPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/crypto.inc b/crypto/external/bsd/openssl/lib/liblegacy/crypto.inc new file mode 100644 index 000000000000..8acc927b8a6f --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/crypto.inc @@ -0,0 +1,13 @@ +# $NetBSD: crypto.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/crypto + +CRYPTO_SRCS += \ +cpuid.c \ +ctype.c \ + +SRCS += ${CRYPTO_SRCS} + +.for legacysrc in ${CRYPTO_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/crypto ${CRYPTOCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/crypto_des.inc b/crypto/external/bsd/openssl/lib/liblegacy/crypto_des.inc new file mode 100644 index 000000000000..4efbf0a92978 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/crypto_des.inc @@ -0,0 +1,13 @@ +# $NetBSD: crypto_des.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/crypto/des + +CRYPTO_DES_SRCS += \ +des_enc.c \ +fcrypt_b.c \ + +SRCS += ${CRYPTO_DES_SRCS} + +.for legacysrc in ${CRYPTO_DES_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/crypto/des ${CRYPTO_DESCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/crypto_md5.inc b/crypto/external/bsd/openssl/lib/liblegacy/crypto_md5.inc new file mode 100644 index 000000000000..af1b6227e721 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/crypto_md5.inc @@ -0,0 +1,14 @@ +# $NetBSD: crypto_md5.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/crypto/md5 + +CRYPTO_MD5_SRCS += \ +md5_dgst.c \ +md5_one.c \ +md5_sha1.c \ + +SRCS += ${CRYPTO_MD5_SRCS} + +.for legacysrc in ${CRYPTO_MD5_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/crypto/md5 ${CRYPTO_MD5CPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/legacy.map b/crypto/external/bsd/openssl/lib/liblegacy/legacy.map new file mode 100644 index 000000000000..1debaaa7ff65 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/legacy.map @@ -0,0 +1,5 @@ +{ + global: + OSSL_provider_init; + local: *; +}; diff --git a/crypto/external/bsd/openssl/lib/liblegacy/mkinc b/crypto/external/bsd/openssl/lib/liblegacy/mkinc new file mode 100755 index 000000000000..d474935b7ec1 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/mkinc @@ -0,0 +1,29 @@ +#!/bin/sh + +BUILD=../../openssl-3.0.8 + +create() { + sed -e "s,@proto@,$proto,g" -e "s/@PROTO@/$PROTO/g" -e "/@SRCS@/ { +r $fn.out +d +}" PROTO.in > $fn.inc +rm -f $fn.out +} + +d= +for i in $(find ${BUILD} -name 'liblegacy-lib-*.d'); do + nd=$(dirname "$i" | sed -e s,${BUILD}/,,) + if [ "$nd" != "$d" ]; then + if [ -n "$d" ]; then + create + fi + fn=$(echo $nd | tr '/' '_') + proto=$nd + PROTO=$(echo $fn | tr '[a-z]' '[A-Z]') + d=$nd + rm -f $fn.out + fi + echo $(basename $i) | \ + sed -e 's/.*-lib-//' -e 's/\.d/.c \\/' >> $fn.out +done +create diff --git a/crypto/external/bsd/openssl/lib/liblegacy/providers.inc b/crypto/external/bsd/openssl/lib/liblegacy/providers.inc new file mode 100644 index 000000000000..2d9b63f20470 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/providers.inc @@ -0,0 +1,12 @@ +# $NetBSD: providers.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/providers + +PROVIDERS_SRCS += \ +prov_running.c \ + +SRCS += ${PROVIDERS_SRCS} + +.for legacysrc in ${PROVIDERS_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/providers ${PROVIDERSCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/providers_common.inc b/crypto/external/bsd/openssl/lib/liblegacy/providers_common.inc new file mode 100644 index 000000000000..42598a1582b6 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/providers_common.inc @@ -0,0 +1,12 @@ +# $NetBSD: providers_common.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/providers/common + +PROVIDERS_COMMON_SRCS += \ +provider_util.c \ + +SRCS += ${PROVIDERS_COMMON_SRCS} + +.for legacysrc in ${PROVIDERS_COMMON_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/providers/common ${PROVIDERS_COMMONCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_ciphers.inc b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_ciphers.inc new file mode 100644 index 000000000000..f2eb22342552 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_ciphers.inc @@ -0,0 +1,30 @@ +# $NetBSD: providers_implementations_ciphers.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/providers/implementations/ciphers + +PROVIDERS_IMPLEMENTATIONS_CIPHERS_SRCS += \ +cipher_blowfish.c \ +cipher_blowfish_hw.c \ +cipher_cast5.c \ +cipher_cast5_hw.c \ +cipher_des.c \ +cipher_des_hw.c \ +cipher_desx.c \ +cipher_desx_hw.c \ +cipher_idea.c \ +cipher_idea_hw.c \ +cipher_rc2.c \ +cipher_rc2_hw.c \ +cipher_rc4.c \ +cipher_rc4_hmac_md5.c \ +cipher_rc4_hmac_md5_hw.c \ +cipher_rc4_hw.c \ +cipher_seed.c \ +cipher_seed_hw.c \ +cipher_tdes_common.c \ + +SRCS += ${PROVIDERS_IMPLEMENTATIONS_CIPHERS_SRCS} + +.for legacysrc in ${PROVIDERS_IMPLEMENTATIONS_CIPHERS_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/providers/implementations/ciphers ${PROVIDERS_IMPLEMENTATIONS_CIPHERSCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_digests.inc b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_digests.inc new file mode 100644 index 000000000000..32ae7b8baee0 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_digests.inc @@ -0,0 +1,15 @@ +# $NetBSD: providers_implementations_digests.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/providers/implementations/digests + +PROVIDERS_IMPLEMENTATIONS_DIGESTS_SRCS += \ +md4_prov.c \ +mdc2_prov.c \ +ripemd_prov.c \ +wp_prov.c \ + +SRCS += ${PROVIDERS_IMPLEMENTATIONS_DIGESTS_SRCS} + +.for legacysrc in ${PROVIDERS_IMPLEMENTATIONS_DIGESTS_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/providers/implementations/digests ${PROVIDERS_IMPLEMENTATIONS_DIGESTSCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_kdfs.inc b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_kdfs.inc new file mode 100644 index 000000000000..f1a4fa273e04 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_kdfs.inc @@ -0,0 +1,12 @@ +# $NetBSD: providers_implementations_kdfs.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +.PATH: ${OPENSSLSRC}/providers/implementations/kdfs + +PROVIDERS_IMPLEMENTATIONS_KDFS_SRCS += \ +pbkdf1.c \ + +SRCS += ${PROVIDERS_IMPLEMENTATIONS_KDFS_SRCS} + +.for legacysrc in ${PROVIDERS_IMPLEMENTATIONS_KDFS_SRCS} +CPPFLAGS.${legacysrc} += -I${OPENSSLSRC}/providers/implementations/kdfs ${PROVIDERS_IMPLEMENTATIONS_KDFSCPPFLAGS} +.endfor diff --git a/crypto/external/bsd/openssl/lib/liblegacy/srcs.inc b/crypto/external/bsd/openssl/lib/liblegacy/srcs.inc new file mode 100644 index 000000000000..25658f7ca946 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/liblegacy/srcs.inc @@ -0,0 +1,19 @@ +# $NetBSD: srcs.inc,v 1.1 2023/05/07 16:22:10 christos Exp $ + +LEGACYINCS= \ +crypto.inc \ +crypto_des.inc \ +crypto_md5.inc \ +providers.inc \ +providers_common.inc \ +providers_implementations_ciphers.inc \ +providers_implementations_digests.inc \ +providers_implementations_kdfs.inc \ + +.for legacyinc in ${LEGACYINCS} +.if exists(${.CURDIR}/arch/${LEGACY_MACHINE_CPU}/${legacyinc}) +.include "${.CURDIR}/arch/${LEGACY_MACHINE_CPU}/${legacyinc}" +.else +.include "${legacyinc}" +.endif +.endfor