summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-10-21 11:53:38 +0900
committerTom Rini <trini@ti.com>2013-11-01 11:42:12 -0400
commit377e1048d3065b97b21fea0763b77f1786d5b654 (patch)
tree8360f8ce656344333de7c2758335706bc3acf927 /board
parenta79854a90f7297ddfda2114c867fd62643fa6e3a (diff)
downloadu-boot-377e1048d3065b97b21fea0763b77f1786d5b654.tar.gz
board: powerpc: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: York Sun <yorksun@freescale.com> Cc: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/LEOX/elpt860/Makefile22
-rw-r--r--board/Marvell/db64360/Makefile25
-rw-r--r--board/Marvell/db64460/Makefile25
-rw-r--r--board/RPXClassic/Makefile22
-rw-r--r--board/RPXlite/Makefile22
-rw-r--r--board/RPXlite_dw/Makefile22
-rw-r--r--board/RRvision/Makefile22
-rw-r--r--board/a3000/Makefile22
-rw-r--r--board/a3m071/Makefile22
-rw-r--r--board/a4m072/Makefile22
-rw-r--r--board/adder/Makefile22
-rw-r--r--board/amcc/acadia/Makefile23
-rw-r--r--board/amcc/bamboo/Makefile26
-rw-r--r--board/amcc/bluestone/Makefile27
-rw-r--r--board/amcc/bubinga/Makefile22
-rw-r--r--board/amcc/canyonlands/Makefile29
-rw-r--r--board/amcc/ebony/Makefile24
-rw-r--r--board/amcc/katmai/Makefile27
-rw-r--r--board/amcc/kilauea/Makefile24
-rw-r--r--board/amcc/luan/Makefile24
-rw-r--r--board/amcc/makalu/Makefile23
-rw-r--r--board/amcc/ocotea/Makefile24
-rw-r--r--board/amcc/redwood/Makefile23
-rw-r--r--board/amcc/sequoia/Makefile29
-rw-r--r--board/amcc/taihu/Makefile21
-rw-r--r--board/amcc/taishan/Makefile24
-rw-r--r--board/amcc/walnut/Makefile22
-rw-r--r--board/amcc/yosemite/Makefile24
-rw-r--r--board/amcc/yucca/Makefile24
-rw-r--r--board/atc/Makefile22
-rw-r--r--board/bc3450/Makefile22
-rw-r--r--board/canmb/Makefile25
-rw-r--r--board/cm5200/Makefile22
-rw-r--r--board/cmi/Makefile22
-rw-r--r--board/cogent/Makefile22
-rw-r--r--board/cpc45/Makefile22
-rw-r--r--board/cpu86/Makefile22
-rw-r--r--board/cpu87/Makefile22
-rw-r--r--board/cray/L1/Makefile30
-rw-r--r--board/csb272/Makefile27
-rw-r--r--board/csb472/Makefile27
-rw-r--r--board/cu824/Makefile22
-rw-r--r--board/dave/PPChameleonEVB/Makefile22
-rw-r--r--board/davedenx/aria/Makefile23
-rw-r--r--board/eXalion/Makefile22
-rw-r--r--board/eltec/elppc/Makefile25
-rw-r--r--board/eltec/mhpc/Makefile22
-rw-r--r--board/emk/top5200/Makefile21
-rw-r--r--board/emk/top860/Makefile22
-rw-r--r--board/ep8248/Makefile22
-rw-r--r--board/ep8260/Makefile22
-rw-r--r--board/ep82xxm/Makefile21
-rw-r--r--board/esd/adciop/Makefile21
-rw-r--r--board/esd/apc405/Makefile21
-rw-r--r--board/esd/ar405/Makefile21
-rw-r--r--board/esd/ash405/Makefile21
-rw-r--r--board/esd/cms700/Makefile21
-rw-r--r--board/esd/cpci2dp/Makefile21
-rw-r--r--board/esd/cpci405/Makefile23
-rw-r--r--board/esd/cpci5200/Makefile23
-rw-r--r--board/esd/cpci750/Makefile24
-rw-r--r--board/esd/cpciiser4/Makefile21
-rw-r--r--board/esd/dasa_sim/Makefile21
-rw-r--r--board/esd/dp405/Makefile21
-rw-r--r--board/esd/du405/Makefile21
-rw-r--r--board/esd/du440/Makefile26
-rw-r--r--board/esd/hh405/Makefile21
-rw-r--r--board/esd/hub405/Makefile21
-rw-r--r--board/esd/mecp5123/Makefile23
-rw-r--r--board/esd/mecp5200/Makefile22
-rw-r--r--board/esd/ocrtc/Makefile21
-rw-r--r--board/esd/pci405/Makefile24
-rw-r--r--board/esd/pf5200/Makefile23
-rw-r--r--board/esd/plu405/Makefile21
-rw-r--r--board/esd/pmc405/Makefile21
-rw-r--r--board/esd/pmc405de/Makefile26
-rw-r--r--board/esd/pmc440/Makefile26
-rw-r--r--board/esd/vme8349/Makefile25
-rw-r--r--board/esd/voh405/Makefile21
-rw-r--r--board/esd/vom405/Makefile21
-rw-r--r--board/esd/wuh405/Makefile21
-rw-r--r--board/esteem192e/Makefile22
-rw-r--r--board/etin/debris/Makefile22
-rw-r--r--board/etin/kvme080/Makefile22
-rw-r--r--board/evb64260/Makefile24
-rw-r--r--board/exmeritus/hww1u1a/Makefile28
-rw-r--r--board/fads/Makefile22
-rw-r--r--board/flagadm/Makefile22
-rw-r--r--board/freescale/b4860qds/Makefile38
-rw-r--r--board/freescale/bsc9131rdb/Makefile38
-rw-r--r--board/freescale/bsc9132qds/Makefile37
-rw-r--r--board/freescale/c29xpcie/Makefile30
-rw-r--r--board/freescale/common/Makefile86
-rw-r--r--board/freescale/common/p_corenet/Makefile11
-rw-r--r--board/freescale/corenet_ds/Makefile40
-rw-r--r--board/freescale/mpc5121ads/Makefile25
-rw-r--r--board/freescale/mpc7448hpc2/Makefile24
-rw-r--r--board/freescale/mpc8260ads/Makefile22
-rw-r--r--board/freescale/mpc8266ads/Makefile22
-rw-r--r--board/freescale/mpc8308rdb/Makefile22
-rw-r--r--board/freescale/mpc8313erdb/Makefile22
-rw-r--r--board/freescale/mpc8315erdb/Makefile22
-rw-r--r--board/freescale/mpc8323erdb/Makefile22
-rw-r--r--board/freescale/mpc832xemds/Makefile25
-rw-r--r--board/freescale/mpc8349emds/Makefile27
-rw-r--r--board/freescale/mpc8349itx/Makefile24
-rw-r--r--board/freescale/mpc8360emds/Makefile25
-rw-r--r--board/freescale/mpc8360erdk/Makefile25
-rw-r--r--board/freescale/mpc837xemds/Makefile25
-rw-r--r--board/freescale/mpc837xerdb/Makefile25
-rw-r--r--board/freescale/mpc8536ds/Makefile28
-rw-r--r--board/freescale/mpc8540ads/Makefile28
-rw-r--r--board/freescale/mpc8541cds/Makefile28
-rw-r--r--board/freescale/mpc8544ds/Makefile28
-rw-r--r--board/freescale/mpc8548cds/Makefile28
-rw-r--r--board/freescale/mpc8555cds/Makefile28
-rw-r--r--board/freescale/mpc8560ads/Makefile28
-rw-r--r--board/freescale/mpc8568mds/Makefile30
-rw-r--r--board/freescale/mpc8569mds/Makefile30
-rw-r--r--board/freescale/mpc8572ds/Makefile28
-rw-r--r--board/freescale/mpc8610hpcd/Makefile29
-rw-r--r--board/freescale/mpc8641hpcn/Makefile26
-rw-r--r--board/freescale/p1010rdb/Makefile30
-rw-r--r--board/freescale/p1022ds/Makefile34
-rw-r--r--board/freescale/p1023rdb/Makefile28
-rw-r--r--board/freescale/p1023rds/Makefile26
-rw-r--r--board/freescale/p1_p2_rdb/Makefile30
-rw-r--r--board/freescale/p1_p2_rdb_pc/Makefile30
-rw-r--r--board/freescale/p1_twr/Makefile34
-rw-r--r--board/freescale/p2020come/Makefile28
-rw-r--r--board/freescale/p2020ds/Makefile28
-rw-r--r--board/freescale/p2041rdb/Makefile28
-rw-r--r--board/freescale/t4qds/Makefile40
-rw-r--r--board/funkwerk/vovpn-gw/Makefile22
-rw-r--r--board/g2000/Makefile22
-rw-r--r--board/galaxy5200/Makefile22
-rw-r--r--board/gdsys/405ep/Makefile32
-rw-r--r--board/gdsys/405ex/Makefile33
-rw-r--r--board/gdsys/common/Makefile40
-rw-r--r--board/gdsys/dlvision/Makefile23
-rw-r--r--board/gdsys/gdppc440etx/Makefile24
-rw-r--r--board/gdsys/intip/Makefile29
-rw-r--r--board/gdsys/p1022/Makefile34
-rw-r--r--board/gen860t/Makefile22
-rw-r--r--board/genietv/Makefile22
-rw-r--r--board/gw8260/Makefile23
-rw-r--r--board/hermes/Makefile22
-rw-r--r--board/hidden_dragon/Makefile22
-rw-r--r--board/hymod/Makefile22
-rw-r--r--board/icecube/Makefile22
-rw-r--r--board/icu862/Makefile22
-rw-r--r--board/ids8247/Makefile22
-rw-r--r--board/ifm/ac14xx/Makefile23
-rw-r--r--board/ifm/o2dnt2/Makefile22
-rw-r--r--board/inka4x0/Makefile22
-rw-r--r--board/intercontrol/digsy_mtc/Makefile24
-rw-r--r--board/ip860/Makefile22
-rw-r--r--board/ipek01/Makefile22
-rw-r--r--board/iphase4539/Makefile22
-rw-r--r--board/ispan/Makefile22
-rw-r--r--board/ivm/Makefile22
-rw-r--r--board/jse/Makefile24
-rw-r--r--board/jupiter/Makefile22
-rw-r--r--board/keymile/km82xx/Makefile22
-rw-r--r--board/keymile/km83xx/Makefile21
-rw-r--r--board/korat/Makefile26
-rw-r--r--board/kup/kup4k/Makefile21
-rw-r--r--board/kup/kup4x/Makefile21
-rw-r--r--board/linkstation/Makefile21
-rw-r--r--board/lwmon/Makefile22
-rw-r--r--board/lwmon5/Makefile26
-rw-r--r--board/manroland/hmi1001/Makefile22
-rw-r--r--board/manroland/mucmc52/Makefile22
-rw-r--r--board/manroland/uc100/Makefile23
-rw-r--r--board/manroland/uc101/Makefile22
-rw-r--r--board/matrix_vision/common/Makefile26
-rw-r--r--board/matrix_vision/mergerbox/Makefile23
-rw-r--r--board/matrix_vision/mvbc_p/Makefile19
-rw-r--r--board/matrix_vision/mvblm7/Makefile23
-rw-r--r--board/matrix_vision/mvsmr/Makefile21
-rw-r--r--board/mbx8xx/Makefile22
-rw-r--r--board/mcc200/Makefile22
-rw-r--r--board/mosaixtech/icon/Makefile27
-rw-r--r--board/motionpro/Makefile22
-rw-r--r--board/mousse/Makefile21
-rw-r--r--board/mpc8308_p1m/Makefile22
-rw-r--r--board/mpl/mip405/Makefile24
-rw-r--r--board/mpl/pati/Makefile21
-rw-r--r--board/mpl/pip405/Makefile24
-rw-r--r--board/muas3001/Makefile22
-rw-r--r--board/munices/Makefile22
-rw-r--r--board/musenki/Makefile22
-rw-r--r--board/mvblue/Makefile22
-rw-r--r--board/netphone/Makefile22
-rw-r--r--board/netta/Makefile22
-rw-r--r--board/netta2/Makefile22
-rw-r--r--board/netvia/Makefile22
-rw-r--r--board/nx823/Makefile22
-rw-r--r--board/pcs440ep/Makefile24
-rw-r--r--board/pdm360ng/Makefile23
-rw-r--r--board/phytec/pcm030/Makefile22
-rw-r--r--board/pm520/Makefile22
-rw-r--r--board/pm826/Makefile22
-rw-r--r--board/pm828/Makefile22
-rw-r--r--board/pn62/Makefile22
-rw-r--r--board/ppmc7xx/Makefile25
-rw-r--r--board/ppmc8260/Makefile22
-rw-r--r--board/prodrive/alpr/Makefile24
-rw-r--r--board/prodrive/p3mx/Makefile23
-rw-r--r--board/prodrive/p3p440/Makefile24
-rw-r--r--board/quad100hd/Makefile23
-rw-r--r--board/quantum/Makefile22
-rw-r--r--board/r360mpi/Makefile22
-rw-r--r--board/rattler/Makefile22
-rw-r--r--board/rbc823/Makefile22
-rw-r--r--board/rpxsuper/Makefile22
-rw-r--r--board/rsdproto/Makefile24
-rw-r--r--board/sacsng/Makefile22
-rw-r--r--board/sandburst/karef/Makefile27
-rw-r--r--board/sandburst/metrobox/Makefile26
-rw-r--r--board/sandpoint/Makefile22
-rw-r--r--board/sbc405/Makefile22
-rw-r--r--board/sbc8349/Makefile25
-rw-r--r--board/sbc8548/Makefile28
-rw-r--r--board/sbc8641d/Makefile26
-rw-r--r--board/sc3/Makefile24
-rw-r--r--board/sheldon/simpc8313/Makefile22
-rw-r--r--board/sixnet/Makefile22
-rw-r--r--board/snmc/qs850/Makefile22
-rw-r--r--board/snmc/qs860t/Makefile22
-rw-r--r--board/socrates/Makefile33
-rw-r--r--board/spc1920/Makefile22
-rw-r--r--board/spd8xx/Makefile22
-rw-r--r--board/stx/stxgp3/Makefile30
-rw-r--r--board/stx/stxssa/Makefile28
-rw-r--r--board/stx/stxxtc/Makefile22
-rw-r--r--board/svm_sc8xx/Makefile22
-rw-r--r--board/t3corp/Makefile29
-rw-r--r--board/total5200/Makefile22
-rw-r--r--board/tqc/tqm5200/Makefile24
-rw-r--r--board/tqc/tqm8260/Makefile21
-rw-r--r--board/tqc/tqm8272/Makefile21
-rw-r--r--board/tqc/tqm834x/Makefile25
-rw-r--r--board/tqc/tqm8xx/Makefile22
-rw-r--r--board/utx8245/Makefile22
-rw-r--r--board/v37/Makefile22
-rw-r--r--board/v38b/Makefile22
-rw-r--r--board/ve8313/Makefile22
-rw-r--r--board/w7o/Makefile24
-rw-r--r--board/xes/common/Makefile38
-rw-r--r--board/xes/xpedite1000/Makefile24
-rw-r--r--board/xes/xpedite517x/Makefile26
-rw-r--r--board/xes/xpedite520x/Makefile28
-rw-r--r--board/xes/xpedite537x/Makefile28
-rw-r--r--board/xes/xpedite550x/Makefile28
-rw-r--r--board/zeus/Makefile23
-rw-r--r--board/zpc1900/Makefile22
257 files changed, 525 insertions, 5734 deletions
diff --git a/board/LEOX/elpt860/Makefile b/board/LEOX/elpt860/Makefile
index 0268f9ce48..80f5efe481 100644
--- a/board/LEOX/elpt860/Makefile
+++ b/board/LEOX/elpt860/Makefile
@@ -19,24 +19,4 @@
#
#######################################################################
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = elpt860.o flash.o
diff --git a/board/Marvell/db64360/Makefile b/board/Marvell/db64360/Makefile
index a5f2c54556..aad4776b88 100644
--- a/board/Marvell/db64360/Makefile
+++ b/board/Marvell/db64360/Makefile
@@ -8,31 +8,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS = ../common/misc.o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
+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
-
-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
-
-#########################################################################
+ sdram_init.o ../common/intel_flash.o ../common/misc.o
diff --git a/board/Marvell/db64460/Makefile b/board/Marvell/db64460/Makefile
index a5f2c54556..ea9e57086e 100644
--- a/board/Marvell/db64460/Makefile
+++ b/board/Marvell/db64460/Makefile
@@ -8,31 +8,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS = ../common/misc.o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
+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
-
-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
-
-#########################################################################
+ sdram_init.o ../common/intel_flash.o ../common/misc.o
diff --git a/board/RPXClassic/Makefile b/board/RPXClassic/Makefile
index c7c05a17e6..87db754faa 100644
--- a/board/RPXClassic/Makefile
+++ b/board/RPXClassic/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o eccx.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = RPXClassic.o flash.o eccx.o
diff --git a/board/RPXlite/Makefile b/board/RPXlite/Makefile
index 871865b6ee..c17cbacf32 100644
--- a/board/RPXlite/Makefile
+++ b/board/RPXlite/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = RPXlite.o flash.o
diff --git a/board/RPXlite_dw/Makefile b/board/RPXlite_dw/Makefile
index 871865b6ee..eff33cff95 100644
--- a/board/RPXlite_dw/Makefile
+++ b/board/RPXlite_dw/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = RPXlite_dw.o flash.o
diff --git a/board/RRvision/Makefile b/board/RRvision/Makefile
index 871865b6ee..908e8f8da5 100644
--- a/board/RRvision/Makefile
+++ b/board/RRvision/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = RRvision.o flash.o
diff --git a/board/a3000/Makefile b/board/a3000/Makefile
index e9558412e1..9b9b048be6 100644
--- a/board/a3000/Makefile
+++ b/board/a3000/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = a3000.o flash.o
diff --git a/board/a3m071/Makefile b/board/a3m071/Makefile
index 5d2e4d162b..4e31e33936 100644
--- a/board/a3m071/Makefile
+++ b/board/a3m071/Makefile
@@ -2,24 +2,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := a3m071.o
diff --git a/board/a4m072/Makefile b/board/a4m072/Makefile
index 3acd06bba7..2a40e5799e 100644
--- a/board/a4m072/Makefile
+++ b/board/a4m072/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := a4m072.o
diff --git a/board/adder/Makefile b/board/adder/Makefile
index 07fa3f3a2f..8dc505a5fe 100644
--- a/board/adder/Makefile
+++ b/board/adder/Makefile
@@ -8,24 +8,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := adder.o
diff --git a/board/amcc/acadia/Makefile b/board/amcc/acadia/Makefile
index 06f5c6ac61..035f407275 100644
--- a/board/amcc/acadia/Makefile
+++ b/board/amcc/acadia/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_acadia.o memory.o pll.o
-SOBJS =
-
-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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = acadia.o cmd_acadia.o memory.o pll.o
diff --git a/board/amcc/bamboo/Makefile b/board/amcc/bamboo/Makefile
index 6a5464d597..4c0a1253f1 100644
--- a/board/amcc/bamboo/Makefile
+++ b/board/amcc/bamboo/Makefile
@@ -5,27 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = bamboo.o flash.o
+extra-y += init.o
diff --git a/board/amcc/bluestone/Makefile b/board/amcc/bluestone/Makefile
index 289b3796ad..07320ce425 100644
--- a/board/amcc/bluestone/Makefile
+++ b/board/amcc/bluestone/Makefile
@@ -5,28 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-SOBJS := init.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := bluestone.o
+extra-y += init.o
diff --git a/board/amcc/bubinga/Makefile b/board/amcc/bubinga/Makefile
index bea58a7cae..0e7ebcaedd 100644
--- a/board/amcc/bubinga/Makefile
+++ b/board/amcc/bubinga/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = bubinga.o flash.o
diff --git a/board/amcc/canyonlands/Makefile b/board/amcc/canyonlands/Makefile
index 415ec3298f..ba0765fe99 100644
--- a/board/amcc/canyonlands/Makefile
+++ b/board/amcc/canyonlands/Makefile
@@ -5,29 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS := init.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := canyonlands.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/amcc/ebony/Makefile b/board/amcc/ebony/Makefile
index 553fc6b14a..5876486f58 100644
--- a/board/amcc/ebony/Makefile
+++ b/board/amcc/ebony/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 = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ebony.o flash.o
+extra-y += init.o
diff --git a/board/amcc/katmai/Makefile b/board/amcc/katmai/Makefile
index b190ebad2a..b738defc1e 100644
--- a/board/amcc/katmai/Makefile
+++ b/board/amcc/katmai/Makefile
@@ -5,27 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS = init.o
-
-COBJS := $(COBJS-y)
-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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := katmai.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/amcc/kilauea/Makefile b/board/amcc/kilauea/Makefile
index 7e7ff2747a..754dadc66a 100644
--- a/board/amcc/kilauea/Makefile
+++ b/board/amcc/kilauea/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := kilauea.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
diff --git a/board/amcc/luan/Makefile b/board/amcc/luan/Makefile
index 553fc6b14a..345ad564dc 100644
--- a/board/amcc/luan/Makefile
+++ b/board/amcc/luan/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 = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = luan.o flash.o
+extra-y += init.o
diff --git a/board/amcc/makalu/Makefile b/board/amcc/makalu/Makefile
index efc4bf8530..dcf162ca98 100644
--- a/board/amcc/makalu/Makefile
+++ b/board/amcc/makalu/Makefile
@@ -5,24 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_pll.o
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = makalu.o cmd_pll.o
+obj-y += init.o
diff --git a/board/amcc/ocotea/Makefile b/board/amcc/ocotea/Makefile
index 553fc6b14a..7646bbb961 100644
--- a/board/amcc/ocotea/Makefile
+++ b/board/amcc/ocotea/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 = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ocotea.o flash.o
+extra-y += init.o
diff --git a/board/amcc/redwood/Makefile b/board/amcc/redwood/Makefile
index 2ab3b20460..2bc632b240 100644
--- a/board/amcc/redwood/Makefile
+++ b/board/amcc/redwood/Makefile
@@ -5,24 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = 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))
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = redwood.o
+extra-y += init.o
diff --git a/board/amcc/sequoia/Makefile b/board/amcc/sequoia/Makefile
index c2a4c4b675..b4ab5daa85 100644
--- a/board/amcc/sequoia/Makefile
+++ b/board/amcc/sequoia/Makefile
@@ -5,29 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y = $(BOARD).o sdram.o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS = init.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = sequoia.o sdram.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/amcc/taihu/Makefile b/board/amcc/taihu/Makefile
index 8a7bf4ad98..65606fe080 100644
--- a/board/amcc/taihu/Makefile
+++ b/board/amcc/taihu/Makefile
@@ -5,23 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o lcd.o update.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = taihu.o flash.o lcd.o update.o
diff --git a/board/amcc/taishan/Makefile b/board/amcc/taishan/Makefile
index 4bb14fe98b..04e93cc0da 100644
--- a/board/amcc/taishan/Makefile
+++ b/board/amcc/taishan/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o lcd.o update.o showinfo.o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = taishan.o lcd.o update.o showinfo.o
+extra-y += init.o
diff --git a/board/amcc/walnut/Makefile b/board/amcc/walnut/Makefile
index bea58a7cae..922817076c 100644
--- a/board/amcc/walnut/Makefile
+++ b/board/amcc/walnut/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = walnut.o flash.o
diff --git a/board/amcc/yosemite/Makefile b/board/amcc/yosemite/Makefile
index 1d80df8b74..daf020a5a9 100644
--- a/board/amcc/yosemite/Makefile
+++ b/board/amcc/yosemite/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = yosemite.o
+extra-y += init.o
diff --git a/board/amcc/yucca/Makefile b/board/amcc/yucca/Makefile
index eaeb3871ef..5b1af3290f 100644
--- a/board/amcc/yucca/Makefile
+++ b/board/amcc/yucca/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 cmd_yucca.o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = yucca.o flash.o cmd_yucca.o
+extra-y += init.o
diff --git a/board/atc/Makefile b/board/atc/Makefile
index aa100e4213..3a163c4c6b 100644
--- a/board/atc/Makefile
+++ b/board/atc/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ti113x.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = atc.o flash.o ti113x.o
diff --git a/board/bc3450/Makefile b/board/bc3450/Makefile
index 07970c65e3..b8d22bafed 100644
--- a/board/bc3450/Makefile
+++ b/board/bc3450/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o cmd_bc3450.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := bc3450.o cmd_bc3450.o
diff --git a/board/canmb/Makefile b/board/canmb/Makefile
index 4698706bb9..4286a9123c 100644
--- a/board/canmb/Makefile
+++ b/board/canmb/Makefile
@@ -5,28 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-#ifneq ($(OBJTREE),$(SRCTREE))
-#$(shell mkdir -p $(obj)../common)
-#endif
+obj-y := canmb.o
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-#../common/flash.o ../common/vpd.o ../common/am79c874.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/cm5200/Makefile b/board/cm5200/Makefile
index 59353e9895..76f8b9fc05 100644
--- a/board/cm5200/Makefile
+++ b/board/cm5200/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o cmd_cm5200.o fwupdate.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := cm5200.o cmd_cm5200.o fwupdate.o
diff --git a/board/cmi/Makefile b/board/cmi/Makefile
index 0d1c6fbb21..cd3bb0db21 100644
--- a/board/cmi/Makefile
+++ b/board/cmi/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := flash.o cmi.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := flash.o cmi.o
diff --git a/board/cogent/Makefile b/board/cogent/Makefile
index e7d69dffdc..30fe98d4dd 100644
--- a/board/cogent/Makefile
+++ b/board/cogent/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := mb.o flash.o dipsw.o lcd.o serial.o # pci.o rtc.o par.o kbm.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mb.o flash.o dipsw.o lcd.o serial.o # pci.o rtc.o par.o kbm.o
diff --git a/board/cpc45/Makefile b/board/cpc45/Makefile
index 446585fc1d..1310f93877 100644
--- a/board/cpc45/Makefile
+++ b/board/cpc45/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o plx9030.o pd67290.o ide.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpc45.o flash.o plx9030.o pd67290.o ide.o
diff --git a/board/cpu86/Makefile b/board/cpu86/Makefile
index e9558412e1..da83afd700 100644
--- a/board/cpu86/Makefile
+++ b/board/cpu86/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpu86.o flash.o
diff --git a/board/cpu87/Makefile b/board/cpu87/Makefile
index e9558412e1..0d59bbbb38 100644
--- a/board/cpu87/Makefile
+++ b/board/cpu87/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpu87.o flash.o
diff --git a/board/cray/L1/Makefile b/board/cray/L1/Makefile
index 9e6461ace1..5f6c690b7c 100644
--- a/board/cray/L1/Makefile
+++ b/board/cray/L1/Makefile
@@ -5,36 +5,12 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-SOBJS = init.o
-
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-# HACK: depend needs bootscript.c, which needs tools/mkimage, which is not
-# built in the depend stage. So... put bootscript.o here, not in OBJS
-$(LIB): $(OBJS) $(SOBJS) $(obj)bootscript.o
- $(call cmd_link_o_target, $^)
-
-$(obj)$(BOARD).o : $(src)$(BOARD).c $(obj)bootscript.o
+obj-y = L1.o flash.o
+obj-y += init.o
+obj-y += bootscript.o
$(obj)bootscript.c: $(obj)bootscript.image
od -t x1 -v -A x $^ | awk -f x2c.awk > $@
$(obj)bootscript.image: $(src)bootscript.hush $(src)Makefile
-$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d $(src)bootscript.hush $@
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/csb272/Makefile b/board/csb272/Makefile
index fdcbb43034..36ec9b6f4d 100644
--- a/board/csb272/Makefile
+++ b/board/csb272/Makefile
@@ -5,28 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-#COBJS = $(BOARD).o flash.o
-#COBJS = $(BOARD).o strataflash.o
-COBJS = $(BOARD).o
-
-SOBJS = 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, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = csb272.o
+obj-y += init.o
diff --git a/board/csb472/Makefile b/board/csb472/Makefile
index fdcbb43034..5f7e8b533e 100644
--- a/board/csb472/Makefile
+++ b/board/csb472/Makefile
@@ -5,28 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-#COBJS = $(BOARD).o flash.o
-#COBJS = $(BOARD).o strataflash.o
-COBJS = $(BOARD).o
-
-SOBJS = 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, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = csb472.o
+obj-y += init.o
diff --git a/board/cu824/Makefile b/board/cu824/Makefile
index e9558412e1..e7bd7ca3a7 100644
--- a/board/cu824/Makefile
+++ b/board/cu824/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cu824.o flash.o
diff --git a/board/dave/PPChameleonEVB/Makefile b/board/dave/PPChameleonEVB/Makefile
index eafe6e3daf..31edc4a57d 100644
--- a/board/dave/PPChameleonEVB/Makefile
+++ b/board/dave/PPChameleonEVB/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o nand.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = PPChameleonEVB.o flash.o nand.o
diff --git a/board/davedenx/aria/Makefile b/board/davedenx/aria/Makefile
index f78fe13d35..dd38b7f389 100644
--- a/board/davedenx/aria/Makefile
+++ b/board/davedenx/aria/Makefile
@@ -4,25 +4,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := aria.o
diff --git a/board/eXalion/Makefile b/board/eXalion/Makefile
index 5fd87809f0..9192e280f8 100644
--- a/board/eXalion/Makefile
+++ b/board/eXalion/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = eXalion.o
diff --git a/board/eltec/elppc/Makefile b/board/eltec/elppc/Makefile
index 51179c08df..791f2fbe3d 100644
--- a/board/eltec/elppc/Makefile
+++ b/board/eltec/elppc/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o pci.o misc.o mpc107_i2c.o eepro100_srom.o
-
-SOBJS = asm_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 = elppc.o flash.o pci.o misc.o mpc107_i2c.o eepro100_srom.o
+obj-y += asm_init.o
diff --git a/board/eltec/mhpc/Makefile b/board/eltec/mhpc/Makefile
index 871865b6ee..f3fcc2f370 100644
--- a/board/eltec/mhpc/Makefile
+++ b/board/eltec/mhpc/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mhpc.o flash.o
diff --git a/board/emk/top5200/Makefile b/board/emk/top5200/Makefile
index 4b15bb6637..eb626a6a2c 100644
--- a/board/emk/top5200/Makefile
+++ b/board/emk/top5200/Makefile
@@ -6,27 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o ../common/flash.o ../common/vpd.o ../common/am79c874.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := top5200.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
diff --git a/board/emk/top860/Makefile b/board/emk/top860/Makefile
index a45f0ef26a..b2645f6347 100644
--- a/board/emk/top860/Makefile
+++ b/board/emk/top860/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/vpd.o ../common/am79c874.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = top860.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
diff --git a/board/ep8248/Makefile b/board/ep8248/Makefile
index c573be952c..bfaf1c89d8 100644
--- a/board/ep8248/Makefile
+++ b/board/ep8248/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ep8248.o
diff --git a/board/ep8260/Makefile b/board/ep8260/Makefile
index 0a716f9535..dd08b74bfc 100644
--- a/board/ep8260/Makefile
+++ b/board/ep8260/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o mii_phy.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ep8260.o flash.o mii_phy.o
diff --git a/board/ep82xxm/Makefile b/board/ep82xxm/Makefile
index 459d7b8ab1..f9d3891cc1 100644
--- a/board/ep82xxm/Makefile
+++ b/board/ep82xxm/Makefile
@@ -5,23 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ep82xxm.o
diff --git a/board/esd/adciop/Makefile b/board/esd/adciop/Makefile
index cbe2987ea2..9635189185 100644
--- a/board/esd/adciop/Makefile
+++ b/board/esd/adciop/Makefile
@@ -6,27 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.o ../common/pci.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = adciop.o flash.o ../common/misc.o ../common/pci.o
diff --git a/board/esd/apc405/Makefile b/board/esd/apc405/Makefile
index b84e6624bf..c6ab1a5e21 100644
--- a/board/esd/apc405/Makefile
+++ b/board/esd/apc405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o \
+obj-y = apc405.o \
../common/misc.o \
../common/auto_update.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/ar405/Makefile b/board/esd/ar405/Makefile
index e5caf2331a..2d16313e8d 100644
--- a/board/esd/ar405/Makefile
+++ b/board/esd/ar405/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ar405.o flash.o ../common/misc.o
diff --git a/board/esd/ash405/Makefile b/board/esd/ash405/Makefile
index 17dd09783b..4c866ee0aa 100644
--- a/board/esd/ash405/Makefile
+++ b/board/esd/ash405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = ash405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/cms700/Makefile b/board/esd/cms700/Makefile
index 4ae77271ea..8cfe3baf79 100644
--- a/board/esd/cms700/Makefile
+++ b/board/esd/cms700/Makefile
@@ -5,35 +5,16 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
../common/xilinx_jtag/ports.o
-COBJS = $(BOARD).o flash.o \
+obj-y = cms700.o flash.o \
../common/misc.o \
$(CPLD) \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/cpci2dp/Makefile b/board/esd/cpci2dp/Makefile
index a6edac0c6c..1d1502071e 100644
--- a/board/esd/cpci2dp/Makefile
+++ b/board/esd/cpci2dp/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.o ../common/cmd_loadpci.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpci2dp.o flash.o ../common/misc.o ../common/cmd_loadpci.o
diff --git a/board/esd/cpci405/Makefile b/board/esd/cpci405/Makefile
index 6868e6886a..1af7e9454d 100644
--- a/board/esd/cpci405/Makefile
+++ b/board/esd/cpci405/Makefile
@@ -5,28 +5,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.o ../common/auto_update.o
-COBJS += ../common/cmd_loadpci.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpci405.o flash.o ../common/misc.o ../common/auto_update.o
+obj-y += ../common/cmd_loadpci.o
diff --git a/board/esd/cpci5200/Makefile b/board/esd/cpci5200/Makefile
index 80eb23d6f4..fb6c0e20e4 100644
--- a/board/esd/cpci5200/Makefile
+++ b/board/esd/cpci5200/Makefile
@@ -5,33 +5,14 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
# ifneq ($(OBJTREE),$(SRCTREE))
# $(shell mkdir -p $(obj)../common/xilinx_jtag)
# endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
# CPLD = ../common/xilinx_jtag/lenval.o \
# ../common/xilinx_jtag/micro.o \
# ../common/xilinx_jtag/ports.o
-# COBJS = $(BOARD).o flash.o $(CPLD)
-COBJS = $(BOARD).o strataflash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+# obj-y = cpci5200.o flash.o $(CPLD)
+obj-y = cpci5200.o strataflash.o
diff --git a/board/esd/cpci750/Makefile b/board/esd/cpci750/Makefile
index 0be10fe1d4..8b3dc33704 100644
--- a/board/esd/cpci750/Makefile
+++ b/board/esd/cpci750/Makefile
@@ -8,31 +8,11 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../Marvell/common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS = misc.o
-
-COBJS = $(BOARD).o serial.o ../../Marvell/common/memory.o pci.o \
+obj-y = misc.o
+obj-y += cpci750.o serial.o ../../Marvell/common/memory.o pci.o \
mv_eth.o mpsc.o i2c.o \
sdram_init.o ide.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
-
-#########################################################################
diff --git a/board/esd/cpciiser4/Makefile b/board/esd/cpciiser4/Makefile
index e5caf2331a..4d3c34ae42 100644
--- a/board/esd/cpciiser4/Makefile
+++ b/board/esd/cpciiser4/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = cpciiser4.o flash.o ../common/misc.o
diff --git a/board/esd/dasa_sim/Makefile b/board/esd/dasa_sim/Makefile
index 3190a115f0..7dc48ba694 100644
--- a/board/esd/dasa_sim/Makefile
+++ b/board/esd/dasa_sim/Makefile
@@ -6,27 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = dasa_sim.o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o
diff --git a/board/esd/dp405/Makefile b/board/esd/dp405/Makefile
index 0fd6fe53cb..6809c673ce 100644
--- a/board/esd/dp405/Makefile
+++ b/board/esd/dp405/Makefile
@@ -5,32 +5,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
../common/xilinx_jtag/ports.o
-COBJS = $(BOARD).o flash.o ../common/misc.o $(CPLD)
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = dp405.o flash.o ../common/misc.o $(CPLD)
diff --git a/board/esd/du405/Makefile b/board/esd/du405/Makefile
index e5caf2331a..12ce41a9a8 100644
--- a/board/esd/du405/Makefile
+++ b/board/esd/du405/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = du405.o flash.o ../common/misc.o
diff --git a/board/esd/du440/Makefile b/board/esd/du440/Makefile
index 7ccd9a8574..ef41d94ac9 100644
--- a/board/esd/du440/Makefile
+++ b/board/esd/du440/Makefile
@@ -5,27 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = du440.o
+extra-y += init.o
diff --git a/board/esd/hh405/Makefile b/board/esd/hh405/Makefile
index fdae010b1b..0507f1b4dd 100644
--- a/board/esd/hh405/Makefile
+++ b/board/esd/hh405/Makefile
@@ -5,30 +5,11 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = hh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.o \
../common/auto_update.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/hub405/Makefile b/board/esd/hub405/Makefile
index 17dd09783b..5447a959c0 100644
--- a/board/esd/hub405/Makefile
+++ b/board/esd/hub405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = hub405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/mecp5123/Makefile b/board/esd/mecp5123/Makefile
index f78fe13d35..f5ebb0144f 100644
--- a/board/esd/mecp5123/Makefile
+++ b/board/esd/mecp5123/Makefile
@@ -4,25 +4,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mecp5123.o
diff --git a/board/esd/mecp5200/Makefile b/board/esd/mecp5200/Makefile
index c85223385b..19f0055850 100644
--- a/board/esd/mecp5200/Makefile
+++ b/board/esd/mecp5200/Makefile
@@ -6,24 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mecp5200.o
diff --git a/board/esd/ocrtc/Makefile b/board/esd/ocrtc/Makefile
index b8452582be..0d9a6fdc43 100644
--- a/board/esd/ocrtc/Makefile
+++ b/board/esd/ocrtc/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.o cmd_ocrtc.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ocrtc.o flash.o ../common/misc.o cmd_ocrtc.o
diff --git a/board/esd/pci405/Makefile b/board/esd/pci405/Makefile
index 9f01c56786..2f8706bd6e 100644
--- a/board/esd/pci405/Makefile
+++ b/board/esd/pci405/Makefile
@@ -5,29 +5,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o ../common/misc.o cmd_pci405.o
-SOBJS = writeibm.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))
- $(call cmd_link_o_target, $(OBJS) $(SOBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pci405.o flash.o ../common/misc.o cmd_pci405.o
+obj-y += writeibm.o
diff --git a/board/esd/pf5200/Makefile b/board/esd/pf5200/Makefile
index 121f772806..24abbaf868 100644
--- a/board/esd/pf5200/Makefile
+++ b/board/esd/pf5200/Makefile
@@ -6,33 +6,14 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
# ifneq ($(OBJTREE),$(SRCTREE))
# $(shell mkdir -p $(obj)../common/xilinx_jtag)
# endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
# CPLD = ../common/xilinx_jtag/lenval.o \
# ../common/xilinx_jtag/micro.o \
# ../common/xilinx_jtag/ports.o
-# COBJS = $(BOARD).o flash.o $(CPLD)
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+# obj-y = pf5200.o flash.o $(CPLD)
+obj-y = pf5200.o flash.o
diff --git a/board/esd/plu405/Makefile b/board/esd/plu405/Makefile
index 17dd09783b..45b962f69a 100644
--- a/board/esd/plu405/Makefile
+++ b/board/esd/plu405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = plu405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/pmc405/Makefile b/board/esd/pmc405/Makefile
index 225974d986..f4aa1c9eea 100644
--- a/board/esd/pmc405/Makefile
+++ b/board/esd/pmc405/Makefile
@@ -5,32 +5,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
../common/xilinx_jtag/ports.o
-COBJS = $(BOARD).o ../common/misc.o ../common/cmd_loadpci.o $(CPLD)
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pmc405.o ../common/misc.o ../common/cmd_loadpci.o $(CPLD)
diff --git a/board/esd/pmc405de/Makefile b/board/esd/pmc405de/Makefile
index 997f07ec11..7d5b273c0f 100644
--- a/board/esd/pmc405de/Makefile
+++ b/board/esd/pmc405de/Makefile
@@ -5,30 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y = $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-COBJS-y += ../common/cmd_loadpci.o
-
-COBJS := $(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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pmc405de.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+obj-y += ../common/cmd_loadpci.o
diff --git a/board/esd/pmc440/Makefile b/board/esd/pmc440/Makefile
index 6d6690a221..b1318c7429 100644
--- a/board/esd/pmc440/Makefile
+++ b/board/esd/pmc440/Makefile
@@ -5,32 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_pmc440.o sdram.o fpga.o \
+obj-y = pmc440.o cmd_pmc440.o sdram.o fpga.o \
../common/cmd_loadpci.o
-
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+extra-y += init.o
diff --git a/board/esd/vme8349/Makefile b/board/esd/vme8349/Makefile
index 4dd47b7cdc..fa11d5d108 100644
--- a/board/esd/vme8349/Makefile
+++ b/board/esd/vme8349/Makefile
@@ -7,26 +7,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o caddy.o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += vme8349.o caddy.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/esd/voh405/Makefile b/board/esd/voh405/Makefile
index 17dd09783b..8fcfa37dc0 100644
--- a/board/esd/voh405/Makefile
+++ b/board/esd/voh405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = voh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esd/vom405/Makefile b/board/esd/vom405/Makefile
index 0fd6fe53cb..c8a4a4e4c7 100644
--- a/board/esd/vom405/Makefile
+++ b/board/esd/vom405/Makefile
@@ -5,32 +5,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common/xilinx_jtag)
endif
-LIB = $(obj)lib$(BOARD).o
-
# Objects for Xilinx JTAG programming (CPLD)
CPLD = ../common/xilinx_jtag/lenval.o \
../common/xilinx_jtag/micro.o \
../common/xilinx_jtag/ports.o
-COBJS = $(BOARD).o flash.o ../common/misc.o $(CPLD)
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = vom405.o flash.o ../common/misc.o $(CPLD)
diff --git a/board/esd/wuh405/Makefile b/board/esd/wuh405/Makefile
index 17dd09783b..046ebad301 100644
--- a/board/esd/wuh405/Makefile
+++ b/board/esd/wuh405/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o \
+obj-y = wuh405.o flash.o \
../common/misc.o \
../common/esd405ep_nand.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/esteem192e/Makefile b/board/esteem192e/Makefile
index 871865b6ee..55d80b6874 100644
--- a/board/esteem192e/Makefile
+++ b/board/esteem192e/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = esteem192e.o flash.o
diff --git a/board/etin/debris/Makefile b/board/etin/debris/Makefile
index d7da042c05..2e74823ea6 100644
--- a/board/etin/debris/Makefile
+++ b/board/etin/debris/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o phantom.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = debris.o flash.o phantom.o
diff --git a/board/etin/kvme080/Makefile b/board/etin/kvme080/Makefile
index c0271d0d60..d1b6f30440 100644
--- a/board/etin/kvme080/Makefile
+++ b/board/etin/kvme080/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o multiverse.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = kvme080.o multiverse.o
diff --git a/board/evb64260/Makefile b/board/evb64260/Makefile
index 512f6d714b..ae2ebedb8e 100644
--- a/board/evb64260/Makefile
+++ b/board/evb64260/Makefile
@@ -8,27 +8,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS = misc.o
-COBJS = $(BOARD).o flash.o serial.o memory.o pci.o \
+obj-y = misc.o
+obj-y += evb64260.o flash.o serial.o memory.o pci.o \
eth.o eth_addrtbl.o mpsc.o i2c.o \
sdram_init.o zuma_pbb.o intel_flash.o zuma_pbb_mbox.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
-
-#########################################################################
diff --git a/board/exmeritus/hww1u1a/Makefile b/board/exmeritus/hww1u1a/Makefile
index e441c14f9a..d0cd87828e 100644
--- a/board/exmeritus/hww1u1a/Makefile
+++ b/board/exmeritus/hww1u1a/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-COBJS-$(CONFIG_DDR_SPD) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += hww1u1a.o
+obj-y += law.o
+obj-y += tlb.o
+obj-$(CONFIG_DDR_SPD) += ddr.o
diff --git a/board/fads/Makefile b/board/fads/Makefile
index 4c70032306..ea8b5c0d81 100644
--- a/board/fads/Makefile
+++ b/board/fads/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o lamp.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = fads.o flash.o lamp.o pcmcia.o
diff --git a/board/flagadm/Makefile b/board/flagadm/Makefile
index e9558412e1..f2377c8392 100644
--- a/board/flagadm/Makefile
+++ b/board/flagadm/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = flagadm.o flash.o
diff --git a/board/freescale/b4860qds/Makefile b/board/freescale/b4860qds/Makefile
index a864c0b72d..e5cc054a01 100644
--- a/board/freescale/b4860qds/Makefile
+++ b/board/freescale/b4860qds/Makefile
@@ -4,35 +4,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-$(CONFIG_B4860QDS)+= eth_b4860qds.o
-COBJS-$(CONFIG_PCI) += pci.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS) $(SOBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += b4860qds.o
+obj-y += ddr.o
+obj-$(CONFIG_B4860QDS)+= eth_b4860qds.o
+obj-$(CONFIG_PCI) += pci.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/bsc9131rdb/Makefile b/board/freescale/bsc9131rdb/Makefile
index e1a7d8b092..b26d3a1e63 100644
--- a/board/freescale/bsc9131rdb/Makefile
+++ b/board/freescale/bsc9131rdb/Makefile
@@ -4,10 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -18,36 +14,14 @@ endif
ifdef MINIMAL
-COBJS-y += spl_minimal.o tlb.o law.o
+obj-y += spl_minimal.o tlb.o law.o
else
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-#COBJS-y += bsc9131rdb_mux.o
+obj-y += bsc9131rdb.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
+#obj-y += bsc9131rdb_mux.o
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS) $(SOBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/bsc9132qds/Makefile b/board/freescale/bsc9132qds/Makefile
index 330d35333e..2e4170f512 100644
--- a/board/freescale/bsc9132qds/Makefile
+++ b/board/freescale/bsc9132qds/Makefile
@@ -4,10 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -18,36 +14,13 @@ endif
ifdef MINIMAL
-COBJS-y += spl_minimal.o tlb.o law.o
+obj-y += spl_minimal.o tlb.o law.o
else
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
+obj-y += bsc9132qds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS) $(SOBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/c29xpcie/Makefile b/board/freescale/c29xpcie/Makefile
index ab8eb8f729..626d48aea7 100644
--- a/board/freescale/c29xpcie/Makefile
+++ b/board/freescale/c29xpcie/Makefile
@@ -3,28 +3,8 @@
#
# SPDX-License-Identifier: GPL-2.0+
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += cpld.o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += c29xpcie.o
+obj-y += cpld.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index f9550c48ce..25f063d3ad 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -5,14 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/freescale/common)
-endif
-
-LIB = $(obj)libfreescale.o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -22,62 +14,42 @@ endif
endif
ifndef MINIMAL
-COBJS-$(CONFIG_FSL_CADMUS) += cadmus.o
-COBJS-$(CONFIG_FSL_VIA) += cds_via.o
-COBJS-$(CONFIG_FMAN_ENET) += fman.o
-COBJS-$(CONFIG_FSL_PIXIS) += pixis.o
+obj-$(CONFIG_FSL_CADMUS) += cadmus.o
+obj-$(CONFIG_FSL_VIA) += cds_via.o
+obj-$(CONFIG_FMAN_ENET) += fman.o
+obj-$(CONFIG_FSL_PIXIS) += pixis.o
ifndef CONFIG_SPL_BUILD
-COBJS-$(CONFIG_FSL_NGPIXIS) += ngpixis.o
+obj-$(CONFIG_FSL_NGPIXIS) += ngpixis.o
endif
-COBJS-$(CONFIG_FSL_QIXIS) += qixis.o
-COBJS-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o
+obj-$(CONFIG_FSL_QIXIS) += qixis.o
+obj-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o
ifndef CONFIG_SPL_BUILD
-COBJS-$(CONFIG_ID_EEPROM) += sys_eeprom.o
+obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o
endif
-COBJS-$(CONFIG_FSL_SGMII_RISER) += sgmii_riser.o
+obj-$(CONFIG_FSL_SGMII_RISER) += sgmii_riser.o
ifndef CONFIG_RAMBOOT_PBL
-COBJS-$(CONFIG_FSL_FIXED_MMC_LOCATION) += sdhc_boot.o
+obj-$(CONFIG_FSL_FIXED_MMC_LOCATION) += sdhc_boot.o
endif
-COBJS-$(CONFIG_MPC8541CDS) += cds_pci_ft.o
-COBJS-$(CONFIG_MPC8548CDS) += cds_pci_ft.o
-COBJS-$(CONFIG_MPC8555CDS) += cds_pci_ft.o
-
-COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o
-COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o
-COBJS-$(CONFIG_P1022DS) += ics307_clk.o
-COBJS-$(CONFIG_P2020DS) += ics307_clk.o
-COBJS-$(CONFIG_P3041DS) += ics307_clk.o
-COBJS-$(CONFIG_P4080DS) += ics307_clk.o
-COBJS-$(CONFIG_P5020DS) += ics307_clk.o
-COBJS-$(CONFIG_P5040DS) += ics307_clk.o
-COBJS-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o
-COBJS-$(CONFIG_IDT8T49N222A) += idt8t49n222a_serdes_clk.o
+obj-$(CONFIG_MPC8541CDS) += cds_pci_ft.o
+obj-$(CONFIG_MPC8548CDS) += cds_pci_ft.o
+obj-$(CONFIG_MPC8555CDS) += cds_pci_ft.o
+
+obj-$(CONFIG_MPC8536DS) += ics307_clk.o
+obj-$(CONFIG_MPC8572DS) += ics307_clk.o
+obj-$(CONFIG_P1022DS) += ics307_clk.o
+obj-$(CONFIG_P2020DS) += ics307_clk.o
+obj-$(CONFIG_P3041DS) += ics307_clk.o
+obj-$(CONFIG_P4080DS) += ics307_clk.o
+obj-$(CONFIG_P5020DS) += ics307_clk.o
+obj-$(CONFIG_P5040DS) += ics307_clk.o
+obj-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o
+obj-$(CONFIG_IDT8T49N222A) += idt8t49n222a_serdes_clk.o
# deal with common files for P-series corenet based devices
-SUBLIB-$(CONFIG_P2041RDB) += p_corenet/libp_corenet.o
-SUBLIB-$(CONFIG_P3041DS) += p_corenet/libp_corenet.o
-SUBLIB-$(CONFIG_P4080DS) += p_corenet/libp_corenet.o
-SUBLIB-$(CONFIG_P5020DS) += p_corenet/libp_corenet.o
-SUBLIB-$(CONFIG_P5040DS) += p_corenet/libp_corenet.o
+obj-$(CONFIG_P2041RDB) += p_corenet/
+obj-$(CONFIG_P3041DS) += p_corenet/
+obj-$(CONFIG_P4080DS) += p_corenet/
+obj-$(CONFIG_P5020DS) += p_corenet/
+obj-$(CONFIG_P5040DS) += p_corenet/
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-SUBLIB := $(addprefix $(obj),$(SUBLIB-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SUBLIB)
- $(call cmd_link_o_target, $(OBJS) $(SUBLIB))
-
-$(SUBLIB): $(obj).depend
- $(MAKE) -C $(dir $(subst $(obj),,$@))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/common/p_corenet/Makefile b/board/freescale/common/p_corenet/Makefile
index f37b25cf83..889c4938c0 100644
--- a/board/freescale/common/p_corenet/Makefile
+++ b/board/freescale/common/p_corenet/Makefile
@@ -4,12 +4,9 @@
#
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-LIB = libp_corenet.o
+CPPFLAGS += -I$(TOPDIR)
-COBJS-y += law.o
-COBJS-$(CONFIG_PCI) += pci.o
-COBJS-y += tlb.o
-
-include $(TOPDIR)/post/rules.mk
+obj-y += law.o
+obj-$(CONFIG_PCI) += pci.o
+obj-y += tlb.o
diff --git a/board/freescale/corenet_ds/Makefile b/board/freescale/corenet_ds/Makefile
index 36813cbcec..9ade9472ea 100644
--- a/board/freescale/corenet_ds/Makefile
+++ b/board/freescale/corenet_ds/Makefile
@@ -6,33 +6,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-$(CONFIG_P3041DS) += eth_hydra.o
-COBJS-$(CONFIG_P4080DS) += eth_p4080.o
-COBJS-$(CONFIG_P5020DS) += eth_hydra.o
-COBJS-$(CONFIG_P5040DS) += eth_superhydra.o
-COBJS-$(CONFIG_P3041DS) += p3041ds_ddr.o
-COBJS-$(CONFIG_P4080DS) += p4080ds_ddr.o
-COBJS-$(CONFIG_P5020DS) += p5020ds_ddr.o
-COBJS-$(CONFIG_P5040DS) += p5040ds_ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += corenet_ds.o
+obj-y += ddr.o
+obj-$(CONFIG_P3041DS) += eth_hydra.o
+obj-$(CONFIG_P4080DS) += eth_p4080.o
+obj-$(CONFIG_P5020DS) += eth_hydra.o
+obj-$(CONFIG_P5040DS) += eth_superhydra.o
+obj-$(CONFIG_P3041DS) += p3041ds_ddr.o
+obj-$(CONFIG_P4080DS) += p4080ds_ddr.o
+obj-$(CONFIG_P5020DS) += p5020ds_ddr.o
+obj-$(CONFIG_P5040DS) += p5040ds_ddr.o
diff --git a/board/freescale/mpc5121ads/Makefile b/board/freescale/mpc5121ads/Makefile
index b5cd5f734c..67cf55546b 100644
--- a/board/freescale/mpc5121ads/Makefile
+++ b/board/freescale/mpc5121ads/Makefile
@@ -5,27 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-$(shell mkdir -p $(OBJTREE)/board/freescale/common)
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc5121ads.o
diff --git a/board/freescale/mpc7448hpc2/Makefile b/board/freescale/mpc7448hpc2/Makefile
index 03917463bc..2cc211bfd0 100644
--- a/board/freescale/mpc7448hpc2/Makefile
+++ b/board/freescale/mpc7448hpc2/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o tsi108_init.o
-SOBJS := asm_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 := mpc7448hpc2.o tsi108_init.o
+obj-y += asm_init.o
diff --git a/board/freescale/mpc8260ads/Makefile b/board/freescale/mpc8260ads/Makefile
index c91b0886f2..9b7e287f8d 100644
--- a/board/freescale/mpc8260ads/Makefile
+++ b/board/freescale/mpc8260ads/Makefile
@@ -6,24 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8260ads.o flash.o
diff --git a/board/freescale/mpc8266ads/Makefile b/board/freescale/mpc8266ads/Makefile
index d1d2ecb11b..ee63dc0376 100644
--- a/board/freescale/mpc8266ads/Makefile
+++ b/board/freescale/mpc8266ads/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8266ads.o flash.o
diff --git a/board/freescale/mpc8308rdb/Makefile b/board/freescale/mpc8308rdb/Makefile
index 31127f082b..ec2b85d9cd 100644
--- a/board/freescale/mpc8308rdb/Makefile
+++ b/board/freescale/mpc8308rdb/Makefile
@@ -7,24 +7,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8308rdb.o sdram.o
diff --git a/board/freescale/mpc8313erdb/Makefile b/board/freescale/mpc8313erdb/Makefile
index b9fa864bb5..77fad7574a 100644
--- a/board/freescale/mpc8313erdb/Makefile
+++ b/board/freescale/mpc8313erdb/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8313erdb.o sdram.o
diff --git a/board/freescale/mpc8315erdb/Makefile b/board/freescale/mpc8315erdb/Makefile
index b9fa864bb5..fbb68c579d 100644
--- a/board/freescale/mpc8315erdb/Makefile
+++ b/board/freescale/mpc8315erdb/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8315erdb.o sdram.o
diff --git a/board/freescale/mpc8323erdb/Makefile b/board/freescale/mpc8323erdb/Makefile
index ff0dbf869d..f2e7497210 100644
--- a/board/freescale/mpc8323erdb/Makefile
+++ b/board/freescale/mpc8323erdb/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8323erdb.o
diff --git a/board/freescale/mpc832xemds/Makefile b/board/freescale/mpc832xemds/Makefile
index 0c6e556a6d..66763519af 100644
--- a/board/freescale/mpc832xemds/Makefile
+++ b/board/freescale/mpc832xemds/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc832xemds.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/freescale/mpc8349emds/Makefile b/board/freescale/mpc8349emds/Makefile
index 9549badce4..23880f52f5 100644
--- a/board/freescale/mpc8349emds/Makefile
+++ b/board/freescale/mpc8349emds/Makefile
@@ -5,27 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8349emds.o
+obj-$(CONFIG_PCI) += pci.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
diff --git a/board/freescale/mpc8349itx/Makefile b/board/freescale/mpc8349itx/Makefile
index 9e3c891e17..e9092adba2 100644
--- a/board/freescale/mpc8349itx/Makefile
+++ b/board/freescale/mpc8349itx/Makefile
@@ -4,25 +4,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8349itx.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/freescale/mpc8360emds/Makefile b/board/freescale/mpc8360emds/Makefile
index 0c6e556a6d..e8332cea3f 100644
--- a/board/freescale/mpc8360emds/Makefile
+++ b/board/freescale/mpc8360emds/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8360emds.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/freescale/mpc8360erdk/Makefile b/board/freescale/mpc8360erdk/Makefile
index 8895cd010a..e2235c28fe 100644
--- a/board/freescale/mpc8360erdk/Makefile
+++ b/board/freescale/mpc8360erdk/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_CMD_NAND) += nand.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8360erdk.o
+obj-$(CONFIG_CMD_NAND) += nand.o
diff --git a/board/freescale/mpc837xemds/Makefile b/board/freescale/mpc837xemds/Makefile
index 0c6e556a6d..70b2147c3d 100644
--- a/board/freescale/mpc837xemds/Makefile
+++ b/board/freescale/mpc837xemds/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc837xemds.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/freescale/mpc837xerdb/Makefile b/board/freescale/mpc837xerdb/Makefile
index 0c6e556a6d..c2d0bc4302 100644
--- a/board/freescale/mpc837xerdb/Makefile
+++ b/board/freescale/mpc837xerdb/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc837xerdb.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/freescale/mpc8536ds/Makefile b/board/freescale/mpc8536ds/Makefile
index bbb492d9ee..e36492f501 100644
--- a/board/freescale/mpc8536ds/Makefile
+++ b/board/freescale/mpc8536ds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8536ds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8540ads/Makefile b/board/freescale/mpc8540ads/Makefile
index 08dd14b64d..6f82c7f7ac 100644
--- a/board/freescale/mpc8540ads/Makefile
+++ b/board/freescale/mpc8540ads/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8540ads.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8541cds/Makefile b/board/freescale/mpc8541cds/Makefile
index 4f524b7b62..78af4b85fb 100644
--- a/board/freescale/mpc8541cds/Makefile
+++ b/board/freescale/mpc8541cds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8541cds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8544ds/Makefile b/board/freescale/mpc8544ds/Makefile
index 009cceb5af..3359eea44f 100644
--- a/board/freescale/mpc8544ds/Makefile
+++ b/board/freescale/mpc8544ds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8544ds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8548cds/Makefile b/board/freescale/mpc8548cds/Makefile
index 4f524b7b62..f797df2273 100644
--- a/board/freescale/mpc8548cds/Makefile
+++ b/board/freescale/mpc8548cds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8548cds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8555cds/Makefile b/board/freescale/mpc8555cds/Makefile
index 4f524b7b62..d32d005e88 100644
--- a/board/freescale/mpc8555cds/Makefile
+++ b/board/freescale/mpc8555cds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8555cds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8560ads/Makefile b/board/freescale/mpc8560ads/Makefile
index 46e412b923..685168e08d 100644
--- a/board/freescale/mpc8560ads/Makefile
+++ b/board/freescale/mpc8560ads/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8560ads.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8568mds/Makefile b/board/freescale/mpc8568mds/Makefile
index 4cd711f106..612fb51548 100644
--- a/board/freescale/mpc8568mds/Makefile
+++ b/board/freescale/mpc8568mds/Makefile
@@ -6,28 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += bcsr.o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8568mds.o
+obj-y += bcsr.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8569mds/Makefile b/board/freescale/mpc8569mds/Makefile
index ec318f0b1f..5f6e021759 100644
--- a/board/freescale/mpc8569mds/Makefile
+++ b/board/freescale/mpc8569mds/Makefile
@@ -6,28 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += bcsr.o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8569mds.o
+obj-y += bcsr.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8572ds/Makefile b/board/freescale/mpc8572ds/Makefile
index 009cceb5af..902c900162 100644
--- a/board/freescale/mpc8572ds/Makefile
+++ b/board/freescale/mpc8572ds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8572ds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/mpc8610hpcd/Makefile b/board/freescale/mpc8610hpcd/Makefile
index 2009914588..933ea179ba 100644
--- a/board/freescale/mpc8610hpcd/Makefile
+++ b/board/freescale/mpc8610hpcd/Makefile
@@ -3,28 +3,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-COBJS-y += law.o
-
-COBJS-$(CONFIG_FSL_DIU_FB) += mpc8610hpcd_diu.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mpc8610hpcd.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
+obj-y += law.o
+obj-$(CONFIG_FSL_DIU_FB) += mpc8610hpcd_diu.o
diff --git a/board/freescale/mpc8641hpcn/Makefile b/board/freescale/mpc8641hpcn/Makefile
index 0cbc0d0a90..8d53af8227 100644
--- a/board/freescale/mpc8641hpcn/Makefile
+++ b/board/freescale/mpc8641hpcn/Makefile
@@ -5,26 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude ($obj).depend
-
-#########################################################################
+obj-y += mpc8641hpcn.o
+obj-y += law.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
diff --git a/board/freescale/p1010rdb/Makefile b/board/freescale/p1010rdb/Makefile
index bdd7d68edc..d6f05f3cfe 100644
--- a/board/freescale/p1010rdb/Makefile
+++ b/board/freescale/p1010rdb/Makefile
@@ -4,10 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -18,29 +14,13 @@ endif
ifdef MINIMAL
-COBJS-y += spl_minimal.o tlb.o law.o
+obj-y += spl_minimal.o tlb.o law.o
else
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
+obj-y += p1010rdb.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/p1022ds/Makefile b/board/freescale/p1022ds/Makefile
index 3bc4f4325f..a5821277ef 100644
--- a/board/freescale/p1022ds/Makefile
+++ b/board/freescale/p1022ds/Makefile
@@ -4,10 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -18,32 +14,16 @@ endif
ifdef MINIMAL
-COBJS-y += spl_minimal.o tlb.o law.o
+obj-y += spl_minimal.o tlb.o law.o
else
ifdef CONFIG_SPL_BUILD
-COBJS-y += spl.o
+obj-y += spl.o
endif
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
+obj-y += p1022ds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
-COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
+obj-$(CONFIG_FSL_DIU_FB) += diu.o
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/p1023rdb/Makefile b/board/freescale/p1023rdb/Makefile
index edd2e6daa0..e4f1edf17d 100644
--- a/board/freescale/p1023rdb/Makefile
+++ b/board/freescale/p1023rdb/Makefile
@@ -4,27 +4,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p1023rdb.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/p1023rds/Makefile b/board/freescale/p1023rds/Makefile
index f987dc5650..fdbf365ea5 100644
--- a/board/freescale/p1023rds/Makefile
+++ b/board/freescale/p1023rds/Makefile
@@ -4,26 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p1023rds.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/p1_p2_rdb/Makefile b/board/freescale/p1_p2_rdb/Makefile
index 36df225cf2..f7b568a021 100644
--- a/board/freescale/p1_p2_rdb/Makefile
+++ b/board/freescale/p1_p2_rdb/Makefile
@@ -4,28 +4,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-$(CONFIG_PCI) += pci.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p1_p2_rdb.o
+obj-y += ddr.o
+obj-y += law.o
+obj-$(CONFIG_PCI) += pci.o
+obj-y += tlb.o
diff --git a/board/freescale/p1_p2_rdb_pc/Makefile b/board/freescale/p1_p2_rdb_pc/Makefile
index 202b4a5ba0..8e200736d7 100644
--- a/board/freescale/p1_p2_rdb_pc/Makefile
+++ b/board/freescale/p1_p2_rdb_pc/Makefile
@@ -4,10 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
MINIMAL=
ifdef CONFIG_SPL_BUILD
@@ -18,32 +14,16 @@ endif
ifdef MINIMAL
-COBJS-y += spl_minimal.o tlb.o law.o
+obj-y += spl_minimal.o tlb.o law.o
else
ifdef CONFIG_SPL_BUILD
COBJS-y += spl.o
endif
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
+obj-y += p1_p2_rdb_pc.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
endif
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/freescale/p1_twr/Makefile b/board/freescale/p1_twr/Makefile
index 915b9bc895..70afac4088 100644
--- a/board/freescale/p1_twr/Makefile
+++ b/board/freescale/p1_twr/Makefile
@@ -3,33 +3,7 @@
#
# SPDX-License-Identifier: GPL-2.0+
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS) $(SOBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p1_twr.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/p2020come/Makefile b/board/freescale/p2020come/Makefile
index 2e6b6f6c95..4857136f1f 100644
--- a/board/freescale/p2020come/Makefile
+++ b/board/freescale/p2020come/Makefile
@@ -4,27 +4,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p2020come.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/p2020ds/Makefile b/board/freescale/p2020ds/Makefile
index 0967b28420..ee00806d73 100644
--- a/board/freescale/p2020ds/Makefile
+++ b/board/freescale/p2020ds/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p2020ds.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/freescale/p2041rdb/Makefile b/board/freescale/p2041rdb/Makefile
index 147f658b26..c74f4c62f8 100644
--- a/board/freescale/p2041rdb/Makefile
+++ b/board/freescale/p2041rdb/Makefile
@@ -6,27 +6,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += cpld.o
-COBJS-y += ddr.o
-COBJS-y += eth.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += p2041rdb.o
+obj-y += cpld.o
+obj-y += ddr.o
+obj-y += eth.o
diff --git a/board/freescale/t4qds/Makefile b/board/freescale/t4qds/Makefile
index a2167b377b..2b1f7aa301 100644
--- a/board/freescale/t4qds/Makefile
+++ b/board/freescale/t4qds/Makefile
@@ -4,36 +4,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-$(CONFIG_T4240QDS) += t4240qds.o
-COBJS-$(CONFIG_T4240EMU) += t4240emu.o
-COBJS-y += ddr.o
-COBJS-$(CONFIG_T4240QDS)+= eth.o
-COBJS-$(CONFIG_PCI) += pci.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS) $(SOBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_T4240QDS) += t4240qds.o
+obj-$(CONFIG_T4240EMU) += t4240emu.o
+obj-y += ddr.o
+obj-$(CONFIG_T4240QDS)+= eth.o
+obj-$(CONFIG_PCI) += pci.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/funkwerk/vovpn-gw/Makefile b/board/funkwerk/vovpn-gw/Makefile
index 677a021170..325324782d 100644
--- a/board/funkwerk/vovpn-gw/Makefile
+++ b/board/funkwerk/vovpn-gw/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o m88e6060.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := vovpn-gw.o flash.o m88e6060.o
diff --git a/board/g2000/Makefile b/board/g2000/Makefile
index 0d202ac071..74c8053acc 100644
--- a/board/g2000/Makefile
+++ b/board/g2000/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o strataflash.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = g2000.o strataflash.o
diff --git a/board/galaxy5200/Makefile b/board/galaxy5200/Makefile
index 4a7d872afa..e0fcd39515 100644
--- a/board/galaxy5200/Makefile
+++ b/board/galaxy5200/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := galaxy5200.o
diff --git a/board/gdsys/405ep/Makefile b/board/gdsys/405ep/Makefile
index 81d23c58b6..857ec04fa8 100644
--- a/board/gdsys/405ep/Makefile
+++ b/board/gdsys/405ep/Makefile
@@ -5,30 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-$(CONFIG_NEO) += neo.o
-COBJS-$(CONFIG_IO) += io.o
-COBJS-$(CONFIG_IOCON) += iocon.o
-COBJS-$(CONFIG_DLVISION_10G) += dlvision-10g.o
-
-COBJS := $(BOARD).o $(COBJS-y)
-SOBJS =
-
-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 := 405ep.o
+obj-$(CONFIG_NEO) += neo.o
+obj-$(CONFIG_IO) += io.o
+obj-$(CONFIG_IOCON) += iocon.o
+obj-$(CONFIG_DLVISION_10G) += dlvision-10g.o
diff --git a/board/gdsys/405ex/Makefile b/board/gdsys/405ex/Makefile
index 9846823e28..a668460119 100644
--- a/board/gdsys/405ex/Makefile
+++ b/board/gdsys/405ex/Makefile
@@ -5,33 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-$(CONFIG_IO64) += io64.o
-
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-
-COBJS := $(BOARD).o $(COBJS-y)
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-clean:
- rm -f $(OBJS)
-
-distclean: clean
- rm -f $(LIB) core *.bak $(obj).depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := 405ex.o
+obj-$(CONFIG_IO64) += io64.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
diff --git a/board/gdsys/common/Makefile b/board/gdsys/common/Makefile
index 216ad964af..fb841e0b8f 100644
--- a/board/gdsys/common/Makefile
+++ b/board/gdsys/common/Makefile
@@ -5,37 +5,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
-endif
-
-LIB = $(obj)lib$(VENDOR).o
-
-COBJS-$(CONFIG_SYS_FPGA_COMMON) += fpga.o
-
-COBJS-$(CONFIG_IO) += miiphybb.o
-COBJS-$(CONFIG_IO64) += miiphybb.o
-COBJS-$(CONFIG_IOCON) += osd.o mclink.o
-COBJS-$(CONFIG_DLVISION_10G) += osd.o
-COBJS-$(CONFIG_CONTROLCENTERD) += dp501.o
-
-COBJS := $(COBJS-y)
-SOBJS =
-
-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-$(CONFIG_SYS_FPGA_COMMON) += fpga.o
+obj-$(CONFIG_IO) += miiphybb.o
+obj-$(CONFIG_IO64) += miiphybb.o
+obj-$(CONFIG_IOCON) += osd.o mclink.o
+obj-$(CONFIG_DLVISION_10G) += osd.o
+obj-$(CONFIG_CONTROLCENTERD) += dp501.o
diff --git a/board/gdsys/dlvision/Makefile b/board/gdsys/dlvision/Makefile
index 126365ba66..755eb4cef9 100644
--- a/board/gdsys/dlvision/Makefile
+++ b/board/gdsys/dlvision/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS =
-
-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 = dlvision.o
diff --git a/board/gdsys/gdppc440etx/Makefile b/board/gdsys/gdppc440etx/Makefile
index 1d80df8b74..7e3fc384d4 100644
--- a/board/gdsys/gdppc440etx/Makefile
+++ b/board/gdsys/gdppc440etx/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = gdppc440etx.o
+extra-y += init.o
diff --git a/board/gdsys/intip/Makefile b/board/gdsys/intip/Makefile
index 415ec3298f..2fbc983e3e 100644
--- a/board/gdsys/intip/Makefile
+++ b/board/gdsys/intip/Makefile
@@ -5,29 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS := init.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := intip.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/gdsys/p1022/Makefile b/board/gdsys/p1022/Makefile
index 17f602f7ef..6e02447987 100644
--- a/board/gdsys/p1022/Makefile
+++ b/board/gdsys/p1022/Makefile
@@ -7,31 +7,9 @@
# any later version.
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-# COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += ddr.o
-COBJS-y += tlb.o
-COBJS-y += sdhc_boot.o
-COBJS-$(CONFIG_CONTROLCENTERD) += controlcenterd.o controlcenterd-id.o
-
-COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += law.o
+obj-y += ddr.o
+obj-y += tlb.o
+obj-y += sdhc_boot.o
+obj-$(CONFIG_CONTROLCENTERD) += controlcenterd.o controlcenterd-id.o
+obj-$(CONFIG_FSL_DIU_FB) += diu.o
diff --git a/board/gen860t/Makefile b/board/gen860t/Makefile
index 03551852e9..86ae5e80e1 100644
--- a/board/gen860t/Makefile
+++ b/board/gen860t/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o beeper.o fpga.o ioport.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = gen860t.o flash.o beeper.o fpga.o ioport.o
diff --git a/board/genietv/Makefile b/board/genietv/Makefile
index 871865b6ee..fd11f14b3a 100644
--- a/board/genietv/Makefile
+++ b/board/genietv/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = genietv.o flash.o
diff --git a/board/gw8260/Makefile b/board/gw8260/Makefile
index ff9bd0f646..2e23f398af 100644
--- a/board/gw8260/Makefile
+++ b/board/gw8260/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := gw8260.o flash.o
-SOBJS :=
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := gw8260.o flash.o
diff --git a/board/hermes/Makefile b/board/hermes/Makefile
index 871865b6ee..ccca520e42 100644
--- a/board/hermes/Makefile
+++ b/board/hermes/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = hermes.o flash.o
diff --git a/board/hidden_dragon/Makefile b/board/hidden_dragon/Makefile
index 9d46b9b0da..eb1c5fdf86 100644
--- a/board/hidden_dragon/Makefile
+++ b/board/hidden_dragon/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = hidden_dragon.o flash.o
diff --git a/board/hymod/Makefile b/board/hymod/Makefile
index 6e9f436acb..b9080b0a96 100644
--- a/board/hymod/Makefile
+++ b/board/hymod/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o bsp.o eeprom.o fetch.o input.o env.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = hymod.o flash.o bsp.o eeprom.o fetch.o input.o env.o
diff --git a/board/icecube/Makefile b/board/icecube/Makefile
index 4ff6b2d995..373f753e36 100644
--- a/board/icecube/Makefile
+++ b/board/icecube/Makefile
@@ -6,24 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := icecube.o flash.o
diff --git a/board/icu862/Makefile b/board/icu862/Makefile
index e1ac275ccd..263f21b96e 100644
--- a/board/icu862/Makefile
+++ b/board/icu862/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = icu862.o flash.o pcmcia.o
diff --git a/board/ids8247/Makefile b/board/ids8247/Makefile
index b2009e6eb1..99c47b6697 100644
--- a/board/ids8247/Makefile
+++ b/board/ids8247/Makefile
@@ -8,24 +8,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ids8247.o
diff --git a/board/ifm/ac14xx/Makefile b/board/ifm/ac14xx/Makefile
index f78fe13d35..55def60417 100644
--- a/board/ifm/ac14xx/Makefile
+++ b/board/ifm/ac14xx/Makefile
@@ -4,25 +4,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ac14xx.o
diff --git a/board/ifm/o2dnt2/Makefile b/board/ifm/o2dnt2/Makefile
index 1dd3fe9555..64d6ba8c55 100644
--- a/board/ifm/o2dnt2/Makefile
+++ b/board/ifm/o2dnt2/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := o2dnt2.o
diff --git a/board/inka4x0/Makefile b/board/inka4x0/Makefile
index 14ddfa5ebf..c9a3540799 100644
--- a/board/inka4x0/Makefile
+++ b/board/inka4x0/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o inkadiag.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := inka4x0.o inkadiag.o
diff --git a/board/intercontrol/digsy_mtc/Makefile b/board/intercontrol/digsy_mtc/Makefile
index 877be48d61..be216d5a5c 100644
--- a/board/intercontrol/digsy_mtc/Makefile
+++ b/board/intercontrol/digsy_mtc/Makefile
@@ -3,25 +3,5 @@
# Author: Grzegorz Bernacki, Semihalf, gjb@semihalf.com
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o cmd_mtc.o
-COBJS-$(CONFIG_VIDEO) += cmd_disp.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := digsy_mtc.o cmd_mtc.o
+obj-$(CONFIG_VIDEO) += cmd_disp.o
diff --git a/board/ip860/Makefile b/board/ip860/Makefile
index 871865b6ee..3c60006216 100644
--- a/board/ip860/Makefile
+++ b/board/ip860/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ip860.o flash.o
diff --git a/board/ipek01/Makefile b/board/ipek01/Makefile
index 3acd06bba7..a786ab2118 100644
--- a/board/ipek01/Makefile
+++ b/board/ipek01/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ipek01.o
diff --git a/board/iphase4539/Makefile b/board/iphase4539/Makefile
index 52c03198a7..9197b84a80 100644
--- a/board/iphase4539/Makefile
+++ b/board/iphase4539/Makefile
@@ -7,24 +7,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := iphase4539.o flash.o
diff --git a/board/ispan/Makefile b/board/ispan/Makefile
index 07fa3f3a2f..39931fdfd6 100644
--- a/board/ispan/Makefile
+++ b/board/ispan/Makefile
@@ -8,24 +8,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ispan.o
diff --git a/board/ivm/Makefile b/board/ivm/Makefile
index 871865b6ee..e53a276d4d 100644
--- a/board/ivm/Makefile
+++ b/board/ivm/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = ivm.o flash.o
diff --git a/board/jse/Makefile b/board/jse/Makefile
index c891040dc9..feac3a8834 100644
--- a/board/jse/Makefile
+++ b/board/jse/Makefile
@@ -8,25 +8,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o sdram.o flash.o host_bridge.o
-SOBJS = 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 = jse.o sdram.o flash.o host_bridge.o
+obj-y += init.o
diff --git a/board/jupiter/Makefile b/board/jupiter/Makefile
index ea0b9b4d3a..49dff994ef 100644
--- a/board/jupiter/Makefile
+++ b/board/jupiter/Makefile
@@ -6,24 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := jupiter.o
diff --git a/board/keymile/km82xx/Makefile b/board/keymile/km82xx/Makefile
index bc428dff8a..b44582fbea 100644
--- a/board/keymile/km82xx/Makefile
+++ b/board/keymile/km82xx/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o ../common/common.o ../common/ivm.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := km82xx.o ../common/common.o ../common/ivm.o
diff --git a/board/keymile/km83xx/Makefile b/board/keymile/km83xx/Makefile
index 073a7838d1..7bdddf3bc3 100644
--- a/board/keymile/km83xx/Makefile
+++ b/board/keymile/km83xx/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS += $(BOARD).o ../common/common.o ../common/ivm.o $(BOARD)_i2c.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
diff --git a/board/korat/Makefile b/board/korat/Makefile
index 0e95230bf0..63914bc13b 100644
--- a/board/korat/Makefile
+++ b/board/korat/Makefile
@@ -5,27 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = korat.o
+extra-y += init.o
diff --git a/board/kup/kup4k/Makefile b/board/kup/kup4k/Makefile
index 8ab0664443..b3ad86ce18 100644
--- a/board/kup/kup4k/Makefile
+++ b/board/kup/kup4k/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = kup4k.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
diff --git a/board/kup/kup4x/Makefile b/board/kup/kup4x/Makefile
index 8ab0664443..05a1afc3a9 100644
--- a/board/kup/kup4x/Makefile
+++ b/board/kup/kup4x/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = kup4x.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
diff --git a/board/linkstation/Makefile b/board/linkstation/Makefile
index 98f283e399..3eeba7dcaa 100644
--- a/board/linkstation/Makefile
+++ b/board/linkstation/Makefile
@@ -5,23 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-OBJS = $(BOARD).o ide.o hwctl.o avr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(OBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = linkstation.o ide.o hwctl.o avr.o
diff --git a/board/lwmon/Makefile b/board/lwmon/Makefile
index e1ac275ccd..599a61378e 100644
--- a/board/lwmon/Makefile
+++ b/board/lwmon/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = lwmon.o flash.o pcmcia.o
diff --git a/board/lwmon5/Makefile b/board/lwmon5/Makefile
index 05cb635c9f..02478ca0c8 100644
--- a/board/lwmon5/Makefile
+++ b/board/lwmon5/Makefile
@@ -5,27 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o kbd.o sdram.o
-SOBJS = init.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = lwmon5.o kbd.o sdram.o
+extra-y += init.o
diff --git a/board/manroland/hmi1001/Makefile b/board/manroland/hmi1001/Makefile
index 3acd06bba7..c29a665cc3 100644
--- a/board/manroland/hmi1001/Makefile
+++ b/board/manroland/hmi1001/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := hmi1001.o
diff --git a/board/manroland/mucmc52/Makefile b/board/manroland/mucmc52/Makefile
index 0bec8af8d5..927fc3250a 100644
--- a/board/manroland/mucmc52/Makefile
+++ b/board/manroland/mucmc52/Makefile
@@ -8,24 +8,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mucmc52.o
diff --git a/board/manroland/uc100/Makefile b/board/manroland/uc100/Makefile
index fe15aefa7e..8e69c52de1 100644
--- a/board/manroland/uc100/Makefile
+++ b/board/manroland/uc100/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-#COBJS = $(BOARD).o flash.o pcmcia.o
-COBJS = $(BOARD).o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = uc100.o pcmcia.o
diff --git a/board/manroland/uc101/Makefile b/board/manroland/uc101/Makefile
index 3acd06bba7..9289d915d9 100644
--- a/board/manroland/uc101/Makefile
+++ b/board/manroland/uc101/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := uc101.o
diff --git a/board/matrix_vision/common/Makefile b/board/matrix_vision/common/Makefile
index 8593a8633e..699da1ca27 100644
--- a/board/matrix_vision/common/Makefile
+++ b/board/matrix_vision/common/Makefile
@@ -5,28 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
-endif
-
-LIB = $(obj)lib$(VENDOR).o
-
-COBJS-y = mv_common.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mv_common.o
diff --git a/board/matrix_vision/mergerbox/Makefile b/board/matrix_vision/mergerbox/Makefile
index 4df8ce20f9..11a7fd2c7c 100644
--- a/board/matrix_vision/mergerbox/Makefile
+++ b/board/matrix_vision/mergerbox/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o pci.o fpga.o sm107.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += mergerbox.o pci.o fpga.o sm107.o
diff --git a/board/matrix_vision/mvbc_p/Makefile b/board/matrix_vision/mvbc_p/Makefile
index 61474aaf8b..4c1994156f 100644
--- a/board/matrix_vision/mvbc_p/Makefile
+++ b/board/matrix_vision/mvbc_p/Makefile
@@ -8,21 +8,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o fpga.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
+obj-y := mvbc_p.o fpga.o
diff --git a/board/matrix_vision/mvblm7/Makefile b/board/matrix_vision/mvblm7/Makefile
index b65728092d..879d794655 100644
--- a/board/matrix_vision/mvblm7/Makefile
+++ b/board/matrix_vision/mvblm7/Makefile
@@ -4,24 +4,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
+obj-y := mvblm7.o pci.o fpga.o
-LIB = $(obj)lib$(BOARD).o
+extra-y := bootscript.img
-COBJS := $(BOARD).o pci.o fpga.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
- @mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+$(obj)bootscript.img:
+ @mkimage -T script -C none -n M7_script -d bootscript $@
diff --git a/board/matrix_vision/mvsmr/Makefile b/board/matrix_vision/mvsmr/Makefile
index ef768feb72..b6a4f6754b 100644
--- a/board/matrix_vision/mvsmr/Makefile
+++ b/board/matrix_vision/mvsmr/Makefile
@@ -8,22 +8,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
+obj-y := mvsmr.o fpga.o
-LIB = $(obj)lib$(BOARD).o
+extra-y := bootscript.img
-COBJS := $(BOARD).o fpga.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
- @mkimage -T script -C none -n mvSMR_Script -d bootscript $(obj)bootscript.img
-
-#########################################################################
-
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
+$(obj)bootscript.img: bootscript
+ @mkimage -T script -C none -n mvSMR_Script -d $< $@
diff --git a/board/mbx8xx/Makefile b/board/mbx8xx/Makefile
index 1097314052..2074b6b904 100644
--- a/board/mbx8xx/Makefile
+++ b/board/mbx8xx/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o vpd.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mbx8xx.o flash.o vpd.o pcmcia.o
diff --git a/board/mcc200/Makefile b/board/mcc200/Makefile
index 5019b315f6..db3b39646a 100644
--- a/board/mcc200/Makefile
+++ b/board/mcc200/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o lcd.o auto_update.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mcc200.o lcd.o auto_update.o
diff --git a/board/mosaixtech/icon/Makefile b/board/mosaixtech/icon/Makefile
index 23a8631eb0..d554a8bcb9 100644
--- a/board/mosaixtech/icon/Makefile
+++ b/board/mosaixtech/icon/Makefile
@@ -5,27 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS = init.o
-
-COBJS := $(COBJS-y)
-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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := icon.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/motionpro/Makefile b/board/motionpro/Makefile
index 4a7d872afa..898a384c39 100644
--- a/board/motionpro/Makefile
+++ b/board/motionpro/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := motionpro.o
diff --git a/board/mousse/Makefile b/board/mousse/Makefile
index 9566cc86b2..0a2eb103ab 100644
--- a/board/mousse/Makefile
+++ b/board/mousse/Makefile
@@ -6,23 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o m48t59y.o pci.o flash.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mousse.o m48t59y.o pci.o flash.o
diff --git a/board/mpc8308_p1m/Makefile b/board/mpc8308_p1m/Makefile
index 31127f082b..fb8ca3a007 100644
--- a/board/mpc8308_p1m/Makefile
+++ b/board/mpc8308_p1m/Makefile
@@ -7,24 +7,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := mpc8308_p1m.o sdram.o
diff --git a/board/mpl/mip405/Makefile b/board/mpl/mip405/Makefile
index 4eb997f164..509eb591b3 100644
--- a/board/mpl/mip405/Makefile
+++ b/board/mpl/mip405/Makefile
@@ -5,32 +5,12 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_mip405.o \
+obj-y = mip405.o cmd_mip405.o \
../common/pci.o \
../common/usb_uhci.o \
../common/common_util.o
-
-SOBJS = 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 += init.o
diff --git a/board/mpl/pati/Makefile b/board/mpl/pati/Makefile
index bddf012a00..67381c108a 100644
--- a/board/mpl/pati/Makefile
+++ b/board/mpl/pati/Makefile
@@ -5,28 +5,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o cmd_pati.o \
+obj-y := pati.o cmd_pati.o \
../common/common_util.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/mpl/pip405/Makefile b/board/mpl/pip405/Makefile
index 0d40d3ab5f..3d73cc3f8d 100644
--- a/board/mpl/pip405/Makefile
+++ b/board/mpl/pip405/Makefile
@@ -5,34 +5,14 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_pip405.o \
+obj-y = pip405.o cmd_pip405.o \
../common/pci.o \
../common/isa.o \
../common/kbd.o \
../common/usb_uhci.o \
../common/common_util.o
-
-SOBJS = 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 += init.o
diff --git a/board/muas3001/Makefile b/board/muas3001/Makefile
index b4b784a742..ef04960931 100644
--- a/board/muas3001/Makefile
+++ b/board/muas3001/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := muas3001.o
diff --git a/board/munices/Makefile b/board/munices/Makefile
index 97fc2b6ce4..d16e2a1fa2 100644
--- a/board/munices/Makefile
+++ b/board/munices/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := munices.o
diff --git a/board/musenki/Makefile b/board/musenki/Makefile
index e9558412e1..d2b79ffd22 100644
--- a/board/musenki/Makefile
+++ b/board/musenki/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = musenki.o flash.o
diff --git a/board/mvblue/Makefile b/board/mvblue/Makefile
index e9558412e1..76c10f8fd8 100644
--- a/board/mvblue/Makefile
+++ b/board/mvblue/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = mvblue.o flash.o
diff --git a/board/netphone/Makefile b/board/netphone/Makefile
index 4d86589d8e..ba3460577f 100644
--- a/board/netphone/Makefile
+++ b/board/netphone/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o phone_console.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = netphone.o flash.o phone_console.o
diff --git a/board/netta/Makefile b/board/netta/Makefile
index 3b5408868e..98bac7ed46 100644
--- a/board/netta/Makefile
+++ b/board/netta/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o dsp.o codec.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = netta.o flash.o dsp.o codec.o pcmcia.o
diff --git a/board/netta2/Makefile b/board/netta2/Makefile
index 871865b6ee..c3bfb0d305 100644
--- a/board/netta2/Makefile
+++ b/board/netta2/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = netta2.o flash.o
diff --git a/board/netvia/Makefile b/board/netvia/Makefile
index 871865b6ee..b667bc9b82 100644
--- a/board/netvia/Makefile
+++ b/board/netvia/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = netvia.o flash.o
diff --git a/board/nx823/Makefile b/board/nx823/Makefile
index e9558412e1..a22be5c3e6 100644
--- a/board/nx823/Makefile
+++ b/board/nx823/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = nx823.o flash.o
diff --git a/board/pcs440ep/Makefile b/board/pcs440ep/Makefile
index 851859d045..4fc24d6c5d 100644
--- a/board/pcs440ep/Makefile
+++ b/board/pcs440ep/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 = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pcs440ep.o flash.o
+extra-y += init.o
diff --git a/board/pdm360ng/Makefile b/board/pdm360ng/Makefile
index 76f5be45f5..99201a41f6 100644
--- a/board/pdm360ng/Makefile
+++ b/board/pdm360ng/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := pdm360ng.o
diff --git a/board/phytec/pcm030/Makefile b/board/phytec/pcm030/Makefile
index 4a7d872afa..2bb49dc7aa 100644
--- a/board/phytec/pcm030/Makefile
+++ b/board/phytec/pcm030/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := pcm030.o
diff --git a/board/pm520/Makefile b/board/pm520/Makefile
index 4ff6b2d995..3bcba23ae3 100644
--- a/board/pm520/Makefile
+++ b/board/pm520/Makefile
@@ -6,24 +6,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := pm520.o flash.o
diff --git a/board/pm826/Makefile b/board/pm826/Makefile
index e9558412e1..c515f8105d 100644
--- a/board/pm826/Makefile
+++ b/board/pm826/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pm826.o flash.o
diff --git a/board/pm828/Makefile b/board/pm828/Makefile
index e9558412e1..0afffb7bc6 100644
--- a/board/pm828/Makefile
+++ b/board/pm828/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pm828.o flash.o
diff --git a/board/pn62/Makefile b/board/pn62/Makefile
index 5fa6fc8ca6..7572ed8610 100644
--- a/board/pn62/Makefile
+++ b/board/pn62/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o cmd_pn62.o misc.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = pn62.o cmd_pn62.o misc.o
diff --git a/board/ppmc7xx/Makefile b/board/ppmc7xx/Makefile
index c6abc77cee..f8957f352b 100644
--- a/board/ppmc7xx/Makefile
+++ b/board/ppmc7xx/Makefile
@@ -5,26 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS := init.o
-
-COBJS := ppmc7xx.o pci.o flash.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 := init.o
+obj-y += ppmc7xx.o pci.o flash.o
diff --git a/board/ppmc8260/Makefile b/board/ppmc8260/Makefile
index d0e543cf29..3072fb4676 100644
--- a/board/ppmc8260/Makefile
+++ b/board/ppmc8260/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := ppmc8260.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ppmc8260.o
diff --git a/board/prodrive/alpr/Makefile b/board/prodrive/alpr/Makefile
index 5345df8c9f..812d041ef2 100644
--- a/board/prodrive/alpr/Makefile
+++ b/board/prodrive/alpr/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o fpga.o nand.o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = alpr.o fpga.o nand.o
+extra-y += init.o
diff --git a/board/prodrive/p3mx/Makefile b/board/prodrive/p3mx/Makefile
index 63ee945d2a..43caffbc22 100644
--- a/board/prodrive/p3mx/Makefile
+++ b/board/prodrive/p3mx/Makefile
@@ -5,29 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../../Marvell/common)
endif
-LIB = $(obj)lib$(BOARD).o
-
-SOBJS = misc.o
-COBJS = $(BOARD).o mpsc.o mv_eth.o pci.o sdram_init.o serial.o \
+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
-
-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
-
-#########################################################################
diff --git a/board/prodrive/p3p440/Makefile b/board/prodrive/p3p440/Makefile
index 1d80df8b74..d62f75d3e7 100644
--- a/board/prodrive/p3p440/Makefile
+++ b/board/prodrive/p3p440/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = p3p440.o
+extra-y += init.o
diff --git a/board/quad100hd/Makefile b/board/quad100hd/Makefile
index 9b936d06a8..b65e5ad471 100644
--- a/board/quad100hd/Makefile
+++ b/board/quad100hd/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o nand.o
-SOBJS =
-
-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 = quad100hd.o nand.o
diff --git a/board/quantum/Makefile b/board/quantum/Makefile
index b7497a0d7c..6918f63c3e 100644
--- a/board/quantum/Makefile
+++ b/board/quantum/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o fpga.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = quantum.o fpga.o
diff --git a/board/r360mpi/Makefile b/board/r360mpi/Makefile
index 4720ac8132..f8f7fe75ea 100644
--- a/board/r360mpi/Makefile
+++ b/board/r360mpi/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o pcmcia.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = r360mpi.o flash.o pcmcia.o
diff --git a/board/rattler/Makefile b/board/rattler/Makefile
index c573be952c..9de89c8096 100644
--- a/board/rattler/Makefile
+++ b/board/rattler/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := rattler.o
diff --git a/board/rbc823/Makefile b/board/rbc823/Makefile
index 6e47cb5a26..060a144a92 100644
--- a/board/rbc823/Makefile
+++ b/board/rbc823/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o kbd.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = rbc823.o flash.o kbd.o
diff --git a/board/rpxsuper/Makefile b/board/rpxsuper/Makefile
index 3c08959dc5..239b419ab2 100644
--- a/board/rpxsuper/Makefile
+++ b/board/rpxsuper/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := rpxsuper.o flash.o mii_phy.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := rpxsuper.o flash.o mii_phy.o
diff --git a/board/rsdproto/Makefile b/board/rsdproto/Makefile
index 8799b50b0a..9351e94e74 100644
--- a/board/rsdproto/Makefile
+++ b/board/rsdproto/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := rsdproto.o flash.o
-SOBJS := flash_asm.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 := rsdproto.o flash.o
+obj-y += flash_asm.o
diff --git a/board/sacsng/Makefile b/board/sacsng/Makefile
index 940a0168fd..95e6b8d0c4 100644
--- a/board/sacsng/Makefile
+++ b/board/sacsng/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := sacsng.o flash.o clkinit.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := sacsng.o flash.o clkinit.o
diff --git a/board/sandburst/karef/Makefile b/board/sandburst/karef/Makefile
index af758f947e..05c818791c 100644
--- a/board/sandburst/karef/Makefile
+++ b/board/sandburst/karef/Makefile
@@ -9,37 +9,16 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
# TBS: add for debugging purposes
BUILDUSER := $(shell whoami)
-FORCEBUILD := $(shell rm -f $(LIB) $(BOARD).o)
+FORCEBUILD := $(shell rm -f karef.o)
CFLAGS += -DBUILDUSER='"$(BUILDUSER)"'
# TBS: end debugging
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/sb_common.o
-
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = karef.o ../common/flash.o ../common/sb_common.o
+extra-y += init.o
diff --git a/board/sandburst/metrobox/Makefile b/board/sandburst/metrobox/Makefile
index 163f2b98da..76dfffc9c7 100644
--- a/board/sandburst/metrobox/Makefile
+++ b/board/sandburst/metrobox/Makefile
@@ -8,36 +8,16 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../common)
endif
# TBS: add for debugging purposes
BUILDUSER := $(shell whoami)
-FORCEBUILD := $(shell rm -f $(LIB) $(BOARD).o)
+FORCEBUILD := $(shell rm -f metrobox.o)
CFLAGS += -DBUILDUSER='"$(BUILDUSER)"'
# TBS: end debugging
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../common/flash.o ../common/sb_common.o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = metrobox.o ../common/flash.o ../common/sb_common.o
+extra-y += init.o
diff --git a/board/sandpoint/Makefile b/board/sandpoint/Makefile
index 871865b6ee..58f5a8905b 100644
--- a/board/sandpoint/Makefile
+++ b/board/sandpoint/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = sandpoint.o flash.o
diff --git a/board/sbc405/Makefile b/board/sbc405/Makefile
index 0d202ac071..3f2b0e24ca 100644
--- a/board/sbc405/Makefile
+++ b/board/sbc405/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o strataflash.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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = sbc405.o strataflash.o
diff --git a/board/sbc8349/Makefile b/board/sbc8349/Makefile
index 9a5b84a5a7..3b2c389484 100644
--- a/board/sbc8349/Makefile
+++ b/board/sbc8349/Makefile
@@ -4,26 +4,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += sbc8349.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/sbc8548/Makefile b/board/sbc8548/Makefile
index ecffaa9033..b1e32a668b 100644
--- a/board/sbc8548/Makefile
+++ b/board/sbc8548/Makefile
@@ -8,27 +8,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += sbc8548.o
+obj-y += law.o
+obj-y += tlb.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
diff --git a/board/sbc8641d/Makefile b/board/sbc8641d/Makefile
index 0cbc0d0a90..9626b06a5a 100644
--- a/board/sbc8641d/Makefile
+++ b/board/sbc8641d/Makefile
@@ -5,26 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude ($obj).depend
-
-#########################################################################
+obj-y += sbc8641d.o
+obj-y += law.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
diff --git a/board/sc3/Makefile b/board/sc3/Makefile
index 7369072617..c1d163ee42 100644
--- a/board/sc3/Makefile
+++ b/board/sc3/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o sc3nand.o
-SOBJS = 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 = sc3.o sc3nand.o
+obj-y += init.o
diff --git a/board/sheldon/simpc8313/Makefile b/board/sheldon/simpc8313/Makefile
index b9fa864bb5..a824c41d9c 100644
--- a/board/sheldon/simpc8313/Makefile
+++ b/board/sheldon/simpc8313/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := simpc8313.o sdram.o
diff --git a/board/sixnet/Makefile b/board/sixnet/Makefile
index 871865b6ee..25a8d69536 100644
--- a/board/sixnet/Makefile
+++ b/board/sixnet/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = sixnet.o flash.o
diff --git a/board/snmc/qs850/Makefile b/board/snmc/qs850/Makefile
index 871865b6ee..5867d900b7 100644
--- a/board/snmc/qs850/Makefile
+++ b/board/snmc/qs850/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = qs850.o flash.o
diff --git a/board/snmc/qs860t/Makefile b/board/snmc/qs860t/Makefile
index 871865b6ee..802f67e384 100644
--- a/board/snmc/qs860t/Makefile
+++ b/board/snmc/qs860t/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = qs860t.o flash.o
diff --git a/board/socrates/Makefile b/board/socrates/Makefile
index c2e282b952..0a088100e8 100644
--- a/board/socrates/Makefile
+++ b/board/socrates/Makefile
@@ -7,30 +7,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-#
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-COBJS-y += nand.o
-COBJS-y += sdram.o
-COBJS-$(CONFIG_FSL_DDR2) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += socrates.o
+obj-y += law.o
+obj-y += tlb.o
+obj-y += nand.o
+obj-y += sdram.o
+obj-$(CONFIG_FSL_DDR2) += ddr.o
diff --git a/board/spc1920/Makefile b/board/spc1920/Makefile
index cadacee792..c0c9a32588 100644
--- a/board/spc1920/Makefile
+++ b/board/spc1920/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o hpi.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = spc1920.o hpi.o
diff --git a/board/spd8xx/Makefile b/board/spd8xx/Makefile
index 871865b6ee..c393f066cb 100644
--- a/board/spd8xx/Makefile
+++ b/board/spd8xx/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = spd8xx.o flash.o
diff --git a/board/stx/stxgp3/Makefile b/board/stx/stxgp3/Makefile
index 0b0f26e724..9b724347de 100644
--- a/board/stx/stxgp3/Makefile
+++ b/board/stx/stxgp3/Makefile
@@ -5,28 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-COBJS-y += flash.o
-COBJS-$(CONFIG_FSL_DDR1) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += stxgp3.o
+obj-y += law.o
+obj-y += tlb.o
+obj-y += flash.o
+obj-$(CONFIG_FSL_DDR1) += ddr.o
diff --git a/board/stx/stxssa/Makefile b/board/stx/stxssa/Makefile
index 8757a71a82..17e0aaea7e 100644
--- a/board/stx/stxssa/Makefile
+++ b/board/stx/stxssa/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += law.o
-COBJS-y += tlb.o
-COBJS-$(CONFIG_FSL_DDR1) += ddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += stxssa.o
+obj-y += law.o
+obj-y += tlb.o
+obj-$(CONFIG_FSL_DDR1) += ddr.o
diff --git a/board/stx/stxxtc/Makefile b/board/stx/stxxtc/Makefile
index e7f4fb63b0..6738d4e15d 100644
--- a/board/stx/stxxtc/Makefile
+++ b/board/stx/stxxtc/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = stxxtc.o
diff --git a/board/svm_sc8xx/Makefile b/board/svm_sc8xx/Makefile
index 871865b6ee..4c0b4a33e9 100644
--- a/board/svm_sc8xx/Makefile
+++ b/board/svm_sc8xx/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = svm_sc8xx.o flash.o
diff --git a/board/t3corp/Makefile b/board/t3corp/Makefile
index 093457f591..928d895d50 100644
--- a/board/t3corp/Makefile
+++ b/board/t3corp/Makefile
@@ -5,29 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
-SOBJS := init.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB) $(SOBJS)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := t3corp.o
+obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
+extra-y += init.o
diff --git a/board/total5200/Makefile b/board/total5200/Makefile
index 5c22b70f94..527557ca3c 100644
--- a/board/total5200/Makefile
+++ b/board/total5200/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o sdram.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := total5200.o sdram.o
diff --git a/board/tqc/tqm5200/Makefile b/board/tqc/tqm5200/Makefile
index 619e43f94d..757f4729ab 100644
--- a/board/tqc/tqm5200/Makefile
+++ b/board/tqc/tqm5200/Makefile
@@ -5,27 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
+obj-y := tqm5200.o cmd_stk52xx.o cmd_tb5200.o cam5200_flash.o
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o cmd_stk52xx.o cmd_tb5200.o cam5200_flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-cam5200_flash.o: cam5200_flash.c
+$(obj)cam5200_flash.o: cam5200_flash.c
$(CC) $(CFLAGS) -c -o $@ $<
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/tqc/tqm8260/Makefile b/board/tqc/tqm8260/Makefile
index b92acdb34b..dc4a528083 100644
--- a/board/tqc/tqm8260/Makefile
+++ b/board/tqc/tqm8260/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../tqm8xx/)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = tqm8260.o ../tqm8xx/load_sernum_ethaddr.o
diff --git a/board/tqc/tqm8272/Makefile b/board/tqc/tqm8272/Makefile
index 58f1b65ff6..09af765f05 100644
--- a/board/tqc/tqm8272/Makefile
+++ b/board/tqc/tqm8272/Makefile
@@ -5,27 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../tqm8xx/)
endif
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o nand.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = tqm8272.o ../tqm8xx/load_sernum_ethaddr.o nand.o
diff --git a/board/tqc/tqm834x/Makefile b/board/tqc/tqm834x/Makefile
index 0692bb181f..12edc9af06 100644
--- a/board/tqc/tqm834x/Makefile
+++ b/board/tqc/tqm834x/Makefile
@@ -7,26 +7,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-$(CONFIG_PCI) += pci.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += tqm834x.o
+obj-$(CONFIG_PCI) += pci.o
diff --git a/board/tqc/tqm8xx/Makefile b/board/tqc/tqm8xx/Makefile
index 787ecc2b2d..2651a2f99f 100644
--- a/board/tqc/tqm8xx/Makefile
+++ b/board/tqc/tqm8xx/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o load_sernum_ethaddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = tqm8xx.o load_sernum_ethaddr.o
diff --git a/board/utx8245/Makefile b/board/utx8245/Makefile
index 4cf57cea79..f12e5457b1 100644
--- a/board/utx8245/Makefile
+++ b/board/utx8245/Makefile
@@ -10,24 +10,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = utx8245.o flash.o
diff --git a/board/v37/Makefile b/board/v37/Makefile
index 1284818686..2df4b82fb8 100644
--- a/board/v37/Makefile
+++ b/board/v37/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = v37.o flash.o
diff --git a/board/v38b/Makefile b/board/v38b/Makefile
index 5c8bb6f505..a20a5ef0e9 100644
--- a/board/v38b/Makefile
+++ b/board/v38b/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o ethaddr.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := v38b.o ethaddr.o
diff --git a/board/ve8313/Makefile b/board/ve8313/Makefile
index ff0dbf869d..41258f9722 100644
--- a/board/ve8313/Makefile
+++ b/board/ve8313/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := ve8313.o
diff --git a/board/w7o/Makefile b/board/w7o/Makefile
index 85bebaccca..955de50e4f 100644
--- a/board/w7o/Makefile
+++ b/board/w7o/Makefile
@@ -8,26 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o flash.o fpga.o fsboot.o post2.o vpd.o cmd_vpd.o \
+obj-y = w7o.o flash.o fpga.o fsboot.o post2.o vpd.o cmd_vpd.o \
watchdog.o
-SOBJS = init.o post1.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += init.o post1.o
diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile
index 2e5f1c522f..65d321abdd 100644
--- a/board/xes/common/Makefile
+++ b/board/xes/common/Makefile
@@ -5,34 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
-endif
-
-LIB = $(obj)lib$(VENDOR).o
-
-COBJS-$(CONFIG_FSL_PCI_INIT) += fsl_8xxx_pci.o
-COBJS-$(CONFIG_MPC8572) += fsl_8xxx_clk.o
-COBJS-$(CONFIG_MPC86xx) += fsl_8xxx_clk.o
-COBJS-$(CONFIG_P2020) += fsl_8xxx_clk.o
-COBJS-$(CONFIG_MPC85xx) += fsl_8xxx_misc.o board.o
-COBJS-$(CONFIG_MPC86xx) += fsl_8xxx_misc.o board.o
-COBJS-$(CONFIG_NAND_ACTL) += actl_nand.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_FSL_PCI_INIT) += fsl_8xxx_pci.o
+obj-$(CONFIG_MPC8572) += fsl_8xxx_clk.o
+obj-$(CONFIG_MPC86xx) += fsl_8xxx_clk.o
+obj-$(CONFIG_P2020) += fsl_8xxx_clk.o
+obj-$(CONFIG_MPC85xx) += fsl_8xxx_misc.o board.o
+obj-$(CONFIG_MPC86xx) += fsl_8xxx_misc.o board.o
+obj-$(CONFIG_NAND_ACTL) += actl_nand.o
diff --git a/board/xes/xpedite1000/Makefile b/board/xes/xpedite1000/Makefile
index 1d80df8b74..308de91c9d 100644
--- a/board/xes/xpedite1000/Makefile
+++ b/board/xes/xpedite1000/Makefile
@@ -5,25 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o
-SOBJS = 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))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y = xpedite1000.o
+extra-y += init.o
diff --git a/board/xes/xpedite517x/Makefile b/board/xes/xpedite517x/Makefile
index 0105aa1915..d88c3d4b9a 100644
--- a/board/xes/xpedite517x/Makefile
+++ b/board/xes/xpedite517x/Makefile
@@ -5,26 +5,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude ($obj).depend
-
-#########################################################################
+obj-y += xpedite517x.o
+obj-y += ddr.o
+obj-y += law.o
diff --git a/board/xes/xpedite520x/Makefile b/board/xes/xpedite520x/Makefile
index 6c1b85b03b..14841b9c87 100644
--- a/board/xes/xpedite520x/Makefile
+++ b/board/xes/xpedite520x/Makefile
@@ -7,27 +7,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += xpedite520x.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/xes/xpedite537x/Makefile b/board/xes/xpedite537x/Makefile
index 64f996f5a9..2dca0d7517 100644
--- a/board/xes/xpedite537x/Makefile
+++ b/board/xes/xpedite537x/Makefile
@@ -7,27 +7,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += xpedite537x.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/xes/xpedite550x/Makefile b/board/xes/xpedite550x/Makefile
index c9b2deaf59..1a3fe7635d 100644
--- a/board/xes/xpedite550x/Makefile
+++ b/board/xes/xpedite550x/Makefile
@@ -4,27 +4,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS-y += $(BOARD).o
-COBJS-y += ddr.o
-COBJS-y += law.o
-COBJS-y += tlb.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y))
-SOBJS := $(addprefix $(obj),$(SOBJS-y))
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += xpedite550x.o
+obj-y += ddr.o
+obj-y += law.o
+obj-y += tlb.o
diff --git a/board/zeus/Makefile b/board/zeus/Makefile
index 8d133e24a0..aa3658a370 100644
--- a/board/zeus/Makefile
+++ b/board/zeus/Makefile
@@ -5,25 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS = $(BOARD).o update.o
-SOBJS =
-
-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 = zeus.o update.o
diff --git a/board/zpc1900/Makefile b/board/zpc1900/Makefile
index c573be952c..e636365777 100644
--- a/board/zpc1900/Makefile
+++ b/board/zpc1900/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := $(BOARD).o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y := zpc1900.o