Commit e5c5301f authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini

Makefile: make directories by Makefile.build

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
parent 36cf0a84
......@@ -4,8 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(OBJTREE)/board/freescale/common)
extra-y = start.o
obj-y := cpu.o
obj-y += traps.o
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)drivers/epic $(obj)drivers/i2c)
endif
extra-y = start.o
obj-y = traps.o cpu.o cpu_init.o interrupts.o speed.o \
drivers/epic/epic1.o drivers/i2c/i2c.o pci.o
......
......@@ -9,8 +9,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := edminiv2.o ../common/common.o
......@@ -9,10 +9,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := net2big_v2.o ../common/common.o
ifneq ($(and $(CONFIG_KIRKWOOD_GPIO),$(CONFIG_NET2BIG_V2)),)
obj-y += ../common/cpld-gpio-bus.o
......
......@@ -9,8 +9,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := netspace_v2.o ../common/common.o
......@@ -9,8 +9,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := wireless_space.o ../common/common.o
......@@ -8,10 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = db64360.o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
sdram_init.o ../common/intel_flash.o ../common/misc.o
......@@ -8,10 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y += db64460.o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
sdram_init.o ../common/intel_flash.o ../common/misc.o
......@@ -6,10 +6,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := nios2-generic.o
obj-$(CONFIG_CMD_IDE) += ../common/cfide.o
obj-$(CONFIG_EPLED) += ../common/epled.o
......
......@@ -7,8 +7,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
obj-y := ../common/tamonten.o
include ../../nvidia/common/common.mk
......@@ -7,8 +7,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
obj-y := ../common/tamonten.o
include ../../nvidia/common/common.mk
......@@ -7,8 +7,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
obj-y := ../common/tamonten.o
include ../../nvidia/common/common.mk
......@@ -14,8 +14,6 @@
# more details.
#
$(shell mkdir -p $(obj)../../nvidia/common)
obj-y := paz00.o
include ../../nvidia/common/common.mk
......@@ -5,8 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../../nvidia/common)
obj-y := trimslice.o
include ../../nvidia/common/common.mk
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := top5200.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
......@@ -5,7 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = top860.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = adciop.o flash.o ../common/misc.o ../common/pci.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = apc405.o \
../common/misc.o \
../common/auto_update.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = ar405.o flash.o ../common/misc.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = ash405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
......
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = cpci2dp.o flash.o ../common/misc.o ../common/cmd_loadpci.o
......@@ -5,9 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = cpci405.o flash.o ../common/misc.o ../common/auto_update.o
obj-y += ../common/cmd_loadpci.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
# ifneq ($(OBJTREE),$(SRCTREE))
# $(shell mkdir -p $(obj)../common/xilinx_jtag)
# endif
# Objects for Xilinx JTAG programming (CPLD)
# CPLD = ../common/xilinx_jtag/lenval.o \
# ../common/xilinx_jtag/micro.o \
......
......@@ -8,10 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../Marvell/common)
endif
obj-y = misc.o
obj-y += cpci750.o serial.o ../../Marvell/common/memory.o pci.o \
mv_eth.o mpsc.o i2c.o \
......
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = cpciiser4.o flash.o ../common/misc.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = dasa_sim.o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
......
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = du405.o flash.o ../common/misc.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = hh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = hub405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = ocrtc.o flash.o ../common/misc.o cmd_ocrtc.o
......@@ -5,9 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = pci405.o flash.o ../common/misc.o cmd_pci405.o
obj-y += writeibm.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
# ifneq ($(OBJTREE),$(SRCTREE))
# $(shell mkdir -p $(obj)../common/xilinx_jtag)
# endif
# Objects for Xilinx JTAG programming (CPLD)
# CPLD = ../common/xilinx_jtag/lenval.o \
# ../common/xilinx_jtag/micro.o \
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = plu405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = pmc405de.o
obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
obj-y += ../common/cmd_loadpci.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = pmc440.o cmd_pmc440.o sdram.o fpga.o \
../common/cmd_loadpci.o
extra-y += init.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = voh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = wuh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
......@@ -5,7 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := km82xx.o ../common/common.o ../common/ivm.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y += km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
......@@ -6,10 +6,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := km_arm.o ../common/common.o ../common/ivm.o
ifdef CONFIG_KM_FPGA_CONFIG
......
......@@ -8,9 +8,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := kmp204x.o ddr.o eth.o tlb.o pci.o law.o \
../common/common.o ../common/ivm.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = kup4k.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = kup4x.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = mip405.o cmd_mip405.o \
../common/pci.o \
../common/usb_uhci.o \
......
......@@ -5,9 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := pati.o cmd_pati.o \
../common/common_util.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y = pip405.o cmd_pip405.o \
../common/pci.o \
../common/isa.o \
......
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := ../common/common_util.o
obj-y += vcma9.o cmd_vcma9.o
......
......@@ -14,6 +14,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
$(shell mkdir -p $(obj)../cardhu)
obj-y = ../cardhu/cardhu.o
......@@ -5,6 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../seaboard)
obj-y = ../seaboard/seaboard.o
......@@ -5,10 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../Marvell/common)
endif
obj-y = misc.o
obj-y += p3mx.o mpsc.o mv_eth.o pci.o sdram_init.o serial.o \
../../Marvell/common/i2c.o ../../Marvell/common/memory.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := pci5441.o ../common/AMDLV065D.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
obj-y := pk1c20.o led.o ../common/AMDLV065D.o
......@@ -9,10 +9,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
# TBS: add for debugging purposes
BUILDUSER := $(shell whoami)
FORCEBUILD := $(shell rm -f karef.o)
......
......@@ -8,10 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
# TBS: add for debugging purposes
BUILDUSER := $(shell whoami)
FORCEBUILD := $(shell rm -f metrobox.o)
......
......@@ -11,10 +11,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
ifdef CONFIG_SPL_BUILD
obj-y := mux.o
endif
......
......@@ -11,10 +11,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
ifdef CONFIG_SPL_BUILD
obj-y := mux.o
endif
......
......@@ -11,10 +11,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
ifdef CONFIG_SPL_BUILD
obj-y := mux.o
endif
......
......@@ -4,9 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
$(shell mkdir -p $(obj)../../nvidia/common)
$(shell mkdir -p $(obj)../colibri_t20-common)
obj-y := ../../nvidia/common/board.o
obj-y += ../colibri_t20-common/colibri_t20-common.o
obj-y += colibri_t20_iris.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../tqm8xx/)
endif
obj-y = tqm8260.o ../tqm8xx/load_sernum_ethaddr.o
......@@ -5,8 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../tqm8xx/)
endif
obj-y = tqm8272.o ../tqm8xx/load_sernum_ethaddr.o nand.o
......@@ -9,8 +9,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../xilinx/ppc405-generic)
endif
obj-y += ../../xilinx/ppc405-generic/xilinx_ppc405_generic.o
......@@ -9,9 +9,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../xilinx/ppc440-generic)
endif
obj-y += ../../xilinx/ppc440-generic/xilinx_ppc440_generic.o
extra-y += ../../xilinx/ppc440-generic/init.o
X86DIR = x86emu
$(shell mkdir -p $(obj)$(X86DIR))
obj-y = atibios.o biosemu.o besys.o bios.o \
$(X86DIR)/decode.o \
$(X86DIR)/ops2.o \
......
......@@ -24,6 +24,13 @@ SRCS += $(wildcard $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) \
$(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S))
OBJS := $(addprefix $(obj),$(obj-y))
# $(obj-dirs) is a list of directories that contain object files
obj-dirs := $(dir $(OBJS))
# Create directories for object files if directory does not exist
# Needed when obj-y := dir/file.o syntax is used
_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
LGOBJS := $(addprefix $(obj),$(sort $(lib-y)))
all: $(LIB) $(addprefix $(obj),$(extra-y))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment