diff options
author | Anas Nashif <anas.nashif@intel.com> | 2016-09-03 15:43:26 -0400 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2016-11-12 00:34:03 +0000 |
commit | ff23cb58a8aeb2c83bf4da14e72eea131dd5862b (patch) | |
tree | f7cbbcc0a12b82a5c5b1cd4ce85a374a52086b99 /Makefile | |
parent | b190bd4da23d6252f325aa906088aae37a0ba149 (diff) |
build: support pre-built host tools
Right now the build system builds the host tools over and over again, in some
environments especially when running in an IDE on windows for example,
this is not desired and a set of pre-built host tools should be used.
Provide an option to use pre-built tools instead of building them
from source.
To use, set PREBUILT_HOST_TOOLS to the path where all pre-built host tools
are hosted. To get a prebuilt version of the host tools, build without the
variable set and copy the generated host binaries from outdir. The following
tools are supported:
* conf
* fixdep
* gen_idt
* gen_offset_header
Jira: ZEP-237
Change-Id: Iea505bfd0b50f851ee2781b5117bb6085ab20157
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -316,8 +316,15 @@ OBJDUMP = $(CROSS_COMPILE)objdump GDB = $(CROSS_COMPILE)gdb READELF = $(CROSS_COMPILE)readelf AWK = awk +ifeq ($(PREBUILT_HOST_TOOLS),) GENIDT = scripts/gen_idt/gen_idt GENOFFSET_H = scripts/gen_offset_header/gen_offset_header +FIXDEP = scripts/basic/fixdep +else +GENIDT = $(PREBUILT_HOST_TOOLS)/gen_idt +GENOFFSET_H = $(PREBUILT_HOST_TOOLS)/gen_offset_header +FIXDEP = $(PREBUILT_HOST_TOOLS)/fixdep +endif PERL = perl PYTHON = python CHECK = sparse @@ -406,7 +413,7 @@ exports += HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS exports += KBUILD_CPPFLAGS NOSTDINC_FLAGS ZEPHYRINCLUDE OBJCOPYFLAGS LDFLAGS exports += KBUILD_CFLAGS KBUILD_CXXFLAGS CFLAGS_GCOV KBUILD_AFLAGS AFLAGS_KERNEL -exports += KBUILD_ARFLAGS +exports += KBUILD_ARFLAGS FIXDEP # Push the exports to sub-processes export $(exports) @@ -438,10 +445,14 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ # Basic helpers built in scripts/ PHONY += scripts_basic +ifeq ($(PREBUILT_HOST_TOOLS),) scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic $(Q)$(MAKE) $(build)=scripts/gen_idt $(Q)$(MAKE) $(build)=scripts/gen_offset_header +else +scripts_basic: +endif # To avoid any implicit rule to kick in, define an empty command. scripts/basic/%: scripts_basic ; |