summaryrefslogtreecommitdiff
path: root/src/lib/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Makefile.inc')
-rw-r--r--src/lib/Makefile.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 132e662d8c..1f2ad96735 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -42,7 +42,6 @@ romstage-y += cbfs.c
romstage-y += lzma.c
#romstage-y += lzmadecode.c
romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c
-romstage-$(CONFIG_HAVE_ACPI_RESUME) += cbmem.c
romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
romstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
@@ -76,7 +75,6 @@ ramstage-y += lzma.c
ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
-ramstage-y += cbmem.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
@@ -87,6 +85,16 @@ ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
ramstage-$(CONFIG_COVERAGE) += libgcov.c
ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += edid.c
+# The CBMEM implementations are chosen based on CONFIG_DYNAMIC_CBMEM.
+ifeq ($(CONFIG_DYNAMIC_CBMEM),y)
+ramstage-y += dynamic_cbmem.c
+romstage-y += dynamic_cbmem.c
+else
+ramstage-y += cbmem.c
+romstage-$(CONFIG_HAVE_ACPI_RESUME) += cbmem.c
+endif # CONFIG_DYNAMIC_CBMEM
+ramstage-y += cbmem_info.c
+
ramstage-$(CONFIG_CONSOLE_NE2K) += ne2k.c
ifneq ($(CONFIG_HAVE_ARCH_MEMSET),y)