scaled down version of generic libraries for SPL

Signed-off-by: Aneesh V <aneesh@ti.com>
diff --git a/lib/Makefile b/lib/Makefile
index afa6914..884f64c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,6 +25,7 @@
 
 LIB	= $(obj)libgeneric.o
 
+ifndef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
 COBJS-$(CONFIG_BZIP2) += bzlib.o
 COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
@@ -35,9 +36,7 @@
 COBJS-y += crc7.o
 COBJS-y += crc16.o
 COBJS-y += crc32.o
-COBJS-y += ctype.o
 COBJS-y += display_options.o
-COBJS-y += div64.o
 COBJS-y += errno.o
 COBJS-$(CONFIG_GZIP) += gunzip.o
 COBJS-y += hashtable.o
@@ -48,11 +47,15 @@
 COBJS-y += qsort.o
 COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
-COBJS-y += string.o
 COBJS-y	+= strmhz.o
+COBJS-$(CONFIG_RBTREE)	+= rbtree.o
+endif
+
+COBJS-y += ctype.o
+COBJS-y += div64.o
+COBJS-y += string.o
 COBJS-y += time.o
 COBJS-y += vsprintf.o
-COBJS-$(CONFIG_RBTREE)	+= rbtree.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)