From patchwork Sun Sep 8 01:42:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 273402 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 3E4772C0115 for ; Sun, 8 Sep 2013 11:45:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40D314A088; Sun, 8 Sep 2013 03:44: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 YVRhAI13HHfo; Sun, 8 Sep 2013 03:44:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B5984A0C0; Sun, 8 Sep 2013 03:43:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0B1A4A0BB for ; Sun, 8 Sep 2013 03:43:00 +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 0qi8T6mbU8Nt for ; Sun, 8 Sep 2013 03:42:53 +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 16E1C4A07A for ; Sun, 8 Sep 2013 03:42:26 +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-maile12) with ESMTP id r881gLkF016655 for ; Sun, 8 Sep 2013 10:42:21 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili12) with ESMTP id r881gLo32469 for ; Sun, 8 Sep 2013 10:42:21 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi17) id r881gLs9025292; Sun, 8 Sep 2013 10:42:21 +0900 Received: from poodle by lomi17.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r881gLJq025278; Sun, 8 Sep 2013 10:42:21 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 331772743A5C; Sun, 8 Sep 2013 10:42:21 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sun, 8 Sep 2013 10:42:07 +0900 Message-Id: <1378604540-30445-7-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1378604540-30445-1-git-send-email-yamada.m@jp.panasonic.com> References: <1378604540-30445-1-git-send-email-yamada.m@jp.panasonic.com> Subject: [U-Boot] [PATCH 06/19] ARM: 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 --- arch/arm/cpu/arm1136/Makefile | 26 +--------- arch/arm/cpu/arm1136/mx31/Makefile | 27 ++--------- arch/arm/cpu/arm1136/mx35/Makefile | 28 ++--------- arch/arm/cpu/arm1176/Makefile | 26 +--------- arch/arm/cpu/arm1176/bcm2835/Makefile | 25 +--------- arch/arm/cpu/arm1176/tnetv107x/Makefile | 27 +---------- arch/arm/cpu/arm925t/Makefile | 30 ++---------- arch/arm/cpu/arm946es/Makefile | 26 +--------- arch/arm/cpu/arm_intcm/Makefile | 26 +--------- arch/arm/cpu/ixp/Makefile | 30 ++---------- arch/arm/cpu/pxa/Makefile | 36 +++----------- arch/arm/cpu/sa1100/Makefile | 28 ++--------- arch/arm/cpu/tegra-common/Makefile | 25 +--------- arch/arm/cpu/tegra114-common/Makefile | 23 +-------- arch/arm/cpu/tegra20-common/Makefile | 29 ++--------- arch/arm/cpu/tegra30-common/Makefile | 26 +--------- arch/arm/lib/Makefile | 86 ++++++++++----------------------- 17 files changed, 69 insertions(+), 455 deletions(-) diff --git a/arch/arm/cpu/arm1136/Makefile b/arch/arm/cpu/arm1136/Makefile index cc516f7..3279f12 100644 --- a/arch/arm/cpu/arm1136/Makefile +++ b/arch/arm/cpu/arm1136/Makefile @@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -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 diff --git a/arch/arm/cpu/arm1136/mx31/Makefile b/arch/arm/cpu/arm1136/mx31/Makefile index c75adec..9670ed9 100644 --- a/arch/arm/cpu/arm1136/mx31/Makefile +++ b/arch/arm/cpu/arm1136/mx31/Makefile @@ -5,27 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += timer.o -COBJS += devices.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 += generic.o +obj-y += timer.o +obj-y += devices.o diff --git a/arch/arm/cpu/arm1136/mx35/Makefile b/arch/arm/cpu/arm1136/mx35/Makefile index ee534a9..c533215 100644 --- a/arch/arm/cpu/arm1136/mx35/Makefile +++ b/arch/arm/cpu/arm1136/mx35/Makefile @@ -7,28 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += timer.o -COBJS += mx35_sdram.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 += generic.o +obj-y += timer.o +obj-y += mx35_sdram.o diff --git a/arch/arm/cpu/arm1176/Makefile b/arch/arm/cpu/arm1176/Makefile index 5d451a7..deec427 100644 --- a/arch/arm/cpu/arm1176/Makefile +++ b/arch/arm/cpu/arm1176/Makefile @@ -8,27 +8,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -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 diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile b/arch/arm/cpu/arm1176/bcm2835/Makefile index 135de42..0ad3690 100644 --- a/arch/arm/cpu/arm1176/bcm2835/Makefile +++ b/arch/arm/cpu/arm1176/bcm2835/Makefile @@ -12,26 +12,5 @@ # GNU General Public License for more details. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS := lowlevel_init.o -COBJS := init.o reset.o timer.o mbox.o - -SRCS := $(SOBJS:.o=.c) $(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 := lowlevel_init.o +obj-y += init.o reset.o timer.o mbox.o diff --git a/arch/arm/cpu/arm1176/tnetv107x/Makefile b/arch/arm/cpu/arm1176/tnetv107x/Makefile index 1eb27ed..a4c1edf 100644 --- a/arch/arm/cpu/arm1176/tnetv107x/Makefile +++ b/arch/arm/cpu/arm1176/tnetv107x/Makefile @@ -2,28 +2,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += aemif.o clock.o init.o mux.o timer.o -SOBJS += lowlevel_init.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) - -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -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 += aemif.o clock.o init.o mux.o timer.o +obj-y += lowlevel_init.o diff --git a/arch/arm/cpu/arm925t/Makefile b/arch/arm/cpu/arm925t/Makefile index 40d2156..ffe2ff5 100644 --- a/arch/arm/cpu/arm925t/Makefile +++ b/arch/arm/cpu/arm925t/Makefile @@ -5,30 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS += cpu.o -COBJS += omap925.o -COBJS += timer.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -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 - -######################################################################### +obj-y += cpu.o +obj-y += omap925.o +obj-y += timer.o diff --git a/arch/arm/cpu/arm946es/Makefile b/arch/arm/cpu/arm946es/Makefile index 87e6c65..a44bddc 100644 --- a/arch/arm/cpu/arm946es/Makefile +++ b/arch/arm/cpu/arm946es/Makefile @@ -5,28 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -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 - -######################################################################### +obj-y = cpu.o diff --git a/arch/arm/cpu/arm_intcm/Makefile b/arch/arm/cpu/arm_intcm/Makefile index cc516f7..3279f12 100644 --- a/arch/arm/cpu/arm_intcm/Makefile +++ b/arch/arm/cpu/arm_intcm/Makefile @@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -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 diff --git a/arch/arm/cpu/ixp/Makefile b/arch/arm/cpu/ixp/Makefile index 788598e..4e66523 100644 --- a/arch/arm/cpu/ixp/Makefile +++ b/arch/arm/cpu/ixp/Makefile @@ -5,30 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS-y += cpu.o -COBJS-$(CONFIG_USE_IRQ) += interrupts.o -COBJS-y += timer.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 - -######################################################################### +obj-y += cpu.o +obj-$(CONFIG_USE_IRQ) += interrupts.o +obj-y += timer.o diff --git a/arch/arm/cpu/pxa/Makefile b/arch/arm/cpu/pxa/Makefile index c84186a..8cd475e 100644 --- a/arch/arm/cpu/pxa/Makefile +++ b/arch/arm/cpu/pxa/Makefile @@ -5,35 +5,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o +obj-$(CONFIG_CPU_PXA25X) += pxa2xx.o +obj-$(CONFIG_CPU_PXA27X) += pxa2xx.o -START = start.o - -COBJS-$(CONFIG_CPU_PXA25X) = pxa2xx.o -COBJS-$(CONFIG_CPU_PXA27X) = pxa2xx.o - -COBJS-y += cpuinfo.o - -COBJS = $(COBJS-y) -COBJS += timer.o -COBJS += usb.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -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 - -######################################################################### +obj-y += cpuinfo.o +obj-y += timer.o +obj-y += usb.o diff --git a/arch/arm/cpu/sa1100/Makefile b/arch/arm/cpu/sa1100/Makefile index c84b7b9..85a0d28 100644 --- a/arch/arm/cpu/sa1100/Makefile +++ b/arch/arm/cpu/sa1100/Makefile @@ -5,29 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS += cpu.o -COBJS += timer.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -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 - -######################################################################### +obj-y += cpu.o +obj-y += timer.o diff --git a/arch/arm/cpu/tegra-common/Makefile b/arch/arm/cpu/tegra-common/Makefile index 1b6cdf7..3aac655 100644 --- a/arch/arm/cpu/tegra-common/Makefile +++ b/arch/arm/cpu/tegra-common/Makefile @@ -7,26 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libcputegra-common.o - -SOBJS += lowlevel_init.o -COBJS-y += ap.o board.o sys_info.o timer.o clock.o cache.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(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 - -######################################################################### +obj-y += lowlevel_init.o +obj-y += ap.o board.o sys_info.o timer.o clock.o cache.o diff --git a/arch/arm/cpu/tegra114-common/Makefile b/arch/arm/cpu/tegra114-common/Makefile index 5b53a71..d959b57 100644 --- a/arch/arm/cpu/tegra114-common/Makefile +++ b/arch/arm/cpu/tegra114-common/Makefile @@ -17,25 +17,4 @@ # along with this program. If not, see . # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(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 - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o diff --git a/arch/arm/cpu/tegra20-common/Makefile b/arch/arm/cpu/tegra20-common/Makefile index 175387f..32ddbda 100644 --- a/arch/arm/cpu/tegra20-common/Makefile +++ b/arch/arm/cpu/tegra20-common/Makefile @@ -7,32 +7,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - # The AVP is ARMv4T architecture so we must use special compiler # flags for any startup files it might use. CFLAGS_arch/arm/cpu/tegra20-common/warmboot_avp.o += -march=armv4t -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o -COBJS-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o -COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o -COBJS-$(CONFIG_TEGRA_PMU) += pmu.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(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 - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o +obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o +obj-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o +obj-$(CONFIG_TEGRA_PMU) += pmu.o diff --git a/arch/arm/cpu/tegra30-common/Makefile b/arch/arm/cpu/tegra30-common/Makefile index 75fef32..d2d616e 100644 --- a/arch/arm/cpu/tegra30-common/Makefile +++ b/arch/arm/cpu/tegra30-common/Makefile @@ -17,28 +17,4 @@ # along with this program. If not, see . # -include $(TOPDIR)/config.mk - -# The AVP is ARMv4T architecture so we must use special compiler -# flags for any startup files it might use. - -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(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 - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 4e78723..679f19a 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -5,77 +5,43 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(ARCH).o -LIBGCC = $(obj)libgcc.o - -GLSOBJS += _ashldi3.o -GLSOBJS += _ashrdi3.o -GLSOBJS += _divsi3.o -GLSOBJS += _lshrdi3.o -GLSOBJS += _modsi3.o -GLSOBJS += _udivsi3.o -GLSOBJS += _umodsi3.o - -GLCOBJS += div0.o +# Build private libgcc only when asked for +ifdef USE_PRIVATE_LIBGCC +lib-y += _ashldi3.o +lib-y += _ashrdi3.o +lib-y += _divsi3.o +lib-y += _lshrdi3.o +lib-y += _modsi3.o +lib-y += _udivsi3.o +lib-y += _umodsi3.o +lib-y += div0.o +endif -SOBJS-y += crt0.o +obj-y += crt0.o ifndef CONFIG_SPL_BUILD -SOBJS-y += relocate.o +obj-y += relocate.o ifndef CONFIG_SYS_GENERIC_BOARD -COBJS-y += board.o +obj-y += board.o endif -COBJS-y += sections.o +obj-y += sections.o -COBJS-$(CONFIG_OF_LIBFDT) += bootm-fdt.o -COBJS-$(CONFIG_CMD_BOOTM) += bootm.o -COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o -SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o -SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o +obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o +obj-$(CONFIG_CMD_BOOTM) += bootm.o +obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o +obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o +obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o else -COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o +obj-$(CONFIG_SPL_FRAMEWORK) += spl.o endif -COBJS-y += interrupts.o -COBJS-y += reset.o - -COBJS-y += cache.o -COBJS-y += cache-cp15.o - -SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ - $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) -LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \ - $(addprefix $(obj),$(GLCOBJS)) +obj-y += interrupts.o +obj-y += reset.o -# Always build libarm.o -TARGETS := $(LIB) - -# Build private libgcc only when asked for -ifdef USE_PRIVATE_LIBGCC -TARGETS += $(LIBGCC) -endif +obj-y += cache.o +obj-y += cache-cp15.o # For EABI conformant tool chains, provide eabi_compat() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) -TARGETS += $(obj)eabi_compat.o +extra-y += eabi_compat.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 - -#########################################################################