diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2013-10-17 17:35:04 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-10-31 13:26:44 -0400 |
commit | 06c14117c44e4b93be0430740524d4e2ef2557c0 (patch) | |
tree | 953310770487931e0adcd07a3a34297d5ef93279 /arch/powerpc/cpu/mpc8xxx | |
parent | 7cf40824bea10590cf2bb14ecfaa4c14ee907017 (diff) | |
download | u-boot-imx-06c14117c44e4b93be0430740524d4e2ef2557c0.zip u-boot-imx-06c14117c44e4b93be0430740524d4e2ef2557c0.tar.gz u-boot-imx-06c14117c44e4b93be0430740524d4e2ef2557c0.tar.bz2 |
powerpc: convert makefiles to Kbuild style
Note:
arch/powerpc/cpu/mpc8260/Makefile is originally like follows:
---<snip>---
START = start.o kgdb.o
COBJS = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
---<snip>---
COBJS-$(CONFIG_ETHER_ON_SCC) = ether_scc.o
---<snip>---
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)
The link rule `$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)'
is weird.
kbdg.o is not included in $(OBJS) but linked into $(LIB)
and $(LIB) is not dependent on kgdb.o.
(Broken dependency tracking)
So,
START = start.o kgdb.o
shoud have been
START = start.o
SOBJS = kgdb.o
That is why this commit adds kgdb.o to obj-y, not to extra-y.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx')
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/Makefile | 30 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/ddr/Makefile | 30 |
2 files changed, 14 insertions, 46 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/Makefile b/arch/powerpc/cpu/mpc8xxx/Makefile index 3dc8e05..395fed1 100644 --- a/arch/powerpc/cpu/mpc8xxx/Makefile +++ b/arch/powerpc/cpu/mpc8xxx/Makefile @@ -6,10 +6,6 @@ # Version 2 as published by the Free Software Foundation. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib8xxx.o - MINIMAL= ifdef CONFIG_SPL_BUILD @@ -20,30 +16,18 @@ endif ifdef MINIMAL -COBJS-$(CONFIG_FSL_LAW) += law.o +obj-$(CONFIG_FSL_LAW) += law.o else ifneq ($(CPU),mpc83xx) -COBJS-y += cpu.o +obj-y += cpu.o endif -COBJS-$(CONFIG_OF_LIBFDT) += fdt.o -COBJS-$(CONFIG_FSL_IFC) += fsl_ifc.o -COBJS-$(CONFIG_FSL_LBC) += fsl_lbc.o -COBJS-$(CONFIG_SYS_SRIO) += srio.o -COBJS-$(CONFIG_FSL_LAW) += law.o +obj-$(CONFIG_OF_LIBFDT) += fdt.o +obj-$(CONFIG_FSL_IFC) += fsl_ifc.o +obj-$(CONFIG_FSL_LBC) += fsl_lbc.o +obj-$(CONFIG_SYS_SRIO) += srio.o +obj-$(CONFIG_FSL_LAW) += law.o endif - -SRCS := $(START:.o=.S) $(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)) - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/Makefile b/arch/powerpc/cpu/mpc8xxx/ddr/Makefile index 29523aa..8cbc06c 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/Makefile +++ b/arch/powerpc/cpu/mpc8xxx/ddr/Makefile @@ -6,17 +6,13 @@ # Version 2 as published by the Free Software Foundation. # -include $(TOPDIR)/config.mk - -LIB = $(obj)libddr.o - -COBJS-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o -COBJS-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o -COBJS-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o ifdef CONFIG_DDR_SPD SPD := y @@ -25,21 +21,9 @@ ifdef CONFIG_SPD_EEPROM SPD := y endif ifdef SPD -COBJS-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o -COBJS-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o -COBJS-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o +obj-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o +obj-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o +obj-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o endif -COBJS-$(CONFIG_FSL_DDR_INTERACTIVE) += interactive.o - -SRCS := $(START:.o=.S) $(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)) - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-$(CONFIG_FSL_DDR_INTERACTIVE) += interactive.o |