lib: add rand() function

It's a PRNG using the simple and fast xorshift method.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Wolfgang Denk <wd@denx.de>
diff --git a/lib/Makefile b/lib/Makefile
index 1e8478f..0ca45fc 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -66,6 +66,7 @@
 COBJS-y += time.o
 COBJS-$(CONFIG_BOOTP_PXE) += uuid.o
 COBJS-y += vsprintf.o
+COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)