1lib_LTLIBRARIES = \ 2 libsodium.la 3 4libsodium_la_SOURCES = \ 5 crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ 6 crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \ 7 crypto_auth/crypto_auth.c \ 8 crypto_auth/hmacsha256/auth_hmacsha256.c \ 9 crypto_auth/hmacsha512/auth_hmacsha512.c \ 10 crypto_auth/hmacsha512256/auth_hmacsha512256.c \ 11 crypto_box/crypto_box.c \ 12 crypto_box/crypto_box_easy.c \ 13 crypto_box/crypto_box_seal.c \ 14 crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c \ 15 crypto_core/ed25519/ref10/ed25519_ref10.c \ 16 crypto_core/hchacha20/core_hchacha20.c \ 17 crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c \ 18 crypto_core/hsalsa20/core_hsalsa20.c \ 19 crypto_core/salsa/ref/core_salsa_ref.c \ 20 crypto_generichash/crypto_generichash.c \ 21 crypto_generichash/blake2b/generichash_blake2.c \ 22 crypto_generichash/blake2b/ref/blake2.h \ 23 crypto_generichash/blake2b/ref/blake2b-compress-ref.c \ 24 crypto_generichash/blake2b/ref/blake2b-load-sse2.h \ 25 crypto_generichash/blake2b/ref/blake2b-load-sse41.h \ 26 crypto_generichash/blake2b/ref/blake2b-load-avx2.h \ 27 crypto_generichash/blake2b/ref/blake2b-ref.c \ 28 crypto_generichash/blake2b/ref/generichash_blake2b.c \ 29 crypto_hash/crypto_hash.c \ 30 crypto_hash/sha256/hash_sha256.c \ 31 crypto_hash/sha256/cp/hash_sha256_cp.c \ 32 crypto_hash/sha512/hash_sha512.c \ 33 crypto_hash/sha512/cp/hash_sha512_cp.c \ 34 crypto_kdf/blake2b/kdf_blake2b.c \ 35 crypto_kdf/crypto_kdf.c \ 36 crypto_kx/crypto_kx.c \ 37 crypto_onetimeauth/crypto_onetimeauth.c \ 38 crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ 39 crypto_onetimeauth/poly1305/onetimeauth_poly1305.h \ 40 crypto_onetimeauth/poly1305/donna/poly1305_donna.h \ 41 crypto_onetimeauth/poly1305/donna/poly1305_donna32.h \ 42 crypto_onetimeauth/poly1305/donna/poly1305_donna64.h \ 43 crypto_onetimeauth/poly1305/donna/poly1305_donna.c \ 44 crypto_pwhash/argon2/argon2-core.c \ 45 crypto_pwhash/argon2/argon2-core.h \ 46 crypto_pwhash/argon2/argon2-encoding.c \ 47 crypto_pwhash/argon2/argon2-encoding.h \ 48 crypto_pwhash/argon2/argon2-fill-block-ref.c \ 49 crypto_pwhash/argon2/argon2.c \ 50 crypto_pwhash/argon2/argon2.h \ 51 crypto_pwhash/argon2/blake2b-long.c \ 52 crypto_pwhash/argon2/blake2b-long.h \ 53 crypto_pwhash/argon2/blamka-round-ref.h \ 54 crypto_pwhash/argon2/pwhash_argon2i.c \ 55 crypto_pwhash/argon2/pwhash_argon2id.c \ 56 crypto_pwhash/crypto_pwhash.c \ 57 crypto_scalarmult/crypto_scalarmult.c \ 58 crypto_scalarmult/curve25519/ref10/x25519_ref10.c \ 59 crypto_scalarmult/curve25519/ref10/x25519_ref10.h \ 60 crypto_scalarmult/curve25519/scalarmult_curve25519.c \ 61 crypto_scalarmult/curve25519/scalarmult_curve25519.h \ 62 crypto_secretbox/crypto_secretbox.c \ 63 crypto_secretbox/crypto_secretbox_easy.c \ 64 crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c \ 65 crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c \ 66 crypto_shorthash/crypto_shorthash.c \ 67 crypto_shorthash/siphash24/shorthash_siphash24.c \ 68 crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c \ 69 crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h \ 70 crypto_sign/crypto_sign.c \ 71 crypto_sign/ed25519/sign_ed25519.c \ 72 crypto_sign/ed25519/ref10/keypair.c \ 73 crypto_sign/ed25519/ref10/open.c \ 74 crypto_sign/ed25519/ref10/sign.c \ 75 crypto_sign/ed25519/ref10/sign_ed25519_ref10.h \ 76 crypto_stream/chacha20/stream_chacha20.c \ 77 crypto_stream/chacha20/stream_chacha20.h \ 78 crypto_stream/chacha20/ref/chacha20_ref.h \ 79 crypto_stream/chacha20/ref/chacha20_ref.c \ 80 crypto_stream/crypto_stream.c \ 81 crypto_stream/salsa20/stream_salsa20.c \ 82 crypto_stream/salsa20/stream_salsa20.h \ 83 crypto_stream/xsalsa20/stream_xsalsa20.c \ 84 crypto_verify/sodium/verify.c \ 85 include/sodium/private/common.h \ 86 include/sodium/private/ed25519_ref10.h \ 87 include/sodium/private/implementations.h \ 88 include/sodium/private/mutex.h \ 89 include/sodium/private/sse2_64_32.h \ 90 randombytes/randombytes.c \ 91 sodium/codecs.c \ 92 sodium/core.c \ 93 sodium/runtime.c \ 94 sodium/utils.c \ 95 sodium/version.c 96 97if HAVE_TI_MODE 98libsodium_la_SOURCES += \ 99 crypto_core/ed25519/ref10/fe_51/base.h \ 100 crypto_core/ed25519/ref10/fe_51/base2.h \ 101 crypto_core/ed25519/ref10/fe_51/constants.h \ 102 crypto_core/ed25519/ref10/fe_51/fe.h \ 103 include/sodium/private/ed25519_ref10_fe_51.h 104else 105libsodium_la_SOURCES += \ 106 crypto_core/ed25519/ref10/fe_25_5/base.h \ 107 crypto_core/ed25519/ref10/fe_25_5/base2.h \ 108 crypto_core/ed25519/ref10/fe_25_5/constants.h \ 109 crypto_core/ed25519/ref10/fe_25_5/fe.h \ 110 include/sodium/private/ed25519_ref10_fe_25_5.h 111endif 112 113if HAVE_AMD64_ASM 114libsodium_la_SOURCES += \ 115 crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S \ 116 crypto_stream/salsa20/xmm6/salsa20_xmm6.c \ 117 crypto_stream/salsa20/xmm6/salsa20_xmm6.h 118else 119libsodium_la_SOURCES += \ 120 crypto_stream/salsa20/ref/salsa20_ref.c \ 121 crypto_stream/salsa20/ref/salsa20_ref.h 122endif 123 124noinst_HEADERS = \ 125 crypto_scalarmult/curve25519/sandy2x/consts.S \ 126 crypto_scalarmult/curve25519/sandy2x/fe51_mul.S \ 127 crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S \ 128 crypto_scalarmult/curve25519/sandy2x/fe51_pack.S \ 129 crypto_scalarmult/curve25519/sandy2x/ladder.S \ 130 crypto_scalarmult/curve25519/sandy2x/ladder_base.S 131 132if HAVE_AVX_ASM 133libsodium_la_SOURCES += \ 134 crypto_scalarmult/curve25519/sandy2x/consts_namespace.h \ 135 crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c \ 136 crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h \ 137 crypto_scalarmult/curve25519/sandy2x/fe.h \ 138 crypto_scalarmult/curve25519/sandy2x/fe51.h \ 139 crypto_scalarmult/curve25519/sandy2x/fe51_invert.c \ 140 crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h \ 141 crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c \ 142 crypto_scalarmult/curve25519/sandy2x/ladder.h \ 143 crypto_scalarmult/curve25519/sandy2x/ladder_base.h \ 144 crypto_scalarmult/curve25519/sandy2x/ladder_base_namespace.h \ 145 crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h \ 146 crypto_scalarmult/curve25519/sandy2x/sandy2x.S 147endif 148 149if !MINIMAL 150libsodium_la_SOURCES += \ 151 crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c \ 152 crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ 153 crypto_core/ed25519/core_ed25519.c \ 154 crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ 155 crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ 156 crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ 157 crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c \ 158 crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h \ 159 crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c \ 160 crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c \ 161 crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c \ 162 crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c \ 163 crypto_shorthash/siphash24/shorthash_siphashx24.c \ 164 crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c \ 165 crypto_sign/ed25519/ref10/obsolete.c \ 166 crypto_stream/salsa2012/ref/stream_salsa2012_ref.c \ 167 crypto_stream/salsa2012/stream_salsa2012.c \ 168 crypto_stream/salsa208/ref/stream_salsa208_ref.c \ 169 crypto_stream/salsa208/stream_salsa208.c \ 170 crypto_stream/xchacha20/stream_xchacha20.c 171endif 172 173randombytes_salsa20_randombytes_salsa20_random_CFLAGS = @CFLAGS_RDRAND@ 174 175libsodium_la_LDFLAGS = \ 176 $(AM_LDFLAGS) \ 177 -export-dynamic \ 178 -no-undefined \ 179 $(LIBTOOL_EXTRA_FLAGS) 180 181libsodium_la_CPPFLAGS = \ 182 $(LTDLINCL) \ 183 -I$(srcdir)/include/sodium \ 184 -I$(builddir)/include/sodium 185 186if HAVE_LD_OUTPUT_DEF 187libsodium_la_LDFLAGS += -Wl,--output-def,libsodium-$(DLL_VERSION).def 188defexecdir = $(bindir) 189defexec_DATA = libsodium-$(DLL_VERSION).def 190CLEANFILES = $(defexec_DATA) 191libsodium-$(DLL_VERSION).def: libsodium.la 192endif 193 194SUBDIRS = \ 195 include 196 197libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la 198noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la 199 200librdrand_la_LDFLAGS = $(libsodium_la_LDFLAGS) 201librdrand_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 202 @CFLAGS_RDRAND@ 203librdrand_la_SOURCES = \ 204 randombytes/salsa20/randombytes_salsa20_random.c 205 206if !EMSCRIPTEN 207libsodium_la_LIBADD += librdrand.la 208noinst_LTLIBRARIES += librdrand.la 209 210if NATIVECLIENT 211libsodium_la_SOURCES += \ 212 randombytes/nativeclient/randombytes_nativeclient.c 213else 214libsodium_la_SOURCES += \ 215 randombytes/sysrandom/randombytes_sysrandom.c 216endif 217 218endif 219 220libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS) 221libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 222 @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ 223libaesni_la_SOURCES = \ 224 crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c 225 226libsse2_la_LDFLAGS = $(libsodium_la_LDFLAGS) 227libsse2_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 228 @CFLAGS_SSE2@ 229libsse2_la_SOURCES = \ 230 crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c \ 231 crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h 232if !MINIMAL 233libsse2_la_SOURCES += \ 234 crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c 235endif 236 237if !HAVE_AMD64_ASM 238libsse2_la_SOURCES += \ 239 crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c \ 240 crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h \ 241 crypto_stream/salsa20/xmm6int/u0.h \ 242 crypto_stream/salsa20/xmm6int/u1.h \ 243 crypto_stream/salsa20/xmm6int/u4.h 244endif 245 246libssse3_la_LDFLAGS = $(libsodium_la_LDFLAGS) 247libssse3_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 248 @CFLAGS_SSE2@ @CFLAGS_SSSE3@ 249libssse3_la_SOURCES = \ 250 crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c \ 251 crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h \ 252 crypto_pwhash/argon2/argon2-fill-block-ssse3.c \ 253 crypto_pwhash/argon2/blamka-round-ssse3.h \ 254 crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c \ 255 crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h \ 256 crypto_stream/chacha20/dolbeau/u0.h \ 257 crypto_stream/chacha20/dolbeau/u1.h \ 258 crypto_stream/chacha20/dolbeau/u4.h 259 260libsse41_la_LDFLAGS = $(libsodium_la_LDFLAGS) 261libsse41_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 262 @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_SSE41@ 263libsse41_la_SOURCES = \ 264 crypto_generichash/blake2b/ref/blake2b-compress-sse41.c \ 265 crypto_generichash/blake2b/ref/blake2b-compress-sse41.h 266 267libavx2_la_LDFLAGS = $(libsodium_la_LDFLAGS) 268libavx2_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 269 @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_SSE41@ @CFLAGS_AVX@ @CFLAGS_AVX2@ 270libavx2_la_SOURCES = \ 271 crypto_generichash/blake2b/ref/blake2b-compress-avx2.c \ 272 crypto_generichash/blake2b/ref/blake2b-compress-avx2.h \ 273 crypto_pwhash/argon2/argon2-fill-block-avx2.c \ 274 crypto_pwhash/argon2/blamka-round-avx2.h \ 275 crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c \ 276 crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h \ 277 crypto_stream/chacha20/dolbeau/u8.h \ 278 crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c \ 279 crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h \ 280 crypto_stream/salsa20/xmm6int/u0.h \ 281 crypto_stream/salsa20/xmm6int/u1.h \ 282 crypto_stream/salsa20/xmm6int/u4.h \ 283 crypto_stream/salsa20/xmm6int/u8.h 284 285libavx512f_la_LDFLAGS = $(libsodium_la_LDFLAGS) 286libavx512f_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ 287 @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_SSE41@ @CFLAGS_AVX@ @CFLAGS_AVX2@ @CFLAGS_AVX512F@ 288libavx512f_la_SOURCES = \ 289 crypto_pwhash/argon2/argon2-fill-block-avx512f.c \ 290 crypto_pwhash/argon2/blamka-round-avx512f.h 291