Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Tidy up libsodium makefile and config fragments.



details:   https://anonhg.NetBSD.org/src/rev/40331f632d17
branches:  trunk
changeset: 937772:40331f632d17
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Aug 26 15:49:56 2020 +0000

description:
Tidy up libsodium makefile and config fragments.

diffstat:

 sys/external/isc/libsodium/conf/files.libsodium |  29 ++++-----------
 sys/rump/kern/lib/libcrypto/Makefile            |  46 ++++++++++++------------
 2 files changed, 31 insertions(+), 44 deletions(-)

diffs (107 lines):

diff -r 38c21f98fbd4 -r 40331f632d17 sys/external/isc/libsodium/conf/files.libsodium
--- a/sys/external/isc/libsodium/conf/files.libsodium   Wed Aug 26 15:49:07 2020 +0000
+++ b/sys/external/isc/libsodium/conf/files.libsodium   Wed Aug 26 15:49:56 2020 +0000
@@ -1,28 +1,15 @@
-#      $NetBSD: files.libsodium,v 1.4 2020/08/21 06:37:30 riastradh Exp $
+#      $NetBSD: files.libsodium,v 1.5 2020/08/26 15:49:56 riastradh Exp $
 
 define         libsodium
 
-makeoptions libsodium SODIUM_CPPFLAGS+="-I$S/external/isc/libsodium/include"
-makeoptions libsodium SODIUM_CPPFLAGS+="-I$S/external/isc/libsodium/dist/src/libsodium/include/sodium"
-
-#makeoptions libsodium SODIUM_CPPFLAGS+="-DHAVE_TI_MODE"
-
-makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-shadow"
-makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-unused-function"
-makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-unused-variable"
+makeoptions libsodium "CPPFLAGS.libsodium"+="-I$S/external/isc/libsodium/include"
+makeoptions libsodium "CPPFLAGS.libsodium"+="-I$S/external/isc/libsodium/dist/src/libsodium/include/sodium"
 
-makeoptions libsodium "CPPFLAGS.x25519_ref10.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.scalarmult_curve25519.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.crypto_scalarmult.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.poly1305_donna.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.onetimeauth_poly1305.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.crypto_onetimeauth.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.chacha20_ref.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.stream_chacha20.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.aead_xchacha20poly1305.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.aead_chacha20poly1305.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.core_hchacha20.c"+="${SODIUM_CPPFLAGS}"
-makeoptions libsodium "CPPFLAGS.ed25519_ref10.c"+="${SODIUM_CPPFLAGS}"
+#makeoptions libsodium "CPPFLAGS.libsodium"+="-DHAVE_TI_MODE"
+
+makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-shadow"
+makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-unused-function"
+makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-unused-variable"
 
 file   external/isc/libsodium/src/glue.c       libsodium
 
diff -r 38c21f98fbd4 -r 40331f632d17 sys/rump/kern/lib/libcrypto/Makefile
--- a/sys/rump/kern/lib/libcrypto/Makefile      Wed Aug 26 15:49:07 2020 +0000
+++ b/sys/rump/kern/lib/libcrypto/Makefile      Wed Aug 26 15:49:56 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.19 2020/08/21 06:37:30 riastradh Exp $
+#      $NetBSD: Makefile,v 1.20 2020/08/26 15:49:56 riastradh Exp $
 #
 
 SODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium
@@ -60,35 +60,35 @@
 # BLAKE2
 SRCS+= blake2s.c
 
-# Various cryptography functions
-SODIUM_CPPFLAGS=
+# libsodium
 SODIUM_CPPFLAGS+=      -I${SODIUM_IMPORTDIR}/include
 SODIUM_CPPFLAGS+=      -I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium
 
 #SODIUM_CPPFLAGS+=     -DHAVE_TI_MODE
 
-SODIUM_CPPFLAGS+=      -Wno-shadow
-SODIUM_CPPFLAGS+=      -Wno-unused-function
-SODIUM_CPPFLAGS+=      -Wno-unused-variable
+SODIUM_CWARNFLAGS+=    -Wno-shadow
+SODIUM_CWARNFLAGS+=    -Wno-unused-function
+SODIUM_CWARNFLAGS+=    -Wno-unused-variable
 
-CPPFLAGS.x25519_ref10.c+=              ${SODIUM_CPPFLAGS}
-CPPFLAGS.scalarmult_curve25519.c+=     ${SODIUM_CPPFLAGS}
-CPPFLAGS.crypto_scalarmult.c+=         ${SODIUM_CPPFLAGS}
-CPPFLAGS.poly1305_donna.c+=            ${SODIUM_CPPFLAGS}
-CPPFLAGS.onetimeauth_poly1305.c+=      ${SODIUM_CPPFLAGS}
-CPPFLAGS.crypto_onetimeauth.c+=                ${SODIUM_CPPFLAGS}
-CPPFLAGS.chacha20_ref.c+=              ${SODIUM_CPPFLAGS}
-CPPFLAGS.stream_chacha20.c+=           ${SODIUM_CPPFLAGS}
-CPPFLAGS.aead_xchacha20poly1305.c+=    ${SODIUM_CPPFLAGS}
-CPPFLAGS.aead_chacha20poly1305.c+=     ${SODIUM_CPPFLAGS}
-CPPFLAGS.core_hchacha20.c+=            ${SODIUM_CPPFLAGS}
-CPPFLAGS.ed25519_ref10.c+=             ${SODIUM_CPPFLAGS}
+SODIUM_SRCS+=  x25519_ref10.c
+SODIUM_SRCS+=  scalarmult_curve25519.c
+SODIUM_SRCS+=  crypto_scalarmult.c
+SODIUM_SRCS+=  poly1305_donna.c
+SODIUM_SRCS+=  onetimeauth_poly1305.c
+SODIUM_SRCS+=  crypto_onetimeauth.c
+SODIUM_SRCS+=  chacha20_ref.c
+SODIUM_SRCS+=  stream_chacha20.c
+SODIUM_SRCS+=  aead_xchacha20poly1305.c
+SODIUM_SRCS+=  aead_chacha20poly1305.c
+SODIUM_SRCS+=  core_hchacha20.c
+SODIUM_SRCS+=  ed25519_ref10.c
 
-SRCS+= x25519_ref10.c scalarmult_curve25519.c crypto_scalarmult.c
-SRCS+= poly1305_donna.c onetimeauth_poly1305.c
-SRCS+= crypto_onetimeauth.c chacha20_ref.c stream_chacha20.c
-SRCS+= aead_xchacha20poly1305.c aead_chacha20poly1305.c
-SRCS+= core_hchacha20.c ed25519_ref10.c
+SRCS+= ${SODIUM_SRCS}
+
+.for _s_ in ${SODIUM_SRCS}
+CPPFLAGS.${_s_}+=      ${SODIUM_CPPFLAGS}
+COPTS.${_s_}+=         ${SODIUM_CWARNFLAGS}
+.endfor
 
 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>



Home | Main Index | Thread Index | Old Index