I'm developing a project that is currently written in C but I plan to write some of the functions in ASM for at least two platforms (x86_64 and arm). So I might have some source files:
- generic/one.c
- generic/two.c
- generic/three.c
- arm/one.s
- x86_64/two.s
I'd like it so that the configure script chooses the .s files over the .c files when possible. So building on arm will be one.s, two.c, three.c etc.
It seems difficult or impossible to do this nicely with Automake. But if I ditch Automake I'll have to track my own dependencies (ugh).
What's the best way to do this?