ARM: convert makefiles to Kbuild style
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 17 Oct 2013 08:34:52 +0000 (17:34 +0900)
committerTom Rini <trini@ti.com>
Thu, 31 Oct 2013 16:53:39 +0000 (12:53 -0400)
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
16 files changed:
arch/arm/cpu/arm1136/Makefile
arch/arm/cpu/arm1136/mx31/Makefile
arch/arm/cpu/arm1136/mx35/Makefile
arch/arm/cpu/arm1176/Makefile
arch/arm/cpu/arm1176/bcm2835/Makefile
arch/arm/cpu/arm1176/tnetv107x/Makefile
arch/arm/cpu/arm946es/Makefile
arch/arm/cpu/arm_intcm/Makefile
arch/arm/cpu/ixp/Makefile
arch/arm/cpu/pxa/Makefile
arch/arm/cpu/sa1100/Makefile
arch/arm/cpu/tegra-common/Makefile
arch/arm/cpu/tegra114-common/Makefile
arch/arm/cpu/tegra20-common/Makefile
arch/arm/cpu/tegra30-common/Makefile
arch/arm/lib/Makefile

index cc516f7..3279f12 100644 (file)
@@ -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
index c75adec..9670ed9 100644 (file)
@@ -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
index ee534a9..c533215 100644 (file)
@@ -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
index 5d451a7..deec427 100644 (file)
@@ -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
index 135de42..0ad3690 100644 (file)
 # 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
index 1eb27ed..a4c1edf 100644 (file)
@@ -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
index 87e6c65..a44bddc 100644 (file)
@@ -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
index cc516f7..3279f12 100644 (file)
@@ -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
index 788598e..4e66523 100644 (file)
@@ -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
index c84186a..8cd475e 100644 (file)
@@ -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
index c84b7b9..85a0d28 100644 (file)
@@ -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
index 1b6cdf7..3aac655 100644 (file)
@@ -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
index 5b53a71..d959b57 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-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
index 175387f..32ddbda 100644 (file)
@@ -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
index 75fef32..d2d616e 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-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
index 4e78723..679f19a 100644 (file)
@@ -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
-
-#########################################################################