Makefile: provide a target to build object files only

This would be especially useful when link time optimization is
enabled, as in that case the linker does not operate properly on
archives, separate object files are required.

Also, prevent multiple execution of string substitution function when
deriving lists of object and dependency file names from source file
names.

BRANCH=cr50, cr50-mp
BUG=b:65253310
TEST=Cr50 image builds fine with object files produced when using the
     new make target during build

Change-Id: Iefae1f31270fbce5f08b4aa0c0651cec395776d9
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1457210
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit b256f3941b8de4987d75eaa7df7bd8566cec2ef1)
(cherry picked from commit 78c366ff0a27dbd547e943356ca77f94bf2d26d2)
(cherry picked from commit a4a45f5cee2bf4006b998236efba4db1b3a6c098)
1 file changed