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