Makefile.am 11 KB

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