summaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 35da5705a4..13be8f4cfc 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -88,22 +88,19 @@ obj-y += time.o
obj-$(CONFIG_TRACE) += trace.o
obj-$(CONFIG_LIB_UUID) += uuid.o
obj-$(CONFIG_LIB_RAND) += rand.o
+obj-y += panic.o
-ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_TPL_BUILD
-SERIAL_SUPPORT := $(CONFIG_TPL_SERIAL_SUPPORT)
-else
-SERIAL_SUPPORT := $(CONFIG_SPL_SERIAL_SUPPORT)
-endif
+ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y)
# SPL U-Boot may use full-printf, tiny-printf or none at all
ifdef CONFIG_USE_TINY_PRINTF
-obj-$(SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o
+obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o
else
-obj-$(SERIAL_SUPPORT) += vsprintf.o panic.o strto.o strmhz.o
+obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o strmhz.o
endif
+obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o
else
# Main U-Boot always uses the full printf support
-obj-y += vsprintf.o panic.o strto.o strmhz.o
+obj-y += vsprintf.o strto.o strmhz.o
endif
subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2