From: Masahiro Yamada Date: Mon, 21 Oct 2013 02:53:32 +0000 (+0900) Subject: nds32: convert makefiles to Kbuild style X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=547bb1edbfdecdf9d1a1a234382487a668064a2a;p=u-boot.git nds32: convert makefiles to Kbuild style Signed-off-by: Masahiro Yamada Cc: Macpaul Lin --- diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile index b8e0d72739..bb3550eb47 100644 --- a/arch/nds32/cpu/n1213/Makefile +++ b/arch/nds32/cpu/n1213/Makefile @@ -9,26 +9,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-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 diff --git a/arch/nds32/cpu/n1213/ag101/Makefile b/arch/nds32/cpu/n1213/ag101/Makefile index b53a3eb5f4..c21ce02828 100644 --- a/arch/nds32/cpu/n1213/ag101/Makefile +++ b/arch/nds32/cpu/n1213/ag101/Makefile @@ -10,33 +10,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y := cpu.o timer.o +obj-y := cpu.o timer.o ifndef CONFIG_SKIP_LOWLEVEL_INIT -SOBJS-y := lowlevel_init.o +obj-y += lowlevel_init.o endif ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -SOBJS-y += watchdog.o +obj-y += watchdog.o endif - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/arch/nds32/cpu/n1213/ag102/Makefile b/arch/nds32/cpu/n1213/ag102/Makefile index b53a3eb5f4..c21ce02828 100644 --- a/arch/nds32/cpu/n1213/ag102/Makefile +++ b/arch/nds32/cpu/n1213/ag102/Makefile @@ -10,33 +10,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y := cpu.o timer.o +obj-y := cpu.o timer.o ifndef CONFIG_SKIP_LOWLEVEL_INIT -SOBJS-y := lowlevel_init.o +obj-y += lowlevel_init.o endif ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -SOBJS-y += watchdog.o +obj-y += watchdog.o endif - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/arch/nds32/lib/Makefile b/arch/nds32/lib/Makefile index 2f7e155578..6ea96db958 100644 --- a/arch/nds32/lib/Makefile +++ b/arch/nds32/lib/Makefile @@ -9,26 +9,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(ARCH).o - -COBJS-y += board.o -COBJS-y += cache.o -COBJS-$(CONFIG_CMD_BOOTM) += bootm.o -COBJS-y += interrupts.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-y += cache.o +obj-$(CONFIG_CMD_BOOTM) += bootm.o +obj-y += interrupts.o diff --git a/board/AndesTech/adp-ag101/Makefile b/board/AndesTech/adp-ag101/Makefile index 826414f5b1..4cc590ff29 100644 --- a/board/AndesTech/adp-ag101/Makefile +++ b/board/AndesTech/adp-ag101/Makefile @@ -6,23 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := adp-ag101.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y)) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := adp-ag101.o diff --git a/board/AndesTech/adp-ag101p/Makefile b/board/AndesTech/adp-ag101p/Makefile index 875fb9228c..2ba7da46da 100644 --- a/board/AndesTech/adp-ag101p/Makefile +++ b/board/AndesTech/adp-ag101p/Makefile @@ -6,23 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := adp-ag101p.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y)) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := adp-ag101p.o diff --git a/board/AndesTech/adp-ag102/Makefile b/board/AndesTech/adp-ag102/Makefile index 6c187190b2..fc4bf88a5c 100644 --- a/board/AndesTech/adp-ag102/Makefile +++ b/board/AndesTech/adp-ag102/Makefile @@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := adp-ag102.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y)) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := adp-ag102.o