make: decouple rw and ro object file sets
make: decouple rw and ro object file sets

When building EC image, in the majority of cases the RW and RO images
are built from exactly the same set of object files, and the RO set of
objects is used as a template to derive the RW set of objects.

This is not necessarily correct in all cases, let's just create an
abstract set of object files and use it to derive the sets for RO, RW
and sharedlib as appropriate.

BRANCH=None
BUG=chrome-os-partner:43025
TEST=tested as follows:
  - changed the Makefile to sort all object files in a single list
    (instead of sorting them by directory, with the directory list
    unchanged). Built all targets, saved all .smap files. Then applied
    this change and again built all targets. Compare all smap files,
    there were no differences.
  - modified board/samus/board.h to trigger building sharedlib
    objects, verified that build/samus/sharedlib built fine.

Change-Id: Ie563aca62028cae9e16f067ba20b5e2930355cf5
Signed-off-by: Vadim Bendebury <5515d6d2d0829cbe0dd0dcf2094aaded06d58514@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/310389
Reviewed-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>

coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,coreboot/chrome-ec