vboot_reference/Makefile: Work towards a common flashrom path

There are multiple flashrom calling wrapping code implementations
within vboot_ref. Work towards making a singular canonical
implementation.

BUG=b:207808292
BRANCH=none
TEST=`make`

Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I8e133a11b777b4e80bb4e43a64a5349956cef8eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3325329
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
diff --git a/Makefile b/Makefile
index 97e469c..25539c7 100644
--- a/Makefile
+++ b/Makefile
@@ -438,6 +438,11 @@
 TLCL_OBJS = ${TLCL_SRCS:%.c=${BUILD}/%.o}
 ALL_OBJS += ${FWLIB_OBJS} ${TLCL_OBJS}
 
+COMMONLIB_SRCS = \
+	host/lib/fmap.c \
+	host/lib/flashrom.c \
+	host/lib/subprocess.c
+
 # Intermediate library for the vboot_reference utilities to link against.
 UTILLIB = ${BUILD}/libvboot_util.a
 
@@ -456,8 +461,7 @@
 	host/lib/crossystem.c \
 	host/lib/crypto.c \
 	host/lib/file_keys.c \
-	host/lib/flashrom.c \
-	host/lib/fmap.c \
+	$(COMMONLIB_SRCS) \
 	host/lib/host_common.c \
 	host/lib/host_key2.c \
 	host/lib/host_keyblock.c \
@@ -465,7 +469,6 @@
 	host/lib/host_signature.c \
 	host/lib/host_signature2.c \
 	host/lib/signature_digest.c \
-	host/lib/subprocess.c \
 	host/lib/util_misc.c \
 	host/lib21/host_common.c \
 	host/lib21/host_key.c \
@@ -516,10 +519,8 @@
 	host/lib/crossystem.c \
 	host/lib/crypto.c \
 	host/lib/extract_vmlinuz.c \
-	host/lib/flashrom.c \
-	host/lib/fmap.c \
+	$(COMMONLIB_SRCS) \
 	host/lib/host_misc.c \
-	host/lib/subprocess.c \
 	host/lib21/host_misc.c \
 	${TLCL_SRCS}