tools: convert makefiles to kbuild style

Before this commit, makefiles under tools/ directory
were implemented with their own way.

This commit refactors them by using "hostprogs-y" variable.

Several C sources have been added to wrap other C sources
to simplify Makefile.
For example, tools/crc32.c includes lib/crc32.c

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/spl/Makefile b/spl/Makefile
index 28fcfdd..3c40a7e 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -165,7 +165,9 @@
 VAR_SIZE_PARAM =
 endif
 $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin
-	$(OBJTREE)/tools/mk$(BOARD)spl $(VAR_SIZE_PARAM) $< $@
+	$(if $(wildcard $(OBJTREE)/tools/mk$(BOARD)spl),\
+	$(OBJTREE)/tools/mk$(BOARD)spl,\
+	$(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@
 endif
 
 $(obj)$(SPL_BIN).bin:	$(obj)$(SPL_BIN)