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