summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/GNUmakefile
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-11-28 11:18:51 +0800
committerLiming Gao <liming.gao@intel.com>2017-11-30 13:06:49 +0800
commit9e1131b70b4b6002cd1904401946ef0b22cf7d33 (patch)
treed668be579fe9adc71916f46231cb09f641ee0ab9 /BaseTools/Source/C/GNUmakefile
parenta9f6e0a4dc6d3f4dec53bb2a11b1c0ecee455076 (diff)
downloadedk2-9e1131b70b4b6002cd1904401946ef0b22cf7d33.zip
edk2-9e1131b70b4b6002cd1904401946ef0b22cf7d33.tar.gz
edk2-9e1131b70b4b6002cd1904401946ef0b22cf7d33.tar.bz2
BaseTools: Update BaseTools top GNUMakefile with the clear dependency
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 <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/C/GNUmakefile')
-rw-r--r--BaseTools/Source/C/GNUmakefile11
1 files changed, 9 insertions, 2 deletions
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.<BR>
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# 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