]>
Commit | Line | Data |
---|---|---|
6fac238f | 1 | ACLOCAL_AMFLAGS = -I build-aux/m4 |
f9aac5b0 | 2 | |
78cd96b1 | 3 | lib_LTLIBRARIES = libsecp256k1.la |
78cd96b1 | 4 | include_HEADERS = include/secp256k1.h |
238305fd | 5 | include_HEADERS += include/secp256k1_preallocated.h |
78cd96b1 | 6 | noinst_HEADERS = |
a9f5c8b8 | 7 | noinst_HEADERS += src/scalar.h |
1d52a8b1 PW |
8 | noinst_HEADERS += src/scalar_4x64.h |
9 | noinst_HEADERS += src/scalar_8x32.h | |
83836a95 | 10 | noinst_HEADERS += src/scalar_low.h |
a9f5c8b8 | 11 | noinst_HEADERS += src/scalar_impl.h |
1d52a8b1 PW |
12 | noinst_HEADERS += src/scalar_4x64_impl.h |
13 | noinst_HEADERS += src/scalar_8x32_impl.h | |
83836a95 | 14 | noinst_HEADERS += src/scalar_low_impl.h |
78cd96b1 | 15 | noinst_HEADERS += src/group.h |
11ab5622 | 16 | noinst_HEADERS += src/group_impl.h |
78cd96b1 | 17 | noinst_HEADERS += src/ecdsa.h |
11ab5622 | 18 | noinst_HEADERS += src/ecdsa_impl.h |
e2f71f1e PW |
19 | noinst_HEADERS += src/eckey.h |
20 | noinst_HEADERS += src/eckey_impl.h | |
78cd96b1 | 21 | noinst_HEADERS += src/ecmult.h |
11ab5622 | 22 | noinst_HEADERS += src/ecmult_impl.h |
44015000 AP |
23 | noinst_HEADERS += src/ecmult_const.h |
24 | noinst_HEADERS += src/ecmult_const_impl.h | |
949c1ebb PW |
25 | noinst_HEADERS += src/ecmult_gen.h |
26 | noinst_HEADERS += src/ecmult_gen_impl.h | |
78cd96b1 | 27 | noinst_HEADERS += src/field_10x26.h |
11ab5622 | 28 | noinst_HEADERS += src/field_10x26_impl.h |
78cd96b1 | 29 | noinst_HEADERS += src/field_5x52.h |
11ab5622 PW |
30 | noinst_HEADERS += src/field_5x52_impl.h |
31 | noinst_HEADERS += src/field_5x52_int128_impl.h | |
32 | noinst_HEADERS += src/field_5x52_asm_impl.h | |
8e415acb PD |
33 | noinst_HEADERS += src/modinv32.h |
34 | noinst_HEADERS += src/modinv32_impl.h | |
35 | noinst_HEADERS += src/modinv64.h | |
36 | noinst_HEADERS += src/modinv64_impl.h | |
7c068998 | 37 | noinst_HEADERS += src/assumptions.h |
78cd96b1 | 38 | noinst_HEADERS += src/util.h |
548de42e AP |
39 | noinst_HEADERS += src/scratch.h |
40 | noinst_HEADERS += src/scratch_impl.h | |
8bc6aeff | 41 | noinst_HEADERS += src/selftest.h |
861f9a59 GM |
42 | noinst_HEADERS += src/testrand.h |
43 | noinst_HEADERS += src/testrand_impl.h | |
bbd5ba7c PW |
44 | noinst_HEADERS += src/hash.h |
45 | noinst_HEADERS += src/hash_impl.h | |
78cd96b1 | 46 | noinst_HEADERS += src/field.h |
11ab5622 | 47 | noinst_HEADERS += src/field_impl.h |
6558a267 | 48 | noinst_HEADERS += src/bench.h |
fea19e7b | 49 | noinst_HEADERS += contrib/lax_der_parsing.h |
eed87af1 | 50 | noinst_HEADERS += contrib/lax_der_parsing.c |
4a243da4 | 51 | noinst_HEADERS += contrib/lax_der_privatekey_parsing.h |
eed87af1 | 52 | noinst_HEADERS += contrib/lax_der_privatekey_parsing.c |
78cd96b1 | 53 | |
001f1763 WL |
54 | if USE_EXTERNAL_ASM |
55 | COMMON_LIB = libsecp256k1_common.la | |
56 | noinst_LTLIBRARIES = $(COMMON_LIB) | |
57 | else | |
58 | COMMON_LIB = | |
59 | endif | |
60 | ||
81b2faeb | 61 | pkgconfigdir = $(libdir)/pkgconfig |
c7ee71f7 AT |
62 | pkgconfig_DATA = libsecp256k1.pc |
63 | ||
001f1763 WL |
64 | if USE_EXTERNAL_ASM |
65 | if USE_ASM_ARM | |
66 | libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s | |
67 | endif | |
68 | endif | |
69 | ||
8881212e | 70 | libsecp256k1_la_SOURCES = src/secp256k1.c |
ae9e6485 | 71 | libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) |
642cd062 | 72 | libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) |
8881212e | 73 | |
7b50483a GM |
74 | if VALGRIND_ENABLED |
75 | libsecp256k1_la_CPPFLAGS += -DVALGRIND | |
76 | endif | |
77 | ||
78cd96b1 CF |
78 | noinst_PROGRAMS = |
79 | if USE_BENCHMARK | |
bc65aa79 | 80 | noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult |
504c63d7 | 81 | bench_verify_SOURCES = src/bench_verify.c |
001f1763 | 82 | bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) |
3b7d26b2 | 83 | # SECP_TEST_INCLUDES are only used here for CRYPTO_CPPFLAGS |
ae9e6485 | 84 | bench_verify_CPPFLAGS = $(SECP_TEST_INCLUDES) |
fa5c13ff | 85 | bench_sign_SOURCES = src/bench_sign.c |
001f1763 | 86 | bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) |
039723d5 | 87 | bench_internal_SOURCES = src/bench_internal.c |
001f1763 | 88 | bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB) |
ae9e6485 | 89 | bench_internal_CPPFLAGS = $(SECP_INCLUDES) |
bc65aa79 PW |
90 | bench_ecmult_SOURCES = src/bench_ecmult.c |
91 | bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB) | |
ae9e6485 | 92 | bench_ecmult_CPPFLAGS = $(SECP_INCLUDES) |
78cd96b1 CF |
93 | endif |
94 | ||
20b8877b | 95 | TESTS = |
78cd96b1 CF |
96 | if USE_TESTS |
97 | noinst_PROGRAMS += tests | |
98 | tests_SOURCES = src/tests.c | |
ae9e6485 | 99 | tests_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) |
3d230225 GM |
100 | if VALGRIND_ENABLED |
101 | tests_CPPFLAGS += -DVALGRIND | |
102 | noinst_PROGRAMS += valgrind_ctime_test | |
103 | valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c | |
c8483520 | 104 | valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB) |
3d230225 | 105 | endif |
a724d729 AP |
106 | if !ENABLE_COVERAGE |
107 | tests_CPPFLAGS += -DVERIFY | |
108 | endif | |
001f1763 | 109 | tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) |
78cd96b1 | 110 | tests_LDFLAGS = -static |
20b8877b AP |
111 | TESTS += tests |
112 | endif | |
113 | ||
114 | if USE_EXHAUSTIVE_TESTS | |
115 | noinst_PROGRAMS += exhaustive_tests | |
116 | exhaustive_tests_SOURCES = src/tests_exhaustive.c | |
ae9e6485 | 117 | exhaustive_tests_CPPFLAGS = -I$(top_srcdir)/src $(SECP_INCLUDES) |
a724d729 AP |
118 | if !ENABLE_COVERAGE |
119 | exhaustive_tests_CPPFLAGS += -DVERIFY | |
120 | endif | |
83483869 | 121 | exhaustive_tests_LDADD = $(SECP_LIBS) $(COMMON_LIB) |
20b8877b AP |
122 | exhaustive_tests_LDFLAGS = -static |
123 | TESTS += exhaustive_tests | |
78cd96b1 CF |
124 | endif |
125 | ||
fbecc38a | 126 | if USE_ECMULT_STATIC_PRECOMPUTATION |
dcb2e3b3 | 127 | CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src |
fbecc38a TD |
128 | |
129 | gen_context_OBJECTS = gen_context.o | |
e4ce3936 | 130 | gen_context_BIN = gen_context$(BUILD_EXEEXT) |
dcb2e3b3 | 131 | gen_%.o: src/gen_%.c src/libsecp256k1-config.h |
2161f317 | 132 | $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@ |
fbecc38a | 133 | |
e4ce3936 | 134 | $(gen_context_BIN): $(gen_context_OBJECTS) |
a34bcaad | 135 | $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@ |
fbecc38a | 136 | |
b8e39ac5 CF |
137 | $(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h |
138 | $(tests_OBJECTS): src/ecmult_static_context.h | |
6da1446d | 139 | $(bench_internal_OBJECTS): src/ecmult_static_context.h |
bc65aa79 | 140 | $(bench_ecmult_OBJECTS): src/ecmult_static_context.h |
fbecc38a | 141 | |
e4ce3936 CF |
142 | src/ecmult_static_context.h: $(gen_context_BIN) |
143 | ./$(gen_context_BIN) | |
c37812f5 | 144 | |
642cd062 | 145 | CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h |
fbecc38a TD |
146 | endif |
147 | ||
642cd062 | 148 | EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h |
0739bbb6 AP |
149 | |
150 | if ENABLE_MODULE_ECDH | |
151 | include src/modules/ecdh/Makefile.am.include | |
152 | endif | |
a5a66c70 | 153 | |
9f443be0 PW |
154 | if ENABLE_MODULE_RECOVERY |
155 | include src/modules/recovery/Makefile.am.include | |
156 | endif | |
47e6618e JN |
157 | |
158 | if ENABLE_MODULE_EXTRAKEYS | |
159 | include src/modules/extrakeys/Makefile.am.include | |
160 | endif | |
7a703fd9 JN |
161 | |
162 | if ENABLE_MODULE_SCHNORRSIG | |
163 | include src/modules/schnorrsig/Makefile.am.include | |
164 | endif |