diff options
author | Anas Nashif <anas.nashif@intel.com> | 2015-08-03 15:42:21 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2016-02-05 20:14:45 -0500 |
commit | 7aa584d9c21a109b1cf1776ead1fd386c36bd2eb (patch) | |
tree | 334c5a8779acdb6f8cf148d206798539d250fe05 /Makefile.inc | |
parent | 74c8f65eb69f817d54d01324c7e38583267e5d24 (diff) |
build: Let application specify the defconfig
We should be able to point to a defconfig file that is
outside of the buildsystem instead of using system
provided defconfigs.
In Makefile of application, specify for example:
KBUILD_DEFCONFIG=/tmp/micro_basic_atom_defconfig
Change-Id: I63e500bf74892654587b63d788a94541c33072e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc index 14be82f85..bce981a2e 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,3 +1,5 @@ +# vim: filetype=make + PROJECT_BASE ?= $(shell pwd) ARCH?=x86 @@ -14,7 +16,12 @@ ifdef PLATFORM_CONFIG ifndef KERNEL_TYPE $(error KERNEL_TYPE is not defined! Set it to either micro or nano) endif +ifndef KBUILD_DEFCONFIG KBUILD_DEFCONFIG=$(KERNEL_TYPE)_$(PLATFORM_CONFIG)_defconfig +KBUILD_DEFCONFIG_PATH=$(ZEPHYR_BASE)/arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) +else +KBUILD_DEFCONFIG_PATH=$(KBUILD_DEFCONFIG) +endif export KBUILD_DEFCONFIG endif @@ -87,8 +94,7 @@ qemu: $(CONFIG_DEPS) $(O)/.dir $(O)/.config: $(O)/.dir - $(Q)cp $(ZEPHYR_BASE)/arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) \ - $(O)/.config + $(Q)cp $(KBUILD_DEFCONFIG_PATH) $(O)/.config $(O)/.initconfig: mergeconfig $(Q)yes "" | $(MAKE) $(S) -C $(ZEPHYR_BASE) O=$(O) \ |