Tidy up libsodium makefile and config fragments.diff -r1.4 -r1.5 src/sys/external/isc/libsodium/conf/files.libsodium
(riastradh)
--- src/sys/external/isc/libsodium/conf/files.libsodium 2020/08/21 06:37:30 1.4
+++ src/sys/external/isc/libsodium/conf/files.libsodium 2020/08/26 15:49:56 1.5
@@ -1,38 +1,25 @@ | @@ -1,38 +1,25 @@ | |||
1 | # $NetBSD: files.libsodium,v 1.4 2020/08/21 06:37:30 riastradh Exp $ | 1 | # $NetBSD: files.libsodium,v 1.5 2020/08/26 15:49:56 riastradh Exp $ | |
2 | 2 | |||
3 | define libsodium | 3 | define libsodium | |
4 | 4 | |||
5 | makeoptions libsodium SODIUM_CPPFLAGS+="-I$S/external/isc/libsodium/include" | 5 | makeoptions libsodium "CPPFLAGS.libsodium"+="-I$S/external/isc/libsodium/include" | |
6 | makeoptions libsodium SODIUM_CPPFLAGS+="-I$S/external/isc/libsodium/dist/src/libsodium/include/sodium" | 6 | makeoptions libsodium "CPPFLAGS.libsodium"+="-I$S/external/isc/libsodium/dist/src/libsodium/include/sodium" | |
7 | 7 | |||
8 | #makeoptions libsodium SODIUM_CPPFLAGS+="-DHAVE_TI_MODE" | 8 | #makeoptions libsodium "CPPFLAGS.libsodium"+="-DHAVE_TI_MODE" | |
9 | 9 | |||
10 | makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-shadow" | 10 | makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-shadow" | |
11 | makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-unused-function" | 11 | makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-unused-function" | |
12 | makeoptions libsodium SODIUM_CPPFLAGS+="-Wno-unused-variable" | 12 | makeoptions libsodium "CWARNFLAGS.libsodium"+="-Wno-unused-variable" | |
13 | ||||
14 | makeoptions libsodium "CPPFLAGS.x25519_ref10.c"+="${SODIUM_CPPFLAGS}" | |||
15 | makeoptions libsodium "CPPFLAGS.scalarmult_curve25519.c"+="${SODIUM_CPPFLAGS}" | |||
16 | makeoptions libsodium "CPPFLAGS.crypto_scalarmult.c"+="${SODIUM_CPPFLAGS}" | |||
17 | makeoptions libsodium "CPPFLAGS.poly1305_donna.c"+="${SODIUM_CPPFLAGS}" | |||
18 | makeoptions libsodium "CPPFLAGS.onetimeauth_poly1305.c"+="${SODIUM_CPPFLAGS}" | |||
19 | makeoptions libsodium "CPPFLAGS.crypto_onetimeauth.c"+="${SODIUM_CPPFLAGS}" | |||
20 | makeoptions libsodium "CPPFLAGS.chacha20_ref.c"+="${SODIUM_CPPFLAGS}" | |||
21 | makeoptions libsodium "CPPFLAGS.stream_chacha20.c"+="${SODIUM_CPPFLAGS}" | |||
22 | makeoptions libsodium "CPPFLAGS.aead_xchacha20poly1305.c"+="${SODIUM_CPPFLAGS}" | |||
23 | makeoptions libsodium "CPPFLAGS.aead_chacha20poly1305.c"+="${SODIUM_CPPFLAGS}" | |||
24 | makeoptions libsodium "CPPFLAGS.core_hchacha20.c"+="${SODIUM_CPPFLAGS}" | |||
25 | makeoptions libsodium "CPPFLAGS.ed25519_ref10.c"+="${SODIUM_CPPFLAGS}" | |||
26 | 13 | |||
27 | file external/isc/libsodium/src/glue.c libsodium | 14 | file external/isc/libsodium/src/glue.c libsodium | |
28 | 15 | |||
29 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c libsodium | 16 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c libsodium | |
30 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c libsodium | 17 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c libsodium | |
31 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/crypto_scalarmult.c libsodium | 18 | file external/isc/libsodium/dist/src/libsodium/crypto_scalarmult/crypto_scalarmult.c libsodium | |
32 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c libsodium | 19 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c libsodium | |
33 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c libsodium | 20 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c libsodium | |
34 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c libsodium | 21 | file external/isc/libsodium/dist/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c libsodium | |
35 | file external/isc/libsodium/dist/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c libsodium | 22 | file external/isc/libsodium/dist/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c libsodium | |
36 | file external/isc/libsodium/dist/src/libsodium/crypto_stream/chacha20/stream_chacha20.c libsodium | 23 | file external/isc/libsodium/dist/src/libsodium/crypto_stream/chacha20/stream_chacha20.c libsodium | |
37 | file external/isc/libsodium/dist/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c libsodium | 24 | file external/isc/libsodium/dist/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c libsodium | |
38 | file external/isc/libsodium/dist/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c libsodium | 25 | file external/isc/libsodium/dist/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c libsodium |
--- src/sys/rump/kern/lib/libcrypto/Makefile 2020/08/21 06:37:30 1.19
+++ src/sys/rump/kern/lib/libcrypto/Makefile 2020/08/26 15:49:56 1.20
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.19 2020/08/21 06:37:30 riastradh Exp $ | 1 | # $NetBSD: Makefile,v 1.20 2020/08/26 15:49:56 riastradh Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | SODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium | 4 | SODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium | |
5 | SODIUM_DIR=${.CURDIR}/../../../../external/isc/libsodium/dist/src/libsodium | 5 | SODIUM_DIR=${.CURDIR}/../../../../external/isc/libsodium/dist/src/libsodium | |
6 | 6 | |||
7 | .PATH: ${.CURDIR}/../../../../crypto/adiantum \ | 7 | .PATH: ${.CURDIR}/../../../../crypto/adiantum \ | |
8 | ${.CURDIR}/../../../../crypto/aes \ | 8 | ${.CURDIR}/../../../../crypto/aes \ | |
9 | ${.CURDIR}/../../../../crypto/blake2 \ | 9 | ${.CURDIR}/../../../../crypto/blake2 \ | |
10 | ${.CURDIR}/../../../../crypto/blowfish \ | 10 | ${.CURDIR}/../../../../crypto/blowfish \ | |
11 | ${.CURDIR}/../../../../crypto/camellia \ | 11 | ${.CURDIR}/../../../../crypto/camellia \ | |
12 | ${.CURDIR}/../../../../crypto/cast128 \ | 12 | ${.CURDIR}/../../../../crypto/cast128 \ | |
13 | ${.CURDIR}/../../../../crypto/des \ | 13 | ${.CURDIR}/../../../../crypto/des \ | |
14 | ${.CURDIR}/../../../../crypto/skipjack \ | 14 | ${.CURDIR}/../../../../crypto/skipjack \ | |
@@ -50,45 +50,45 @@ SRCS+= camellia.c camellia-api.c | @@ -50,45 +50,45 @@ SRCS+= camellia.c camellia-api.c | |||
50 | 50 | |||
51 | # cast128 | 51 | # cast128 | |
52 | SRCS+= cast128.c | 52 | SRCS+= cast128.c | |
53 | 53 | |||
54 | # DES | 54 | # DES | |
55 | SRCS+= des_ecb.c des_setkey.c des_enc.c des_cbc.c des_module.c | 55 | SRCS+= des_ecb.c des_setkey.c des_enc.c des_cbc.c des_module.c | |
56 | 56 | |||
57 | # skipjack | 57 | # skipjack | |
58 | SRCS+= skipjack.c | 58 | SRCS+= skipjack.c | |
59 | 59 | |||
60 | # BLAKE2 | 60 | # BLAKE2 | |
61 | SRCS+= blake2s.c | 61 | SRCS+= blake2s.c | |
62 | 62 | |||
63 | # Various cryptography functions | 63 | # libsodium | |
64 | SODIUM_CPPFLAGS= | |||
65 | SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/include | 64 | SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/include | |
66 | SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium | 65 | SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium | |
67 | 66 | |||
68 | #SODIUM_CPPFLAGS+= -DHAVE_TI_MODE | 67 | #SODIUM_CPPFLAGS+= -DHAVE_TI_MODE | |
69 | 68 | |||
70 | SODIUM_CPPFLAGS+= -Wno-shadow | 69 | SODIUM_CWARNFLAGS+= -Wno-shadow | |
71 | SODIUM_CPPFLAGS+= -Wno-unused-function | 70 | SODIUM_CWARNFLAGS+= -Wno-unused-function | |
72 | SODIUM_CPPFLAGS+= -Wno-unused-variable | 71 | SODIUM_CWARNFLAGS+= -Wno-unused-variable | |
73 | 72 | |||
74 | CPPFLAGS.x25519_ref10.c+= ${SODIUM_CPPFLAGS} | 73 | SODIUM_SRCS+= x25519_ref10.c | |
75 | CPPFLAGS.scalarmult_curve25519.c+= ${SODIUM_CPPFLAGS} | 74 | SODIUM_SRCS+= scalarmult_curve25519.c | |
76 | CPPFLAGS.crypto_scalarmult.c+= ${SODIUM_CPPFLAGS} | 75 | SODIUM_SRCS+= crypto_scalarmult.c | |
77 | CPPFLAGS.poly1305_donna.c+= ${SODIUM_CPPFLAGS} | 76 | SODIUM_SRCS+= poly1305_donna.c | |
78 | CPPFLAGS.onetimeauth_poly1305.c+= ${SODIUM_CPPFLAGS} | 77 | SODIUM_SRCS+= onetimeauth_poly1305.c | |
79 | CPPFLAGS.crypto_onetimeauth.c+= ${SODIUM_CPPFLAGS} | 78 | SODIUM_SRCS+= crypto_onetimeauth.c | |
80 | CPPFLAGS.chacha20_ref.c+= ${SODIUM_CPPFLAGS} | 79 | SODIUM_SRCS+= chacha20_ref.c | |
81 | CPPFLAGS.stream_chacha20.c+= ${SODIUM_CPPFLAGS} | 80 | SODIUM_SRCS+= stream_chacha20.c | |
82 | CPPFLAGS.aead_xchacha20poly1305.c+= ${SODIUM_CPPFLAGS} | 81 | SODIUM_SRCS+= aead_xchacha20poly1305.c | |
83 | CPPFLAGS.aead_chacha20poly1305.c+= ${SODIUM_CPPFLAGS} | 82 | SODIUM_SRCS+= aead_chacha20poly1305.c | |
84 | CPPFLAGS.core_hchacha20.c+= ${SODIUM_CPPFLAGS} | 83 | SODIUM_SRCS+= core_hchacha20.c | |
85 | CPPFLAGS.ed25519_ref10.c+= ${SODIUM_CPPFLAGS} | 84 | SODIUM_SRCS+= ed25519_ref10.c | |
86 | 85 | |||
87 | SRCS+= x25519_ref10.c scalarmult_curve25519.c crypto_scalarmult.c | 86 | SRCS+= ${SODIUM_SRCS} | |
88 | SRCS+= poly1305_donna.c onetimeauth_poly1305.c | 87 | ||
89 | SRCS+= crypto_onetimeauth.c chacha20_ref.c stream_chacha20.c | 88 | .for _s_ in ${SODIUM_SRCS} | |
90 | SRCS+= aead_xchacha20poly1305.c aead_chacha20poly1305.c | 89 | CPPFLAGS.${_s_}+= ${SODIUM_CPPFLAGS} | |
91 | SRCS+= core_hchacha20.c ed25519_ref10.c | 90 | COPTS.${_s_}+= ${SODIUM_CWARNFLAGS} | |
91 | .endfor | |||
92 | 92 | |||
93 | .include <bsd.lib.mk> | 93 | .include <bsd.lib.mk> | |
94 | .include <bsd.klinks.mk> | 94 | .include <bsd.klinks.mk> |