github.com/guiltylotus/go-ethereum@v1.9.7/crypto/secp256k1/libsecp256k1/Makefile.am (about) 1 ACLOCAL_AMFLAGS = -I build-aux/m4 2 3 lib_LTLIBRARIES = libsecp256k1.la 4 if USE_JNI 5 JNI_LIB = libsecp256k1_jni.la 6 noinst_LTLIBRARIES = $(JNI_LIB) 7 else 8 JNI_LIB = 9 endif 10 include_HEADERS = include/secp256k1.h 11 noinst_HEADERS = 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/testrand.h 46 noinst_HEADERS += src/testrand_impl.h 47 noinst_HEADERS += src/hash.h 48 noinst_HEADERS += src/hash_impl.h 49 noinst_HEADERS += src/field.h 50 noinst_HEADERS += src/field_impl.h 51 noinst_HEADERS += src/bench.h 52 noinst_HEADERS += contrib/lax_der_parsing.h 53 noinst_HEADERS += contrib/lax_der_parsing.c 54 noinst_HEADERS += contrib/lax_der_privatekey_parsing.h 55 noinst_HEADERS += contrib/lax_der_privatekey_parsing.c 56 57 if USE_EXTERNAL_ASM 58 COMMON_LIB = libsecp256k1_common.la 59 noinst_LTLIBRARIES = $(COMMON_LIB) 60 else 61 COMMON_LIB = 62 endif 63 64 pkgconfigdir = $(libdir)/pkgconfig 65 pkgconfig_DATA = libsecp256k1.pc 66 67 if USE_EXTERNAL_ASM 68 if USE_ASM_ARM 69 libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s 70 endif 71 endif 72 73 libsecp256k1_la_SOURCES = src/secp256k1.c 74 libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) 75 libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB) 76 77 libsecp256k1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c 78 libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES) 79 80 noinst_PROGRAMS = 81 if USE_BENCHMARK 82 noinst_PROGRAMS += bench_verify bench_sign bench_internal 83 bench_verify_SOURCES = src/bench_verify.c 84 bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) 85 bench_sign_SOURCES = src/bench_sign.c 86 bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) 87 bench_internal_SOURCES = src/bench_internal.c 88 bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB) 89 bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES) 90 endif 91 92 TESTS = 93 if USE_TESTS 94 noinst_PROGRAMS += tests 95 tests_SOURCES = src/tests.c 96 tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) 97 if !ENABLE_COVERAGE 98 tests_CPPFLAGS += -DVERIFY 99 endif 100 tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) 101 tests_LDFLAGS = -static 102 TESTS += tests 103 endif 104 105 if USE_EXHAUSTIVE_TESTS 106 noinst_PROGRAMS += exhaustive_tests 107 exhaustive_tests_SOURCES = src/tests_exhaustive.c 108 exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES) 109 if !ENABLE_COVERAGE 110 exhaustive_tests_CPPFLAGS += -DVERIFY 111 endif 112 exhaustive_tests_LDADD = $(SECP_LIBS) 113 exhaustive_tests_LDFLAGS = -static 114 TESTS += exhaustive_tests 115 endif 116 117 JAVAROOT=src/java 118 JAVAORG=org/bitcoin 119 JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar 120 CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA) 121 JAVA_FILES= \ 122 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \ 123 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \ 124 $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \ 125 $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java 126 127 if 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 139 if USE_TESTS 140 141 check-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 144 endif 145 endif 146 147 if USE_ECMULT_STATIC_PRECOMPUTATION 148 CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) 149 CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function 150 151 gen_context_OBJECTS = gen_context.o 152 gen_context_BIN = gen_context$(BUILD_EXEEXT) 153 gen_%.o: src/gen_%.c 154 $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@ 155 156 $(gen_context_BIN): $(gen_context_OBJECTS) 157 $(CC_FOR_BUILD) $^ -o $@ 158 159 $(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h 160 $(tests_OBJECTS): src/ecmult_static_context.h 161 $(bench_internal_OBJECTS): src/ecmult_static_context.h 162 163 src/ecmult_static_context.h: $(gen_context_BIN) 164 ./$(gen_context_BIN) 165 166 CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java 167 endif 168 169 EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES) 170 171 if ENABLE_MODULE_ECDH 172 include src/modules/ecdh/Makefile.am.include 173 endif 174 175 if ENABLE_MODULE_RECOVERY 176 include src/modules/recovery/Makefile.am.include 177 endif