The current method to build a static library manually (using default options) is:
0gcc -O2 -c src/secp256k1.c src/precomputed_*.c
1ar rcs libsecp256k1.a secp256k1.o precomputed_*.o
(clang
also works)
The goal is to get rid of most of the command line arguments, at least on GCC and clang:
-
-DSECP256K1_BUILD
: #928 -
-I
#925 -
-D ECMULT_GEN_PREC_BITS=4 -D ECMULT_WINDOW_SIZE=15
: See discussion in #918. We could even print the config using#pragma message
) -
-D DUSE_EXTERNAL_ASM
: #929 (comment) -
-Wno-unused-function
: We could add a#pragma
or better add__attribute__ ((unsused))
to the relevant functions. -
-Wall -Wextra
: We could set this via#pragmas
but maybe we should leave this to the user. -
-O2
: I think we should really leave this to the user. - Add section to README
- Add CI jobs to test these builds