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