Modify Makefile to allow insertion of mock modules
Modify Makefile to allow insertion of mock modules

When we need to mock modules in a unit test, we need a way to mock
the actual modules. This CL enables mock of given source files.
For example, if we need to mock watchdog for test 'foo', we can add to
test/build.mk: "core-mock-foo-watchdog.o=fake_watchdog.o", and then
implement its own watchdog in fake_watchdog.c.

Signed-off-by: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@chromium.org>

BUG=chrome-os-partner:10356
TEST=Set a mock fake_watchdog.c and check the test is compiled with
     fake_watchdog.c instead of watchdog.c.

Change-Id: I4a0afb589a49dad7c4d6faf8926438085cdc46cf
Reviewed-on: https://gerrit.chromium.org/gerrit/24942
Reviewed-by: Vincent Palatin <70a9964ec8fd10b0b08fcc8623c2add25ddf99ac@chromium.org>
Commit-Ready: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@chromium.org>
Tested-by: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@chromium.org>

fourier49/BZ_DEV_EC,gelraen/cros-ec,akappy7/ChromeOS_EC_LED_Diagnostics,eatbyte/chromium-ec,akappy7/ChromeOS_EC_LED_Diagnostics,fourier49/BIZ_EC,gelraen/cros-ec,coreboot/chrome-ec,longsleep/ec,md5555/ec,fourier49/BZ_DEV_EC,gelraen/cros-ec,fourier49/BIZ_EC,akappy7/ChromeOS_EC_LED_Diagnostics,md5555/ec,md5555/ec,eatbyte/chromium-ec,coreboot/chrome-ec,longsleep/ec,coreboot/chrome-ec,alterapraxisptyltd/chromium-ec,alterapraxisptyltd/chromium-ec,alterapraxisptyltd/chromium-ec,coreboot/chrome-ec,longsleep/ec,mtk09422/chromiumos-platform-ec,fourier49/BIZ_EC,thehobn/ec,mtk09422/chromiumos-platform-ec,mtk09422/chromiumos-platform-ec,mtk09422/chromiumos-platform-ec,thehobn/ec,eatbyte/chromium-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,md5555/ec,longsleep/ec,thehobn/ec,coreboot/chrome-ec,fourier49/BZ_DEV_EC,alterapraxisptyltd/chromium-ec,eatbyte/chromium-ec,gelraen/cros-ec,thehobn/ec,fourier49/BZ_DEV_EC,fourier49/BIZ_EC