From patchwork Mon Oct 21 02:53:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 285089 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9E44C2C012B for ; Mon, 21 Oct 2013 13:54:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 593D84A16E; Mon, 21 Oct 2013 04:54:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WnpnYxsB+xLj; Mon, 21 Oct 2013 04:54:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E052E4A133; Mon, 21 Oct 2013 04:54:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7177A4A130 for ; Mon, 21 Oct 2013 04:54:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VD4DBv-6h3ti for ; Mon, 21 Oct 2013 04:54:08 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 627074A134 for ; Mon, 21 Oct 2013 04:53:56 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile12) with ESMTP id r9L2rrMj018457 for ; Mon, 21 Oct 2013 11:53:53 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili14) with ESMTP id r9L2rrL19760 for ; Mon, 21 Oct 2013 11:53:53 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi12) id r9L2rrRU010347; Mon, 21 Oct 2013 11:53:53 +0900 Received: from poodle by lomi12.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r9L2rr6f010247; Mon, 21 Oct 2013 11:53:53 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 476922743A5D; Mon, 21 Oct 2013 11:53:53 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 21 Oct 2013 11:53:39 +0900 Message-Id: <1382324021-18932-17-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382324021-18932-1-git-send-email-yamada.m@jp.panasonic.com> References: <1382324021-18932-1-git-send-email-yamada.m@jp.panasonic.com> Subject: [U-Boot] [PATCH 16/18] post: convert makefiles to Kbuild style X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This commit also deletes post/rules.mk, which in not necessary any more. Signed-off-by: Masahiro Yamada --- post/Makefile | 65 +++++++++---------------------------------- post/board/lwmon/Makefile | 7 ++--- post/board/lwmon5/Makefile | 7 ++--- post/board/netta/Makefile | 7 ++--- post/board/pdm360ng/Makefile | 7 ++--- post/cpu/mpc83xx/Makefile | 8 ++---- post/cpu/mpc8xx/Makefile | 9 ++---- post/cpu/ppc4xx/Makefile | 23 +++++++-------- post/drivers/Makefile | 7 ++--- post/lib_powerpc/Makefile | 13 ++++----- post/lib_powerpc/fpu/Makefile | 24 +++++++--------- post/rules.mk | 30 -------------------- 12 files changed, 54 insertions(+), 153 deletions(-) delete mode 100644 post/rules.mk diff --git a/post/Makefile b/post/Makefile index 0ecae5b..1439244 100644 --- a/post/Makefile +++ b/post/Makefile @@ -5,55 +5,16 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -include $(OBJTREE)/include/autoconf.mk - -LIB = libpost.o -GPLIB-$(CONFIG_HAS_POST) += libgenpost.o -COBJS-$(CONFIG_HAS_POST) += post.o -COBJS-$(CONFIG_POST_STD_LIST) += tests.o - -SPLIB-$(CONFIG_HAS_POST) = drivers/libpostdrivers.o -SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH) ]; then echo \ - "lib_$(ARCH)/libpost$(ARCH).o"; fi) -SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH)/fpu ]; then echo \ - "lib_$(ARCH)/fpu/libpost$(ARCH)fpu.o"; fi) -SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d cpu/$(CPU) ]; then echo \ - "cpu/$(CPU)/libpost$(CPU).o"; fi) -SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d board/$(BOARD) ]; then echo \ - "board/$(BOARD)/libpost$(BOARD).o"; fi) - -GPLIB := $(addprefix $(obj),$(GPLIB-y)) -SPLIB := $(addprefix $(obj),$(SPLIB-y)) -COBJS := $(COBJS-y) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -LIB := $(obj)$(LIB) - -all: $(LIB) - -postdeps: - @for lib in $(SPLIB-y) ; do \ - $(MAKE) -C `dirname $$lib` all ; \ - done - -# generic POST library -$(GPLIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -# specific POST libraries -$(SPLIB): $(obj).depend postdeps - $(MAKE) -C $(dir $(subst $(obj),,$@)) - -# the POST lib archive -$(LIB): $(GPLIB) $(SPLIB) - $(call cmd_link_o_target, $^) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_HAS_POST) += post.o +obj-$(CONFIG_POST_STD_LIST) += tests.o + +obj-$(CONFIG_HAS_POST) += drivers/ +ifeq ($(ARCH),powerpc) +obj-$(CONFIG_HAS_POST) += lib_powerpc/ +endif +ifneq ($(filter mpc83xx mpc8xx ppc4xx,$(CPU)),) +obj-$(CONFIG_HAS_POST) += cpu/$(CPU)/ +endif +ifneq ($(filter lwmon lwmon5 netta pdm360ng,$(BOARD)),) +obj-$(CONFIG_HAS_POST) += board/$(BOARD)/ +endif diff --git a/post/board/lwmon/Makefile b/post/board/lwmon/Makefile index d38498b..1ac7aa5 100644 --- a/post/board/lwmon/Makefile +++ b/post/board/lwmon/Makefile @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostlwmon.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += sysmon.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += sysmon.o diff --git a/post/board/lwmon5/Makefile b/post/board/lwmon5/Makefile index b410dbb..d8b1952 100644 --- a/post/board/lwmon5/Makefile +++ b/post/board/lwmon5/Makefile @@ -4,10 +4,7 @@ # Developed for DENX Software Engineering GmbH # # SPDX-License-Identifier: GPL-2.0+ -include $(OBJTREE)/include/autoconf.mk -LIB = libpostlwmon5.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o diff --git a/post/board/netta/Makefile b/post/board/netta/Makefile index 2d73f55..cd27a5c 100644 --- a/post/board/netta/Makefile +++ b/post/board/netta/Makefile @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostnetta.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += codec.o dsp.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += codec.o dsp.o diff --git a/post/board/pdm360ng/Makefile b/post/board/pdm360ng/Makefile index cb03e58..3f74889 100644 --- a/post/board/pdm360ng/Makefile +++ b/post/board/pdm360ng/Makefile @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostpdm360ng.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += coproc_com.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += coproc_com.o diff --git a/post/cpu/mpc83xx/Makefile b/post/cpu/mpc83xx/Makefile index 6ac56dc..0643d01 100644 --- a/post/cpu/mpc83xx/Makefile +++ b/post/cpu/mpc83xx/Makefile @@ -4,11 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostmpc83xx.o +CPPFLAGS += -I$(TOPDIR) -AOBJS-$(CONFIG_HAS_POST) += -COBJS-$(CONFIG_HAS_POST) += ecc.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += ecc.o diff --git a/post/cpu/mpc8xx/Makefile b/post/cpu/mpc8xx/Makefile index efde1fb..7a2930a 100644 --- a/post/cpu/mpc8xx/Makefile +++ b/post/cpu/mpc8xx/Makefile @@ -4,11 +4,8 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostmpc8xx.o +CPPFLAGS += -I$(TOPDIR) -AOBJS-$(CONFIG_HAS_POST) += cache_8xx.o -COBJS-$(CONFIG_HAS_POST) += cache.o ether.o spr.o uart.o usb.o watchdog.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += cache_8xx.o +obj-$(CONFIG_HAS_POST) += cache.o ether.o spr.o uart.o usb.o watchdog.o diff --git a/post/cpu/ppc4xx/Makefile b/post/cpu/ppc4xx/Makefile index 614cef0..b7435c8 100644 --- a/post/cpu/ppc4xx/Makefile +++ b/post/cpu/ppc4xx/Makefile @@ -4,18 +4,15 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(OBJTREE)/include/autoconf.mk -LIB = libpostppc4xx.o +CPPFLAGS += -I$(TOPDIR) -AOBJS-$(CONFIG_HAS_POST) += cache_4xx.o -COBJS-$(CONFIG_HAS_POST) += cache.o -COBJS-$(CONFIG_HAS_POST) += denali_ecc.o -COBJS-$(CONFIG_HAS_POST) += ether.o -COBJS-$(CONFIG_HAS_POST) += fpu.o -COBJS-$(CONFIG_HAS_POST) += ocm.o -COBJS-$(CONFIG_HAS_POST) += spr.o -COBJS-$(CONFIG_HAS_POST) += uart.o -COBJS-$(CONFIG_HAS_POST) += watchdog.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += cache_4xx.o +obj-$(CONFIG_HAS_POST) += cache.o +obj-$(CONFIG_HAS_POST) += denali_ecc.o +obj-$(CONFIG_HAS_POST) += ether.o +obj-$(CONFIG_HAS_POST) += fpu.o +obj-$(CONFIG_HAS_POST) += ocm.o +obj-$(CONFIG_HAS_POST) += spr.o +obj-$(CONFIG_HAS_POST) += uart.o +obj-$(CONFIG_HAS_POST) += watchdog.o diff --git a/post/drivers/Makefile b/post/drivers/Makefile index 6720f85..2f6844c 100644 --- a/post/drivers/Makefile +++ b/post/drivers/Makefile @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -LIB = libpostdrivers.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += flash.o i2c.o memory.o rtc.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += flash.o i2c.o memory.o rtc.o diff --git a/post/lib_powerpc/Makefile b/post/lib_powerpc/Makefile index efa1fb2..f19fea3 100644 --- a/post/lib_powerpc/Makefile +++ b/post/lib_powerpc/Makefile @@ -4,13 +4,12 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -LIB = libpost$(ARCH).o +CPPFLAGS += -I$(TOPDIR) -AOBJS-$(CONFIG_HAS_POST) += asm.o -COBJS-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o -COBJS-$(CONFIG_HAS_POST) += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o -COBJS-$(CONFIG_HAS_POST) += store.o load.o cr.o b.o multi.o string.o complex.o +obj-$(CONFIG_HAS_POST) += asm.o +obj-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o +obj-$(CONFIG_HAS_POST) += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o +obj-$(CONFIG_HAS_POST) += store.o load.o cr.o b.o multi.o string.o complex.o -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += fpu/ diff --git a/post/lib_powerpc/fpu/Makefile b/post/lib_powerpc/fpu/Makefile index eff7e6b..6aec96c 100644 --- a/post/lib_powerpc/fpu/Makefile +++ b/post/lib_powerpc/fpu/Makefile @@ -4,22 +4,18 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -LIB = libpost$(ARCH)fpu.o +CPPFLAGS += -I$(TOPDIR) -COBJS-$(CONFIG_HAS_POST) += 20001122-1.o -COBJS-$(CONFIG_HAS_POST) += 20010114-2.o -COBJS-$(CONFIG_HAS_POST) += 20010226-1.o -COBJS-$(CONFIG_HAS_POST) += 980619-1.o -COBJS-$(CONFIG_HAS_POST) += acc1.o -COBJS-$(CONFIG_HAS_POST) += compare-fp-1.o -COBJS-$(CONFIG_HAS_POST) += fpu.o -COBJS-$(CONFIG_HAS_POST) += mul-subnormal-single-1.o - -COBJS-$(CONFIG_HAS_POST) += darwin-ldouble.o - -include $(TOPDIR)/post/rules.mk +obj-$(CONFIG_HAS_POST) += 20001122-1.o +obj-$(CONFIG_HAS_POST) += 20010114-2.o +obj-$(CONFIG_HAS_POST) += 20010226-1.o +obj-$(CONFIG_HAS_POST) += 980619-1.o +obj-$(CONFIG_HAS_POST) += acc1.o +obj-$(CONFIG_HAS_POST) += compare-fp-1.o +obj-$(CONFIG_HAS_POST) += fpu.o +obj-$(CONFIG_HAS_POST) += mul-subnormal-single-1.o +obj-$(CONFIG_HAS_POST) += darwin-ldouble.o CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//) CFLAGS += -mhard-float -fkeep-inline-functions diff --git a/post/rules.mk b/post/rules.mk deleted file mode 100644 index b25ebbf..0000000 --- a/post/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -# -# (C) Copyright 2002-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -include $(TOPDIR)/config.mk - -COBJS := $(COBJS-y) -AOBJS := $(AOBJS-y) -SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) -LIB := $(obj)$(LIB) - -CPPFLAGS += -I$(TOPDIR) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################