As both tests.c and bench.c include the the _impl.h h headers, they should be self-contained, and not need linking with libsecp256k1.la.
They do need the assembly code though, if it is used.
Ping @theuni?
@sipa now that we have automake and can select the proper input files based on configure, would you be interested in moving the _impl.h -> _impl.c, then building the necessary objects based on make directives, rather than include magic?
That would help in this case, as well as in modularizing a bit. As an easy-to-see win, the test program could then run against all implementations at once.
If that’s not a goal, then we can just take the shortcut here and link in the asm object in that case.