]> Git Repo - secp256k1.git/blame_incremental - Makefile.am
variable signing precompute table
[secp256k1.git] / Makefile.am
... / ...
CommitLineData
1ACLOCAL_AMFLAGS = -I build-aux/m4
2
3lib_LTLIBRARIES = libsecp256k1.la
4if USE_JNI
5JNI_LIB = libsecp256k1_jni.la
6noinst_LTLIBRARIES = $(JNI_LIB)
7else
8JNI_LIB =
9endif
10include_HEADERS = include/secp256k1.h
11include_HEADERS += include/secp256k1_preallocated.h
12noinst_HEADERS =
13noinst_HEADERS += src/scalar.h
14noinst_HEADERS += src/scalar_4x64.h
15noinst_HEADERS += src/scalar_8x32.h
16noinst_HEADERS += src/scalar_low.h
17noinst_HEADERS += src/scalar_impl.h
18noinst_HEADERS += src/scalar_4x64_impl.h
19noinst_HEADERS += src/scalar_8x32_impl.h
20noinst_HEADERS += src/scalar_low_impl.h
21noinst_HEADERS += src/group.h
22noinst_HEADERS += src/group_impl.h
23noinst_HEADERS += src/num_gmp.h
24noinst_HEADERS += src/num_gmp_impl.h
25noinst_HEADERS += src/ecdsa.h
26noinst_HEADERS += src/ecdsa_impl.h
27noinst_HEADERS += src/eckey.h
28noinst_HEADERS += src/eckey_impl.h
29noinst_HEADERS += src/ecmult.h
30noinst_HEADERS += src/ecmult_impl.h
31noinst_HEADERS += src/ecmult_const.h
32noinst_HEADERS += src/ecmult_const_impl.h
33noinst_HEADERS += src/ecmult_gen.h
34noinst_HEADERS += src/ecmult_gen_impl.h
35noinst_HEADERS += src/num.h
36noinst_HEADERS += src/num_impl.h
37noinst_HEADERS += src/field_10x26.h
38noinst_HEADERS += src/field_10x26_impl.h
39noinst_HEADERS += src/field_5x52.h
40noinst_HEADERS += src/field_5x52_impl.h
41noinst_HEADERS += src/field_5x52_int128_impl.h
42noinst_HEADERS += src/field_5x52_asm_impl.h
43noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h
44noinst_HEADERS += src/java/org_bitcoin_Secp256k1Context.h
45noinst_HEADERS += src/util.h
46noinst_HEADERS += src/scratch.h
47noinst_HEADERS += src/scratch_impl.h
48noinst_HEADERS += src/testrand.h
49noinst_HEADERS += src/testrand_impl.h
50noinst_HEADERS += src/hash.h
51noinst_HEADERS += src/hash_impl.h
52noinst_HEADERS += src/field.h
53noinst_HEADERS += src/field_impl.h
54noinst_HEADERS += src/bench.h
55noinst_HEADERS += contrib/lax_der_parsing.h
56noinst_HEADERS += contrib/lax_der_parsing.c
57noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
58noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
59
60if USE_EXTERNAL_ASM
61COMMON_LIB = libsecp256k1_common.la
62noinst_LTLIBRARIES = $(COMMON_LIB)
63else
64COMMON_LIB =
65endif
66
67pkgconfigdir = $(libdir)/pkgconfig
68pkgconfig_DATA = libsecp256k1.pc
69
70if USE_EXTERNAL_ASM
71if USE_ASM_ARM
72libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s
73endif
74endif
75
76libsecp256k1_la_SOURCES = src/secp256k1.c
77libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
78libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB)
79
80libsecp256k1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c
81libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES)
82
83noinst_PROGRAMS =
84if USE_BENCHMARK
85noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult
86bench_verify_SOURCES = src/bench_verify.c
87bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
88bench_sign_SOURCES = src/bench_sign.c
89bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
90bench_internal_SOURCES = src/bench_internal.c
91bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
92bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
93bench_ecmult_SOURCES = src/bench_ecmult.c
94bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)
95bench_ecmult_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
96endif
97
98TESTS =
99if USE_TESTS
100noinst_PROGRAMS += tests
101tests_SOURCES = src/tests.c
102tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
103if !ENABLE_COVERAGE
104tests_CPPFLAGS += -DVERIFY
105endif
106tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
107tests_LDFLAGS = -static
108TESTS += tests
109endif
110
111if USE_EXHAUSTIVE_TESTS
112noinst_PROGRAMS += exhaustive_tests
113exhaustive_tests_SOURCES = src/tests_exhaustive.c
114exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
115if !ENABLE_COVERAGE
116exhaustive_tests_CPPFLAGS += -DVERIFY
117endif
118exhaustive_tests_LDADD = $(SECP_LIBS) $(COMMON_LIB)
119exhaustive_tests_LDFLAGS = -static
120TESTS += exhaustive_tests
121endif
122
123JAVAROOT=src/java
124JAVAORG=org/bitcoin
125JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar
126CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA)
127JAVA_FILES= \
128 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \
129 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \
130 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \
131 $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java
132
133if USE_JNI
134
135$(JAVA_GUAVA):
136 @echo Guava is missing. Fetch it via: \
137 wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O $(@)
138 @false
139
140.stamp-java: $(JAVA_FILES)
141 @echo Compiling $^
142 $(AM_V_at)$(CLASSPATH_ENV) javac $^
143 @touch $@
144
145if USE_TESTS
146
147check-java: libsecp256k1.la $(JAVA_GUAVA) .stamp-java
148 $(AM_V_at)java -Djava.library.path="./:./src:./src/.libs:.libs/" -cp "$(JAVA_GUAVA):$(JAVAROOT)" $(JAVAORG)/NativeSecp256k1Test
149
150endif
151endif
152
153if USE_ECMULT_STATIC_PRECOMPUTATION
154CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src
155
156gen_context_OBJECTS = gen_context.o
157gen_context_BIN = gen_context$(BUILD_EXEEXT)
158gen_%.o: src/gen_%.c src/libsecp256k1-config.h
159 $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
160
161$(gen_context_BIN): $(gen_context_OBJECTS)
162 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
163
164$(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h
165$(tests_OBJECTS): src/ecmult_static_context.h
166$(bench_internal_OBJECTS): src/ecmult_static_context.h
167$(bench_ecmult_OBJECTS): src/ecmult_static_context.h
168
169src/ecmult_static_context.h: $(gen_context_BIN)
170 ./$(gen_context_BIN)
171
172CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java
173endif
174
175EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES)
176
177if ENABLE_MODULE_ECDH
178include src/modules/ecdh/Makefile.am.include
179endif
180
181if ENABLE_MODULE_RECOVERY
182include src/modules/recovery/Makefile.am.include
183endif
This page took 0.023421 seconds and 4 git commands to generate.