From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 1E6612034A771 for ; Mon, 27 Nov 2017 19:14:40 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2017 19:19:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,466,1505804400"; d="scan'208";a="12730875" Received: from shwde7172.ccr.corp.intel.com ([10.239.9.15]) by orsmga002.jf.intel.com with ESMTP; 27 Nov 2017 19:19:01 -0800 From: Liming Gao To: edk2-devel@lists.01.org Date: Tue, 28 Nov 2017 11:18:51 +0800 Message-Id: <1511839132-720-3-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1511839132-720-1-git-send-email-liming.gao@intel.com> References: <1511839132-720-1-git-send-email-liming.gao@intel.com> Subject: [PATCH v2 2/3] BaseTools: Update BaseTools 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: Tue, 28 Nov 2017 03:14:40 -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/GNUmakefile | 8 +++----- BaseTools/Source/C/GNUmakefile | 11 +++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/BaseTools/GNUmakefile b/BaseTools/GNUmakefile index 790d33a..6325e40 100644 --- a/BaseTools/GNUmakefile +++ b/BaseTools/GNUmakefile @@ -1,7 +1,7 @@ ## @file # GNU/Linux makefile for Base Tools project build. # -# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 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 # which accompanies this distribution. The full text of the license may be found at @@ -24,12 +24,10 @@ subdirs: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ +Tests: $(SOURCE_SUBDIRS) + .PHONY: $(CLEAN_SUBDIRS) $(CLEAN_SUBDIRS): -$(MAKE) -C $(@:-clean=) clean clean: $(CLEAN_SUBDIRS) - -test: - @$(MAKE) -C Tests - diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile index 53ddb67..50b6759 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) $(MAKEROOT)/bin $(VFRAUTOGEN) + .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.8.0.windows.1