drivers: mtd: convert makefiles to Kbuild style

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile
index 993d317..b249348 100644
--- a/drivers/mtd/onenand/Makefile
+++ b/drivers/mtd/onenand/Makefile
@@ -5,30 +5,9 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-include $(TOPDIR)/config.mk
-
-LIB	:= $(obj)libonenand.o
-
 ifndef	CONFIG_SPL_BUILD
-COBJS-$(CONFIG_CMD_ONENAND)	:= onenand_uboot.o onenand_base.o onenand_bbt.o
-COBJS-$(CONFIG_SAMSUNG_ONENAND)	+= samsung.o
+obj-$(CONFIG_CMD_ONENAND)	:= onenand_uboot.o onenand_base.o onenand_bbt.o
+obj-$(CONFIG_SAMSUNG_ONENAND)	+= samsung.o
 else
-COBJS-y				:= onenand_spl.o
+obj-y				:= onenand_spl.o
 endif
-
-COBJS	:= $(COBJS-y)
-SRCS	:= $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
-
-all:	$(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
-	$(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################