Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1ACLOCAL_AMFLAGS = -I autotools-aux/m43# AM_CFLAGS will be automatically prepended to CFLAGS by Automake when compiling some foo4# which does not have an explicit foo_CFLAGS variable set.5AM_CFLAGS = $(SECP_CFLAGS)7lib_LTLIBRARIES = libsecp256k1.la8include_HEADERS = include/secp256k1.h9include_HEADERS += include/secp256k1_preallocated.h10noinst_HEADERS =11noinst_HEADERS += src/scalar.h12noinst_HEADERS += src/scalar_4x64.h13noinst_HEADERS += src/scalar_8x32.h14noinst_HEADERS += src/scalar_low.h15noinst_HEADERS += src/scalar_impl.h16noinst_HEADERS += src/scalar_4x64_impl.h17noinst_HEADERS += src/scalar_8x32_impl.h18noinst_HEADERS += src/scalar_low_impl.h19noinst_HEADERS += src/group.h20noinst_HEADERS += src/group_impl.h21noinst_HEADERS += src/ecdsa.h22noinst_HEADERS += src/ecdsa_impl.h23noinst_HEADERS += src/eckey.h24noinst_HEADERS += src/eckey_impl.h25noinst_HEADERS += src/ecmult.h26noinst_HEADERS += src/ecmult_impl.h27noinst_HEADERS += src/ecmult_compute_table.h28noinst_HEADERS += src/ecmult_compute_table_impl.h29noinst_HEADERS += src/ecmult_const.h30noinst_HEADERS += src/ecmult_const_impl.h31noinst_HEADERS += src/ecmult_gen.h32noinst_HEADERS += src/ecmult_gen_impl.h33noinst_HEADERS += src/ecmult_gen_compute_table.h34noinst_HEADERS += src/ecmult_gen_compute_table_impl.h35noinst_HEADERS += src/field_10x26.h36noinst_HEADERS += src/field_10x26_impl.h37noinst_HEADERS += src/field_5x52.h38noinst_HEADERS += src/field_5x52_impl.h39noinst_HEADERS += src/field_5x52_int128_impl.h40noinst_HEADERS += src/modinv32.h41noinst_HEADERS += src/modinv32_impl.h42noinst_HEADERS += src/modinv64.h43noinst_HEADERS += src/modinv64_impl.h44noinst_HEADERS += src/precomputed_ecmult.h45noinst_HEADERS += src/precomputed_ecmult_gen.h46noinst_HEADERS += src/assumptions.h47noinst_HEADERS += src/checkmem.h48noinst_HEADERS += src/tests_common.h49noinst_HEADERS += src/testutil.h50noinst_HEADERS += src/unit_test.h51noinst_HEADERS += src/unit_test.c52noinst_HEADERS += src/util.h53noinst_HEADERS += src/util_local_visibility.h54noinst_HEADERS += src/int128.h55noinst_HEADERS += src/int128_impl.h56noinst_HEADERS += src/int128_native.h57noinst_HEADERS += src/int128_native_impl.h58noinst_HEADERS += src/int128_struct.h59noinst_HEADERS += src/int128_struct_impl.h60noinst_HEADERS += src/scratch.h61noinst_HEADERS += src/scratch_impl.h62noinst_HEADERS += src/selftest.h63noinst_HEADERS += src/testrand.h64noinst_HEADERS += src/testrand_impl.h65noinst_HEADERS += src/hash.h66noinst_HEADERS += src/hash_impl.h67noinst_HEADERS += src/field.h68noinst_HEADERS += src/field_impl.h69noinst_HEADERS += src/bench.h70noinst_HEADERS += src/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.h71noinst_HEADERS += src/hsort.h72noinst_HEADERS += src/hsort_impl.h73noinst_HEADERS += contrib/lax_der_parsing.h74noinst_HEADERS += contrib/lax_der_parsing.c75noinst_HEADERS += contrib/lax_der_privatekey_parsing.h76noinst_HEADERS += contrib/lax_der_privatekey_parsing.c77noinst_HEADERS += examples/examples_util.h79PRECOMPUTED_LIB = libsecp256k1_precomputed.la80noinst_LTLIBRARIES = $(PRECOMPUTED_LIB)81libsecp256k1_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c82# We need `-I$(top_srcdir)/src` in VPATH builds if libsecp256k1_precomputed_la_SOURCES have been recreated in the build tree.83# This helps users and packagers who insist on recreating the precomputed files (e.g., Gentoo).84libsecp256k1_precomputed_la_CPPFLAGS = -I$(top_srcdir)/src $(SECP_CONFIG_DEFINES)86if USE_EXTERNAL_ASM87COMMON_LIB = libsecp256k1_common.la88else89COMMON_LIB =90endif91noinst_LTLIBRARIES += $(COMMON_LIB)93pkgconfigdir = $(libdir)/pkgconfig94pkgconfig_DATA = libsecp256k1.pc96if USE_EXTERNAL_ASM97if USE_ASM_ARM98libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s99endif100endif102libsecp256k1_la_SOURCES = src/secp256k1.c103libsecp256k1_la_CPPFLAGS = $(SECP_CONFIG_DEFINES)104libsecp256k1_la_LIBADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)105libsecp256k1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)107noinst_PROGRAMS =108if USE_BENCHMARK109noinst_PROGRAMS += bench bench_internal bench_ecmult110bench_SOURCES = src/bench.c111bench_LDADD = libsecp256k1.la112bench_CPPFLAGS = $(SECP_CONFIG_DEFINES)113bench_internal_SOURCES = src/bench_internal.c114bench_internal_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)115bench_internal_CPPFLAGS = $(SECP_CONFIG_DEFINES)116bench_ecmult_SOURCES = src/bench_ecmult.c117bench_ecmult_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)118bench_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES)119endif121TESTS =122if USE_TESTS123TESTS += noverify_tests124noinst_PROGRAMS += noverify_tests125noverify_tests_SOURCES = src/tests.c126noverify_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES) $(TEST_DEFINES)127noverify_tests_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)128noverify_tests_LDFLAGS = -static129if !ENABLE_COVERAGE130TESTS += tests131noinst_PROGRAMS += tests132tests_SOURCES = $(noverify_tests_SOURCES)133tests_CPPFLAGS = $(noverify_tests_CPPFLAGS) -DVERIFY134tests_LDADD = $(noverify_tests_LDADD)135tests_LDFLAGS = $(noverify_tests_LDFLAGS)136endif137endif139if USE_CTIME_TESTS140noinst_PROGRAMS += ctime_tests141ctime_tests_SOURCES = src/ctime_tests.c142ctime_tests_LDADD = libsecp256k1.la143ctime_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)144endif146if USE_EXHAUSTIVE_TESTS147noinst_PROGRAMS += exhaustive_tests148exhaustive_tests_SOURCES = src/tests_exhaustive.c149exhaustive_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)150if !ENABLE_COVERAGE151exhaustive_tests_CPPFLAGS += -DVERIFY152endif153# Note: do not include $(PRECOMPUTED_LIB) in exhaustive_tests (it uses runtime-generated tables).154exhaustive_tests_LDADD = $(COMMON_LIB)155exhaustive_tests_LDFLAGS = -static156TESTS += exhaustive_tests157endif159if USE_EXAMPLES160noinst_PROGRAMS += ecdsa_example161ecdsa_example_SOURCES = examples/ecdsa.c162ecdsa_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC163ecdsa_example_LDADD = libsecp256k1.la164ecdsa_example_LDFLAGS = -static165if BUILD_WINDOWS166ecdsa_example_LDFLAGS += -lbcrypt167endif168TESTS += ecdsa_example169if ENABLE_MODULE_ECDH170noinst_PROGRAMS += ecdh_example171ecdh_example_SOURCES = examples/ecdh.c172ecdh_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC173ecdh_example_LDADD = libsecp256k1.la174ecdh_example_LDFLAGS = -static175if BUILD_WINDOWS176ecdh_example_LDFLAGS += -lbcrypt177endif178TESTS += ecdh_example179endif180if ENABLE_MODULE_SCHNORRSIG181noinst_PROGRAMS += schnorr_example182schnorr_example_SOURCES = examples/schnorr.c183schnorr_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC184schnorr_example_LDADD = libsecp256k1.la185schnorr_example_LDFLAGS = -static186if BUILD_WINDOWS187schnorr_example_LDFLAGS += -lbcrypt188endif189TESTS += schnorr_example190endif191if ENABLE_MODULE_ELLSWIFT192noinst_PROGRAMS += ellswift_example193ellswift_example_SOURCES = examples/ellswift.c194ellswift_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC195ellswift_example_LDADD = libsecp256k1.la196ellswift_example_LDFLAGS = -static197if BUILD_WINDOWS198ellswift_example_LDFLAGS += -lbcrypt199endif200TESTS += ellswift_example201endif202if ENABLE_MODULE_MUSIG203noinst_PROGRAMS += musig_example204musig_example_SOURCES = examples/musig.c205musig_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC206musig_example_LDADD = libsecp256k1.la207musig_example_LDFLAGS = -static208if BUILD_WINDOWS209musig_example_LDFLAGS += -lbcrypt210endif211TESTS += musig_example212endif213if ENABLE_MODULE_SILENTPAYMENTS214noinst_PROGRAMS += silentpayments_example215silentpayments_example_SOURCES = examples/silentpayments.c216silentpayments_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC217silentpayments_example_LDADD = libsecp256k1.la218silentpayments_example_LDFLAGS = -static219if BUILD_WINDOWS220silentpayments_example_LDFLAGS += -lbcrypt221endif222TESTS += silentpayments_example223endif224endif226### Precomputed tables227EXTRA_PROGRAMS = precompute_ecmult precompute_ecmult_gen228CLEANFILES = $(EXTRA_PROGRAMS)230precompute_ecmult_SOURCES = src/precompute_ecmult.c231precompute_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES) -DVERIFY232precompute_ecmult_LDADD = $(COMMON_LIB)234precompute_ecmult_gen_SOURCES = src/precompute_ecmult_gen.c235precompute_ecmult_gen_CPPFLAGS = $(SECP_CONFIG_DEFINES) -DVERIFY236precompute_ecmult_gen_LDADD = $(COMMON_LIB)238# See Automake manual, Section "Errors with distclean".239# We don't list any dependencies for the prebuilt files here because240# otherwise make's decision whether to rebuild them (even in the first241# build by a normal user) depends on mtimes, and thus is very fragile.242# This means that rebuilds of the prebuilt files always need to be243# forced by deleting them.244src/precomputed_ecmult.c:245$(MAKE) $(AM_MAKEFLAGS) precompute_ecmult$(EXEEXT)246./precompute_ecmult$(EXEEXT)247src/precomputed_ecmult_gen.c:248$(MAKE) $(AM_MAKEFLAGS) precompute_ecmult_gen$(EXEEXT)249./precompute_ecmult_gen$(EXEEXT)
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.