1 ACLOCAL_AMFLAGS = -I build-aux/m4
3 lib_LTLIBRARIES = libsecp256k1.la
5 JNI_LIB = libsecp256k1_jni.la
6 noinst_LTLIBRARIES = $(JNI_LIB)
10 include_HEADERS = include/secp256k1.h
12 noinst_HEADERS += src/scalar.h
13 noinst_HEADERS += src/scalar_4x64.h
14 noinst_HEADERS += src/scalar_8x32.h
15 noinst_HEADERS += src/scalar_low.h
16 noinst_HEADERS += src/scalar_impl.h
17 noinst_HEADERS += src/scalar_4x64_impl.h
18 noinst_HEADERS += src/scalar_8x32_impl.h
19 noinst_HEADERS += src/scalar_low_impl.h
20 noinst_HEADERS += src/group.h
21 noinst_HEADERS += src/group_impl.h
22 noinst_HEADERS += src/num_gmp.h
23 noinst_HEADERS += src/num_gmp_impl.h
24 noinst_HEADERS += src/ecdsa.h
25 noinst_HEADERS += src/ecdsa_impl.h
26 noinst_HEADERS += src/eckey.h
27 noinst_HEADERS += src/eckey_impl.h
28 noinst_HEADERS += src/ecmult.h
29 noinst_HEADERS += src/ecmult_impl.h
30 noinst_HEADERS += src/ecmult_const.h
31 noinst_HEADERS += src/ecmult_const_impl.h
32 noinst_HEADERS += src/ecmult_gen.h
33 noinst_HEADERS += src/ecmult_gen_impl.h
34 noinst_HEADERS += src/num.h
35 noinst_HEADERS += src/num_impl.h
36 noinst_HEADERS += src/field_10x26.h
37 noinst_HEADERS += src/field_10x26_impl.h
38 noinst_HEADERS += src/field_5x52.h
39 noinst_HEADERS += src/field_5x52_impl.h
40 noinst_HEADERS += src/field_5x52_int128_impl.h
41 noinst_HEADERS += src/field_5x52_asm_impl.h
42 noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h
43 noinst_HEADERS += src/java/org_bitcoin_Secp256k1Context.h
44 noinst_HEADERS += src/util.h
45 noinst_HEADERS += src/scratch.h
46 noinst_HEADERS += src/scratch_impl.h
47 noinst_HEADERS += src/testrand.h
48 noinst_HEADERS += src/testrand_impl.h
49 noinst_HEADERS += src/hash.h
50 noinst_HEADERS += src/hash_impl.h
51 noinst_HEADERS += src/field.h
52 noinst_HEADERS += src/field_impl.h
53 noinst_HEADERS += src/bench.h
54 noinst_HEADERS += contrib/lax_der_parsing.h
55 noinst_HEADERS += contrib/lax_der_parsing.c
56 noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
57 noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
60 COMMON_LIB = libsecp256k1_common.la
61 noinst_LTLIBRARIES = $(COMMON_LIB)
66 pkgconfigdir = $(libdir)/pkgconfig
67 pkgconfig_DATA = libsecp256k1.pc
71 libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s
75 libsecp256k1_la_SOURCES = src/secp256k1.c
76 libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
77 libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB)
79 libsecp256k1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c
80 libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES)
84 noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult
85 bench_verify_SOURCES = src/bench_verify.c
86 bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
87 bench_sign_SOURCES = src/bench_sign.c
88 bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
89 bench_internal_SOURCES = src/bench_internal.c
90 bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
91 bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
92 bench_ecmult_SOURCES = src/bench_ecmult.c
93 bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)
94 bench_ecmult_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
99 noinst_PROGRAMS += tests
100 tests_SOURCES = src/tests.c
101 tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
103 tests_CPPFLAGS += -DVERIFY
105 tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
106 tests_LDFLAGS = -static
110 if USE_EXHAUSTIVE_TESTS
111 noinst_PROGRAMS += exhaustive_tests
112 exhaustive_tests_SOURCES = src/tests_exhaustive.c
113 exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
115 exhaustive_tests_CPPFLAGS += -DVERIFY
117 exhaustive_tests_LDADD = $(SECP_LIBS) $(COMMON_LIB)
118 exhaustive_tests_LDFLAGS = -static
119 TESTS += exhaustive_tests
124 JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar
125 CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA)
127 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \
128 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \
129 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \
130 $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java
135 @echo Guava is missing. Fetch it via: \
136 wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O $(@)
139 .stamp-java: $(JAVA_FILES)
141 $(AM_V_at)$(CLASSPATH_ENV) javac $^
146 check-java: libsecp256k1.la $(JAVA_GUAVA) .stamp-java
147 $(AM_V_at)java -Djava.library.path="./:./src:./src/.libs:.libs/" -cp "$(JAVA_GUAVA):$(JAVAROOT)" $(JAVAORG)/NativeSecp256k1Test
152 if USE_ECMULT_STATIC_PRECOMPUTATION
153 CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)
155 gen_context_OBJECTS = gen_context.o
156 gen_context_BIN = gen_context$(BUILD_EXEEXT)
158 $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
160 $(gen_context_BIN): $(gen_context_OBJECTS)
161 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
163 $(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h
164 $(tests_OBJECTS): src/ecmult_static_context.h
165 $(bench_internal_OBJECTS): src/ecmult_static_context.h
166 $(bench_ecmult_OBJECTS): src/ecmult_static_context.h
168 src/ecmult_static_context.h: $(gen_context_BIN)
171 CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java
174 EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES)
176 if ENABLE_MODULE_ECDH
177 include src/modules/ecdh/Makefile.am.include
180 if ENABLE_MODULE_RECOVERY
181 include src/modules/recovery/Makefile.am.include