From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9888C220C1C2C for ; Thu, 23 Nov 2017 08:02:06 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2017 08:06:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,441,1505804400"; d="scan'208";a="1247693036" Received: from liuyue1-mobl.ccr.corp.intel.com (HELO lgao4-MOBL1.ccr.corp.intel.com) ([10.255.25.216]) by fmsmga002.fm.intel.com with ESMTP; 23 Nov 2017 08:06:23 -0800 From: Liming Gao To: edk2-devel@lists.01.org Date: Fri, 24 Nov 2017 00:06:13 +0800 Message-Id: <20171123160614.8200-2-liming.gao@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 In-Reply-To: <20171123160614.8200-1-liming.gao@intel.com> References: <20171123160614.8200-1-liming.gao@intel.com> Subject: [Patch 1/2] BaseTools: Update C tools top GNUMakefile with the clear dependency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 16:02:06 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=786 After GNUmakefile dependency is fixed up, it can make with -j N to enable multiple thread build in base tools C source and save build time. In my linux host machine, make -j 4 to compile BaseTools and save ~60% time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- BaseTools/Source/C/GNUmakefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile index 53ddb67439..d067c87081 100644 --- a/BaseTools/Source/C/GNUmakefile +++ b/BaseTools/Source/C/GNUmakefile @@ -1,7 +1,7 @@ ## @file # GNU/Linux makefile for C tools build. # -# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -44,10 +44,11 @@ MAKEROOT = . include Makefiles/header.makefile -all: makerootdir subdirs $(MAKEROOT)/libs +all: makerootdir subdirs @echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH) LIBRARIES = Common +VFRAUTOGEN = VfrCompile/VfrLexer.h # NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage APPLICATIONS = \ GnuGenBootSector \ @@ -70,6 +71,9 @@ APPLICATIONS = \ SUBDIRS := $(LIBRARIES) $(APPLICATIONS) +$(LIBRARIES): $(MAKEROOT)/libs +$(APPLICATIONS): $(LIBRARIES) $(VFRAUTOGEN) $(MAKEROOT)/bin + .PHONY: outputdirs makerootdir: -mkdir -p $(MAKEROOT) @@ -83,6 +87,9 @@ $(SUBDIRS): $(patsubst %,%-clean,$(sort $(SUBDIRS))): -$(MAKE) -C $(@:-clean=) clean +$(VFRAUTOGEN): VfrCompile/VfrSyntax.g + $(MAKE) -C VfrCompile VfrLexer.h + clean: $(patsubst %,%-clean,$(sort $(SUBDIRS))) clean: localClean -- 2.11.0.windows.1