]> Git Repo - secp256k1.git/blame - Makefile.am
Merge #479: Get rid of reserved _t in type names
[secp256k1.git] / Makefile.am
CommitLineData
6fac238f 1ACLOCAL_AMFLAGS = -I build-aux/m4
f9aac5b0 2
78cd96b1 3lib_LTLIBRARIES = libsecp256k1.la
3093576a
G
4if USE_JNI
5JNI_LIB = libsecp256k1_jni.la
6noinst_LTLIBRARIES = $(JNI_LIB)
7else
8JNI_LIB =
9endif
78cd96b1
CF
10include_HEADERS = include/secp256k1.h
11noinst_HEADERS =
a9f5c8b8 12noinst_HEADERS += src/scalar.h
1d52a8b1
PW
13noinst_HEADERS += src/scalar_4x64.h
14noinst_HEADERS += src/scalar_8x32.h
83836a95 15noinst_HEADERS += src/scalar_low.h
a9f5c8b8 16noinst_HEADERS += src/scalar_impl.h
1d52a8b1
PW
17noinst_HEADERS += src/scalar_4x64_impl.h
18noinst_HEADERS += src/scalar_8x32_impl.h
83836a95 19noinst_HEADERS += src/scalar_low_impl.h
78cd96b1 20noinst_HEADERS += src/group.h
11ab5622 21noinst_HEADERS += src/group_impl.h
78cd96b1 22noinst_HEADERS += src/num_gmp.h
11ab5622 23noinst_HEADERS += src/num_gmp_impl.h
78cd96b1 24noinst_HEADERS += src/ecdsa.h
11ab5622 25noinst_HEADERS += src/ecdsa_impl.h
e2f71f1e
PW
26noinst_HEADERS += src/eckey.h
27noinst_HEADERS += src/eckey_impl.h
78cd96b1 28noinst_HEADERS += src/ecmult.h
11ab5622 29noinst_HEADERS += src/ecmult_impl.h
44015000
AP
30noinst_HEADERS += src/ecmult_const.h
31noinst_HEADERS += src/ecmult_const_impl.h
949c1ebb
PW
32noinst_HEADERS += src/ecmult_gen.h
33noinst_HEADERS += src/ecmult_gen_impl.h
78cd96b1 34noinst_HEADERS += src/num.h
11ab5622 35noinst_HEADERS += src/num_impl.h
78cd96b1 36noinst_HEADERS += src/field_10x26.h
11ab5622 37noinst_HEADERS += src/field_10x26_impl.h
78cd96b1 38noinst_HEADERS += src/field_5x52.h
11ab5622
PW
39noinst_HEADERS += src/field_5x52_impl.h
40noinst_HEADERS += src/field_5x52_int128_impl.h
41noinst_HEADERS += src/field_5x52_asm_impl.h
78cd96b1 42noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h
3093576a 43noinst_HEADERS += src/java/org_bitcoin_Secp256k1Context.h
78cd96b1 44noinst_HEADERS += src/util.h
861f9a59
GM
45noinst_HEADERS += src/testrand.h
46noinst_HEADERS += src/testrand_impl.h
bbd5ba7c
PW
47noinst_HEADERS += src/hash.h
48noinst_HEADERS += src/hash_impl.h
78cd96b1 49noinst_HEADERS += src/field.h
11ab5622 50noinst_HEADERS += src/field_impl.h
6558a267 51noinst_HEADERS += src/bench.h
fea19e7b 52noinst_HEADERS += contrib/lax_der_parsing.h
eed87af1 53noinst_HEADERS += contrib/lax_der_parsing.c
4a243da4 54noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
eed87af1 55noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
78cd96b1 56
001f1763
WL
57if USE_EXTERNAL_ASM
58COMMON_LIB = libsecp256k1_common.la
59noinst_LTLIBRARIES = $(COMMON_LIB)
60else
61COMMON_LIB =
62endif
63
81b2faeb 64pkgconfigdir = $(libdir)/pkgconfig
c7ee71f7
AT
65pkgconfig_DATA = libsecp256k1.pc
66
001f1763
WL
67if USE_EXTERNAL_ASM
68if USE_ASM_ARM
69libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s
70endif
71endif
72
8881212e 73libsecp256k1_la_SOURCES = src/secp256k1.c
3093576a 74libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
001f1763 75libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB)
e2d66a2c 76
3093576a
G
77libsecp256k1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c
78libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES)
8881212e 79
78cd96b1
CF
80noinst_PROGRAMS =
81if USE_BENCHMARK
9f443be0 82noinst_PROGRAMS += bench_verify bench_sign bench_internal
504c63d7 83bench_verify_SOURCES = src/bench_verify.c
001f1763 84bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
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)
78cd96b1
CF
90endif
91
20b8877b 92TESTS =
78cd96b1
CF
93if USE_TESTS
94noinst_PROGRAMS += tests
95tests_SOURCES = src/tests.c
a724d729
AP
96tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
97if !ENABLE_COVERAGE
98tests_CPPFLAGS += -DVERIFY
99endif
001f1763 100tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
78cd96b1 101tests_LDFLAGS = -static
20b8877b
AP
102TESTS += tests
103endif
104
105if USE_EXHAUSTIVE_TESTS
106noinst_PROGRAMS += exhaustive_tests
107exhaustive_tests_SOURCES = src/tests_exhaustive.c
a724d729
AP
108exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
109if !ENABLE_COVERAGE
110exhaustive_tests_CPPFLAGS += -DVERIFY
111endif
20b8877b
AP
112exhaustive_tests_LDADD = $(SECP_LIBS)
113exhaustive_tests_LDFLAGS = -static
114TESTS += exhaustive_tests
78cd96b1
CF
115endif
116
3093576a
G
117JAVAROOT=src/java
118JAVAORG=org/bitcoin
119JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar
120CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA)
121JAVA_FILES= \
122 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \
123 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \
124 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \
125 $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java
126
127if USE_JNI
128
129$(JAVA_GUAVA):
130 @echo Guava is missing. Fetch it via: \
131 wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O $(@)
132 @false
133
134.stamp-java: $(JAVA_FILES)
135 @echo Compiling $^
136 $(AM_V_at)$(CLASSPATH_ENV) javac $^
137 @touch $@
138
139if USE_TESTS
140
141check-java: libsecp256k1.la $(JAVA_GUAVA) .stamp-java
142 $(AM_V_at)java -Djava.library.path="./:./src:./src/.libs:.libs/" -cp "$(JAVA_GUAVA):$(JAVAROOT)" $(JAVAORG)/NativeSecp256k1Test
143
144endif
145endif
146
fbecc38a 147if USE_ECMULT_STATIC_PRECOMPUTATION
445f7f10 148CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)
fbecc38a
TD
149CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function
150
151gen_context_OBJECTS = gen_context.o
e4ce3936 152gen_context_BIN = gen_context$(BUILD_EXEEXT)
fbecc38a
TD
153gen_%.o: src/gen_%.c
154 $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
155
e4ce3936 156$(gen_context_BIN): $(gen_context_OBJECTS)
fbecc38a
TD
157 $(CC_FOR_BUILD) $^ -o $@
158
b8e39ac5
CF
159$(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h
160$(tests_OBJECTS): src/ecmult_static_context.h
6da1446d 161$(bench_internal_OBJECTS): src/ecmult_static_context.h
fbecc38a 162
e4ce3936
CF
163src/ecmult_static_context.h: $(gen_context_BIN)
164 ./$(gen_context_BIN)
c37812f5 165
3093576a 166CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java
fbecc38a
TD
167endif
168
3093576a 169EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES)
0739bbb6
AP
170
171if ENABLE_MODULE_ECDH
172include src/modules/ecdh/Makefile.am.include
173endif
a5a66c70 174
9f443be0
PW
175if ENABLE_MODULE_RECOVERY
176include src/modules/recovery/Makefile.am.include
177endif
This page took 0.056887 seconds and 4 git commands to generate.