From f7178eb01160fc639d363fca38ac9bfab38eabd8 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 21 Oct 2013 11:53:29 +0900 Subject: [PATCH] openrisc: convert makefiles to Kbuild style Signed-off-by: Masahiro Yamada Cc: Stefan Kristiansson --- arch/openrisc/cpu/Makefile | 26 ++--------------------- arch/openrisc/lib/Makefile | 27 +++--------------------- board/openrisc/openrisc-generic/Makefile | 21 +----------------- 3 files changed, 6 insertions(+), 68 deletions(-) diff --git a/arch/openrisc/cpu/Makefile b/arch/openrisc/cpu/Makefile index 863d9b3e86..fc47d666fe 100644 --- a/arch/openrisc/cpu/Makefile +++ b/arch/openrisc/cpu/Makefile @@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS-y = cache.o cpu.o exceptions.o interrupts.o - -SRCS := $(START:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = cache.o cpu.o exceptions.o interrupts.o diff --git a/arch/openrisc/lib/Makefile b/arch/openrisc/lib/Makefile index b2218c990f..dfa72d915f 100644 --- a/arch/openrisc/lib/Makefile +++ b/arch/openrisc/lib/Makefile @@ -5,27 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(ARCH).o - -SOBJS-y += - -COBJS-y += board.o -COBJS-$(CONFIG_CMD_BOOTM) += bootm.o -COBJS-y += timer.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += board.o +obj-$(CONFIG_CMD_BOOTM) += bootm.o +obj-y += timer.o diff --git a/board/openrisc/openrisc-generic/Makefile b/board/openrisc/openrisc-generic/Makefile index bd15345b29..342bc80450 100644 --- a/board/openrisc/openrisc-generic/Makefile +++ b/board/openrisc/openrisc-generic/Makefile @@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := $(BOARD).o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := openrisc-generic.o -- 2.30.2