From patchwork Mon Oct 21 02:53:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 285088 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 674932C012B for ; Mon, 21 Oct 2013 13:54:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FBC74A146; Mon, 21 Oct 2013 04:54:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CshdCi+71CpR; Mon, 21 Oct 2013 04:54:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D9B294A147; Mon, 21 Oct 2013 04:54:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 862964A132 for ; Mon, 21 Oct 2013 04:54:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zDCopneV26pR for ; Mon, 21 Oct 2013 04:54:02 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 285D94A130 for ; Mon, 21 Oct 2013 04:53:57 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id r9L2rrPu029687; Mon, 21 Oct 2013 11:53:53 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id r9L2rrL18527; Mon, 21 Oct 2013 11:53:53 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi12) id r9L2rrIX010317; Mon, 21 Oct 2013 11:53:53 +0900 Received: from poodle by lomi12.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r9L2rqXC010199; Mon, 21 Oct 2013 11:53:53 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 0F1692743A60; Mon, 21 Oct 2013 11:53:53 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 21 Oct 2013 11:53:31 +0900 Message-Id: <1382324021-18932-9-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382324021-18932-1-git-send-email-yamada.m@jp.panasonic.com> References: <1382324021-18932-1-git-send-email-yamada.m@jp.panasonic.com> Subject: [U-Boot] [PATCH 08/18] mips: convert makefiles to Kbuild style X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Masahiro Yamada Cc: Daniel Schwierzeck --- arch/mips/cpu/mips32/Makefile | 28 +++-------------------- arch/mips/cpu/mips32/au1x00/Makefile | 23 +------------------ arch/mips/cpu/mips32/incaip/Makefile | 25 ++------------------ arch/mips/cpu/mips64/Makefile | 24 ++------------------ arch/mips/cpu/xburst/Makefile | 30 +++--------------------- arch/mips/lib/Makefile | 44 ++++-------------------------------- board/dbau1x00/Makefile | 24 ++------------------ board/incaip/Makefile | 24 ++------------------ board/micronas/vct/Makefile | 37 +++++++----------------------- board/pb1x00/Makefile | 24 ++------------------ board/qemu-malta/Makefile | 24 ++------------------ board/qemu-mips/Makefile | 24 ++------------------ 12 files changed, 34 insertions(+), 297 deletions(-) diff --git a/arch/mips/cpu/mips32/Makefile b/arch/mips/cpu/mips32/Makefile index 1974034..e0e6309 100644 --- a/arch/mips/cpu/mips32/Makefile +++ b/arch/mips/cpu/mips32/Makefile @@ -5,28 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -SOBJS-y = cache.o -COBJS-y = cpu.o interrupts.o time.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(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 +obj-y += cpu.o interrupts.o time.o diff --git a/arch/mips/cpu/mips32/au1x00/Makefile b/arch/mips/cpu/mips32/au1x00/Makefile index 4a045e3..c5643e7 100644 --- a/arch/mips/cpu/mips32/au1x00/Makefile +++ b/arch/mips/cpu/mips32/au1x00/Makefile @@ -5,25 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o au1x00_ide.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o au1x00_ide.o diff --git a/arch/mips/cpu/mips32/incaip/Makefile b/arch/mips/cpu/mips32/incaip/Makefile index 6368d57..7341a4a 100644 --- a/arch/mips/cpu/mips32/incaip/Makefile +++ b/arch/mips/cpu/mips32/incaip/Makefile @@ -5,26 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS = incaip_wdt.o -COBJS = incaip_clock.o asc_serial.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = incaip_wdt.o +obj-y += incaip_clock.o asc_serial.o diff --git a/arch/mips/cpu/mips64/Makefile b/arch/mips/cpu/mips64/Makefile index b4adb95..899c319 100644 --- a/arch/mips/cpu/mips64/Makefile +++ b/arch/mips/cpu/mips64/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS-y = cpu.o interrupts.o time.o cache.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(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 = cpu.o interrupts.o time.o cache.o diff --git a/arch/mips/cpu/xburst/Makefile b/arch/mips/cpu/xburst/Makefile index bf58e04..57714d0 100644 --- a/arch/mips/cpu/xburst/Makefile +++ b/arch/mips/cpu/xburst/Makefile @@ -4,30 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -SOBJS-y = -COBJS-y = cpu.o timer.o jz_serial.o - -COBJS-$(CONFIG_JZ4740) += jz4740.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(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 = cpu.o timer.o jz_serial.o +obj-$(CONFIG_JZ4740) += jz4740.o diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile index f91406c..3705926 100644 --- a/arch/mips/lib/Makefile +++ b/arch/mips/lib/Makefile @@ -5,46 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(ARCH).o - -## Build a couple of necessary functions into a private libgcc -LIBGCC = $(obj)libgcc.o -GLSOBJS += ashldi3.o -GLSOBJS += ashrdi3.o -GLSOBJS += lshrdi3.o -LGOBJS := $(addprefix $(obj),$(GLSOBJS)) - -SOBJS-y += - -COBJS-y += board.o -COBJS-$(CONFIG_CMD_BOOTM) += bootm.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -# Always build libmips.o -TARGETS := $(LIB) +obj-y += board.o +obj-$(CONFIG_CMD_BOOTM) += bootm.o # Build private libgcc only when asked for ifdef USE_PRIVATE_LIBGCC -TARGETS += $(LIBGCC) +lib-y += ashldi3.o +lib-y += ashrdi3.o +lib-y += lshrdi3.o endif - -all: $(TARGETS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -$(LIBGCC): $(obj).depend $(LGOBJS) - $(call cmd_link_o_target, $(LGOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/board/dbau1x00/Makefile b/board/dbau1x00/Makefile index 9024919..2f14402 100644 --- a/board/dbau1x00/Makefile +++ b/board/dbau1x00/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS = $(BOARD).o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = dbau1x00.o +obj-y += lowlevel_init.o diff --git a/board/incaip/Makefile b/board/incaip/Makefile index ed7370f..602d30e 100644 --- a/board/incaip/Makefile +++ b/board/incaip/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS = $(BOARD).o flash.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = incaip.o flash.o +obj-y += lowlevel_init.o diff --git a/board/micronas/vct/Makefile b/board/micronas/vct/Makefile index ff35a5a..ed28cb8 100644 --- a/board/micronas/vct/Makefile +++ b/board/micronas/vct/Makefile @@ -4,32 +4,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := $(BOARD).o -COBJS-y += ebi.o -COBJS-$(CONFIG_VCT_NOR) += ebi_nor_flash.o -COBJS-$(CONFIG_VCT_ONENAND) += ebi_onenand.o -COBJS-$(CONFIG_DRIVER_SMC911X) += ebi_smc911x.o smc_eeprom.o -COBJS-y += gpio.o -COBJS-y += top.o -COBJS-$(CONFIG_USB_EHCI_VCT) += dcgu.o ehci.o scc.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := vct.o +obj-y += ebi.o +obj-$(CONFIG_VCT_NOR) += ebi_nor_flash.o +obj-$(CONFIG_VCT_ONENAND) += ebi_onenand.o +obj-$(CONFIG_DRIVER_SMC911X) += ebi_smc911x.o smc_eeprom.o +obj-y += gpio.o +obj-y += top.o +obj-$(CONFIG_USB_EHCI_VCT) += dcgu.o ehci.o scc.o diff --git a/board/pb1x00/Makefile b/board/pb1x00/Makefile index ed7370f..647eb85 100644 --- a/board/pb1x00/Makefile +++ b/board/pb1x00/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS = $(BOARD).o flash.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = pb1x00.o flash.o +obj-y += lowlevel_init.o diff --git a/board/qemu-malta/Makefile b/board/qemu-malta/Makefile index 7060341..5d727f6 100644 --- a/board/qemu-malta/Makefile +++ b/board/qemu-malta/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS = $(BOARD).o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = qemu-malta.o +obj-y += lowlevel_init.o diff --git a/board/qemu-mips/Makefile b/board/qemu-mips/Makefile index 7060341..8040573 100644 --- a/board/qemu-mips/Makefile +++ b/board/qemu-mips/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS = $(BOARD).o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = qemu-mips.o +obj-y += lowlevel_init.o