build system: extend src-to-obj for non-.c/.S files
It also creates file names in the build directory and with
the stage sliced in, but keeps the extension for anything
not .c or .S.
Also some handling for non-.c/.S files was adapted to match.
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Signed-off-by: Patrick Georgi <firstname.lastname@example.org>
Based-On-Signed-off-by: Julius Werner <email@example.com>
Reviewed-by: Aaron Durbin <firstname.lastname@example.org>
Tested-by: build bot (Jenkins)
6 files changed