From 4810400ec963721f0488ba98128955176c1869e1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 17 Oct 2013 17:35:05 +0900 Subject: [PATCH] board: ti: convert makefiles to Kbuild style Signed-off-by: Masahiro Yamada Cc: Tom Rini --- board/ti/am335x/Makefile | 29 ++--------------------------- board/ti/am3517crane/Makefile | 19 +------------------ board/ti/am43xx/Makefile | 29 ++--------------------------- board/ti/beagle/Makefile | 24 ++---------------------- board/ti/dra7xx/Makefile | 27 +-------------------------- board/ti/evm/Makefile | 19 +------------------ board/ti/omap5912osk/Makefile | 24 ++---------------------- board/ti/omap5_uevm/Makefile | 27 +-------------------------- board/ti/omap730p2/Makefile | 24 ++---------------------- board/ti/panda/Makefile | 21 +-------------------- board/ti/sdp3430/Makefile | 21 +-------------------- board/ti/sdp4430/Makefile | 23 ++--------------------- board/ti/ti814x/Makefile | 29 ++--------------------------- board/ti/ti816x/Makefile | 27 +-------------------------- board/ti/tnetv107xevm/Makefile | 25 +------------------------ 15 files changed, 22 insertions(+), 346 deletions(-) diff --git a/board/ti/am335x/Makefile b/board/ti/am335x/Makefile index 3dbeedab1a..c8b4f9a280 100644 --- a/board/ti/am335x/Makefile +++ b/board/ti/am335x/Makefile @@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y) -COBJS := mux.o +obj-y := mux.o endif -COBJS += board.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)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += board.o diff --git a/board/ti/am3517crane/Makefile b/board/ti/am3517crane/Makefile index d9ab72a620..9da795de95 100644 --- a/board/ti/am3517crane/Makefile +++ b/board/ti/am3517crane/Makefile @@ -8,21 +8,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := am3517crane.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-y := am3517crane.o diff --git a/board/ti/am43xx/Makefile b/board/ti/am43xx/Makefile index 4a1bb7c47f..cb5fe88901 100644 --- a/board/ti/am43xx/Makefile +++ b/board/ti/am43xx/Makefile @@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifdef CONFIG_SPL_BUILD -COBJS := mux.o +obj-y := mux.o endif -COBJS += board.o -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += board.o diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile index 3018f6c63a..9f55e8f358 100644 --- a/board/ti/beagle/Makefile +++ b/board/ti/beagle/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_STATUS_LED) += led.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := $(BOARD).o +obj-$(CONFIG_STATUS_LED) += led.o diff --git a/board/ti/dra7xx/Makefile b/board/ti/dra7xx/Makefile index e558f4c89f..434e8d128e 100644 --- a/board/ti/dra7xx/Makefile +++ b/board/ti/dra7xx/Makefile @@ -5,29 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(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 := evm.o diff --git a/board/ti/evm/Makefile b/board/ti/evm/Makefile index 0f8cf446ba..b88ab8f517 100644 --- a/board/ti/evm/Makefile +++ b/board/ti/evm/Makefile @@ -5,21 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-y := evm.o diff --git a/board/ti/omap5912osk/Makefile b/board/ti/omap5912osk/Makefile index b2727de687..d7c0ebd729 100644 --- a/board/ti/omap5912osk/Makefile +++ b/board/ti/omap5912osk/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := omap5912osk.o -SOBJS := lowlevel_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 := omap5912osk.o +obj-y += lowlevel_init.o diff --git a/board/ti/omap5_uevm/Makefile b/board/ti/omap5_uevm/Makefile index 2ab40e3ecf..b88ab8f517 100644 --- a/board/ti/omap5_uevm/Makefile +++ b/board/ti/omap5_uevm/Makefile @@ -5,29 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(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 := evm.o diff --git a/board/ti/omap730p2/Makefile b/board/ti/omap730p2/Makefile index 37a4d3418b..8242f3d69f 100644 --- a/board/ti/omap730p2/Makefile +++ b/board/ti/omap730p2/Makefile @@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := omap730p2.o flash.o -SOBJS := lowlevel_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 := omap730p2.o flash.o +obj-y += lowlevel_init.o diff --git a/board/ti/panda/Makefile b/board/ti/panda/Makefile index 1e489d20b6..c89f80d806 100644 --- a/board/ti/panda/Makefile +++ b/board/ti/panda/Makefile @@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := panda.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := panda.o diff --git a/board/ti/sdp3430/Makefile b/board/ti/sdp3430/Makefile index e72485c4b4..753f09979c 100644 --- a/board/ti/sdp3430/Makefile +++ b/board/ti/sdp3430/Makefile @@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := sdp.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := sdp.o diff --git a/board/ti/sdp4430/Makefile b/board/ti/sdp4430/Makefile index c522a2b84e..79e67b6e96 100644 --- a/board/ti/sdp4430/Makefile +++ b/board/ti/sdp4430/Makefile @@ -5,27 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := sdp.o +obj-y := sdp.o ifndef CONFIG_SPL_BUILD -COBJS += cmd_bat.o +obj-y += cmd_bat.o endif - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(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/ti/ti814x/Makefile b/board/ti/ti814x/Makefile index 6059e203f3..93155de533 100644 --- a/board/ti/ti814x/Makefile +++ b/board/ti/ti814x/Makefile @@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifdef CONFIG_SPL_BUILD -COBJS := mux.o +obj-y := mux.o endif -COBJS += evm.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)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += evm.o diff --git a/board/ti/ti816x/Makefile b/board/ti/ti816x/Makefile index 17ce72a3cc..f1cc3d5616 100644 --- a/board/ti/ti816x/Makefile +++ b/board/ti/ti816x/Makefile @@ -9,29 +9,4 @@ # SPDX-License-Identifier: GPL-2.0 # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(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 := evm.o diff --git a/board/ti/tnetv107xevm/Makefile b/board/ti/tnetv107xevm/Makefile index 5b82e483b5..0a6128f85f 100644 --- a/board/ti/tnetv107xevm/Makefile +++ b/board/ti/tnetv107xevm/Makefile @@ -2,27 +2,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS += sdb_board.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -.PHONY: all - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### -# This is for $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += sdb_board.o -- 2.25.1