summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2015-10-03 10:24:57 -0400
committerAnas Nashif <anas.nashif@intel.com>2016-02-05 20:24:28 -0500
commit2ce8d308923cbc87b4b347d17db69650aa0cf160 (patch)
treeea689e078fa7694fbe361e461512baf337eebd79 /Makefile.inc
parent2cf0df018d2340c46ca7568a8cd4f3fe21c83b49 (diff)
remove nano/micro defconfigs, use 1 file only
Do not use micro_* or nano_* defconfigs, instead maintain platform in one single defconfig and merge nano or micro support on top. Change-Id: I0d5184f37865ed8312e516e48cf5a8584a287dfe Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc21
1 files changed, 10 insertions, 11 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 9b0c514d9..c5ec50428 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -13,18 +13,15 @@ override O := $(shell readlink -f $(O))
export ARCH MDEF_FILE QEMU_EXTRA_FLAGS PROJECT_BASE
-# FIXME: Simplify this, very ugly
-ifdef PLATFORM_CONFIG
ifndef KERNEL_TYPE
-$(error KERNEL_TYPE is not defined! Set it to either micro or nano)
+KERNEL_TYPE = micro
endif
-ifndef KBUILD_DEFCONFIG
-KBUILD_DEFCONFIG=$(KERNEL_TYPE)_$(PLATFORM_CONFIG)_defconfig
-KBUILD_DEFCONFIG_PATH=$(ZEPHYR_BASE)/arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG)
+
+ifdef PLATFORM_CONFIG
+KBUILD_DEFCONFIG_PATH=$(ZEPHYR_BASE)/arch/$(ARCH)/configs/$(PLATFORM_CONFIG)_defconfig
+export KBUILD_DEFCONFIG_PATH
else
-KBUILD_DEFCONFIG_PATH=$(KBUILD_DEFCONFIG)
-endif
-export KBUILD_DEFCONFIG
+$(error PLATFORM_CONFIG is not defined!)
endif
SOURCE_DIR ?= $(PROJECT_BASE)/src/
@@ -69,9 +66,11 @@ initconfig: $(DOTCONFIG)
%:
$(Q)$(call zephyrmake,$(O),$@)
-$(DOTCONFIG): $(CONF_FILE)
+KERNEL_CONFIG = $(ZEPHYR_BASE)/kernel/configs/$(KERNEL_TYPE).config
+
+$(DOTCONFIG): $(KBUILD_DEFCONFIG_PATH) $(CONF_FILE)
$(Q)$(CONFIG_SHELL) $(ZEPHYR_BASE)/scripts/kconfig/merge_config.sh \
- -q -m -O $(O) $(KBUILD_DEFCONFIG_PATH) $<
+ -q -m -O $(O) $(KBUILD_DEFCONFIG_PATH) $(KERNEL_CONFIG) $(CONF_FILE)
$(Q)yes "" | $(MAKE) $(S) -C $(ZEPHYR_BASE) O=$(O) \
PROJECT=$(PROJECT_BASE) oldconfig