您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Makefile.am 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ACLOCAL_AMFLAGS = -I build-aux/m4
  2. lib_LTLIBRARIES = libsecp256k1.la
  3. include_HEADERS = include/secp256k1.h
  4. include_HEADERS += include/secp256k1_preallocated.h
  5. noinst_HEADERS =
  6. noinst_HEADERS += src/scalar.h
  7. noinst_HEADERS += src/scalar_4x64.h
  8. noinst_HEADERS += src/scalar_8x32.h
  9. noinst_HEADERS += src/scalar_low.h
  10. noinst_HEADERS += src/scalar_impl.h
  11. noinst_HEADERS += src/scalar_4x64_impl.h
  12. noinst_HEADERS += src/scalar_8x32_impl.h
  13. noinst_HEADERS += src/scalar_low_impl.h
  14. noinst_HEADERS += src/group.h
  15. noinst_HEADERS += src/group_impl.h
  16. noinst_HEADERS += src/num_gmp.h
  17. noinst_HEADERS += src/num_gmp_impl.h
  18. noinst_HEADERS += src/ecdsa.h
  19. noinst_HEADERS += src/ecdsa_impl.h
  20. noinst_HEADERS += src/eckey.h
  21. noinst_HEADERS += src/eckey_impl.h
  22. noinst_HEADERS += src/ecmult.h
  23. noinst_HEADERS += src/ecmult_impl.h
  24. noinst_HEADERS += src/ecmult_const.h
  25. noinst_HEADERS += src/ecmult_const_impl.h
  26. noinst_HEADERS += src/ecmult_gen.h
  27. noinst_HEADERS += src/ecmult_gen_impl.h
  28. noinst_HEADERS += src/num.h
  29. noinst_HEADERS += src/num_impl.h
  30. noinst_HEADERS += src/field_10x26.h
  31. noinst_HEADERS += src/field_10x26_impl.h
  32. noinst_HEADERS += src/field_5x52.h
  33. noinst_HEADERS += src/field_5x52_impl.h
  34. noinst_HEADERS += src/field_5x52_int128_impl.h
  35. noinst_HEADERS += src/field_5x52_asm_impl.h
  36. noinst_HEADERS += src/assumptions.h
  37. noinst_HEADERS += src/util.h
  38. noinst_HEADERS += src/scratch.h
  39. noinst_HEADERS += src/scratch_impl.h
  40. noinst_HEADERS += src/selftest.h
  41. noinst_HEADERS += src/testrand.h
  42. noinst_HEADERS += src/testrand_impl.h
  43. noinst_HEADERS += src/hash.h
  44. noinst_HEADERS += src/hash_impl.h
  45. noinst_HEADERS += src/field.h
  46. noinst_HEADERS += src/field_impl.h
  47. noinst_HEADERS += src/bench.h
  48. noinst_HEADERS += contrib/lax_der_parsing.h
  49. noinst_HEADERS += contrib/lax_der_parsing.c
  50. noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
  51. noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
  52. if USE_EXTERNAL_ASM
  53. COMMON_LIB = libsecp256k1_common.la
  54. noinst_LTLIBRARIES = $(COMMON_LIB)
  55. else
  56. COMMON_LIB =
  57. endif
  58. pkgconfigdir = $(libdir)/pkgconfig
  59. pkgconfig_DATA = libsecp256k1.pc
  60. if USE_EXTERNAL_ASM
  61. if USE_ASM_ARM
  62. libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s
  63. endif
  64. endif
  65. libsecp256k1_la_SOURCES = src/secp256k1.c
  66. libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
  67. libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
  68. if VALGRIND_ENABLED
  69. libsecp256k1_la_CPPFLAGS += -DVALGRIND
  70. endif
  71. noinst_PROGRAMS =
  72. if USE_BENCHMARK
  73. noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult
  74. bench_verify_SOURCES = src/bench_verify.c
  75. bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
  76. # SECP_TEST_INCLUDES are only used here for CRYPTO_CPPFLAGS
  77. bench_verify_CPPFLAGS = -DSECP256K1_BUILD $(SECP_TEST_INCLUDES)
  78. bench_sign_SOURCES = src/bench_sign.c
  79. bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
  80. bench_internal_SOURCES = src/bench_internal.c
  81. bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
  82. bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
  83. bench_ecmult_SOURCES = src/bench_ecmult.c
  84. bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)
  85. bench_ecmult_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
  86. endif
  87. TESTS =
  88. if USE_TESTS
  89. noinst_PROGRAMS += tests
  90. tests_SOURCES = src/tests.c
  91. tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
  92. if VALGRIND_ENABLED
  93. tests_CPPFLAGS += -DVALGRIND
  94. noinst_PROGRAMS += valgrind_ctime_test
  95. valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
  96. valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_LIBS) $(COMMON_LIB)
  97. endif
  98. if !ENABLE_COVERAGE
  99. tests_CPPFLAGS += -DVERIFY
  100. endif
  101. tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
  102. tests_LDFLAGS = -static
  103. TESTS += tests
  104. endif
  105. if USE_EXHAUSTIVE_TESTS
  106. noinst_PROGRAMS += exhaustive_tests
  107. exhaustive_tests_SOURCES = src/tests_exhaustive.c
  108. exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
  109. if !ENABLE_COVERAGE
  110. exhaustive_tests_CPPFLAGS += -DVERIFY
  111. endif
  112. exhaustive_tests_LDADD = $(SECP_LIBS) $(COMMON_LIB)
  113. exhaustive_tests_LDFLAGS = -static
  114. TESTS += exhaustive_tests
  115. endif
  116. if USE_ECMULT_STATIC_PRECOMPUTATION
  117. CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src
  118. gen_context_OBJECTS = gen_context.o
  119. gen_context_BIN = gen_context$(BUILD_EXEEXT)
  120. gen_%.o: src/gen_%.c src/libsecp256k1-config.h
  121. $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
  122. $(gen_context_BIN): $(gen_context_OBJECTS)
  123. $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
  124. $(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h
  125. $(tests_OBJECTS): src/ecmult_static_context.h
  126. $(bench_internal_OBJECTS): src/ecmult_static_context.h
  127. $(bench_ecmult_OBJECTS): src/ecmult_static_context.h
  128. src/ecmult_static_context.h: $(gen_context_BIN)
  129. ./$(gen_context_BIN)
  130. CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h
  131. endif
  132. EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h
  133. if ENABLE_MODULE_ECDH
  134. include src/modules/ecdh/Makefile.am.include
  135. endif
  136. if ENABLE_MODULE_RECOVERY
  137. include src/modules/recovery/Makefile.am.include
  138. endif
  139. if ENABLE_MODULE_EXTRAKEYS
  140. include src/modules/extrakeys/Makefile.am.include
  141. endif
  142. if ENABLE_MODULE_SCHNORRSIG
  143. include src/modules/schnorrsig/Makefile.am.include
  144. endif