lib: build charset.o only if needed
charset.o is only needed for the EFI subsystem
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
diff --git a/lib/Makefile b/lib/Makefile
index 5f583ae..2fd3279 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -19,7 +19,10 @@
obj-$(CONFIG_OPTEE) += optee/
obj-$(CONFIG_AES) += aes.o
-obj-y += charset.o
+
+ifndef API_BUILD
+obj-$(CONFIG_EFI_LOADER) += charset.o
+endif
obj-$(CONFIG_USB_TTY) += circbuf.o
obj-y += crc7.o
obj-y += crc8.o