From patchwork Mon Oct 21 02:53:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 285100 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 1A0582C00A7 for ; Mon, 21 Oct 2013 13:57:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7BFF74A17C; Mon, 21 Oct 2013 04:56:33 +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 HFYUuwUvSHMP; Mon, 21 Oct 2013 04:56:33 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D81694A19B; Mon, 21 Oct 2013 04:54:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0EC964A14E for ; Mon, 21 Oct 2013 04:54:25 +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 uMiqRkAhNCrh for ; Mon, 21 Oct 2013 04:54:20 +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 65D3F4A137 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 r9L2rrix018465 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-maili13) with ESMTP id r9L2rrJ25464 for ; Mon, 21 Oct 2013 11:53:53 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi17) id r9L2rrk1014827; Mon, 21 Oct 2013 11:53:53 +0900 Received: from poodle by lomi17.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r9L2rrT1014810; 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 4AB6E2743A5F; 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:40 +0900 Message-Id: <1382324021-18932-18-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 17/18] dts, api, test: 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 Signed-off-by: Masahiro Yamada --- Makefile | 2 +- api/Makefile | 18 +----------------- dts/Makefile | 24 +----------------------- test/Makefile | 26 ++------------------------ 4 files changed, 5 insertions(+), 65 deletions(-) diff --git a/Makefile b/Makefile index 63f6440..0d27b5b 100644 --- a/Makefile +++ b/Makefile @@ -382,7 +382,7 @@ build := -f $(TOPDIR)/scripts/Makefile.build -C all: $(ALL-y) $(SUBDIR_EXAMPLES) $(obj)u-boot.dtb: checkdtc $(obj)u-boot - $(MAKE) -C dts binary + $(MAKE) $(build) dts binary mv $(obj)dts/dt.dtb $@ $(obj)u-boot-dtb.bin: $(obj)u-boot.bin $(obj)u-boot.dtb diff --git a/api/Makefile b/api/Makefile index 87b8eb2..fb130ff 100644 --- a/api/Makefile +++ b/api/Makefile @@ -4,21 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libapi.o - -COBJS-$(CONFIG_API) += api.o api_display.o api_net.o api_storage.o \ +obj-$(CONFIG_API) += api.o api_display.o api_net.o api_storage.o \ api_platform-$(ARCH).o - -COBJS := $(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 diff --git a/dts/Makefile b/dts/Makefile index 3cf991e..140c8bc 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -7,10 +7,6 @@ # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is # enabled. See doc/README.fdt-control for more details. -include $(TOPDIR)/config.mk - -LIB = $(obj)libdts.o - ifeq ($(DEVICE_TREE),) $(if $(CONFIG_DEFAULT_DEVICE_TREE),,\ $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file)) @@ -27,8 +23,6 @@ DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \ DTC_FLAGS := -R 4 -p 0x1000 \ $(addprefix -i ,$(DTS_INCDIRS)) -all: $(obj).depend $(LIB) - # Use a constant name for this so we can access it from C code. # objcopy doesn't seem to allow us to set the symbol name independently of # the filename. @@ -71,22 +65,6 @@ $(obj)dt.o: $(DT_BIN) $(notdir ${DT_BIN}) $@ rm $(DT_BIN) -OBJS-$(CONFIG_OF_EMBED) := dt.o - -COBJS := $(OBJS-y) - -OBJS := $(addprefix $(obj),$(COBJS)) +obj-$(CONFIG_OF_EMBED) := dt.o binary: $(DT_BIN) - -$(LIB): $(OBJS) $(DTB) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/test/Makefile b/test/Makefile index a68613d..9c95805 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,27 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libtest.o - -COBJS-$(CONFIG_SANDBOX) += command_ut.o -COBJS-$(CONFIG_SANDBOX) += compression.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) $(XOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_SANDBOX) += command_ut.o +obj-$(CONFIG_SANDBOX) += compression.o