summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2016-05-14 21:56:35 -0400
committerAnas Nashif <nashif@linux.intel.com>2016-05-16 19:43:50 +0000
commita0cf03b1c7038e545a412c519767b1ef69ee6820 (patch)
tree0152d06afdb7c304a816434f1ac60e93a9d0049a /Makefile.inc
parenta5d96e3f841fb7afc2cbc776fbee5bd801c56c17 (diff)
build: add extra dependency for zephyr.lnk and rebuild with new boards
When building an application for a different BOARD, the .link file was never updated causing issues with linking. Also, make sure we restart the build process when the board has changed. This guarantees that the file is recreated when the dependencies have changed. Jira: ZEP-239 Change-Id: Ided3a71c03fd8b2c6ab9c2bf8370104cd5071c08 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 35c9e7dbd..a91fca713 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -63,6 +63,8 @@ endif
zephyrmake = @+$(MAKE) -C $(ZEPHYR_BASE) O=$(1) CFLAGS=$(CFLAGS) \
PROJECT=$(PROJECT_BASE) SOURCE_DIR=$(SOURCE_DIR) $(2)
+BOARDCONFIG = $(O)/.board_$(BOARD)
+
DOTCONFIG = $(O)/.config
all: $(DOTCONFIG)
@@ -94,6 +96,10 @@ debugserver: FORCE
initconfig: $(DOTCONFIG)
+$(BOARDCONFIG):
+ @rm -f $(O)/.board_*
+ @touch $@
+
menuconfig: initconfig
$(Q)$(call zephyrmake,$(O),$@)
@@ -106,7 +112,7 @@ help:
KERNEL_CONFIG = $(ZEPHYR_BASE)/kernel/configs/$(KERNEL_TYPE).config
-$(DOTCONFIG): $(KBUILD_DEFCONFIG_PATH) $(CONF_FILE)
+$(DOTCONFIG): $(BOARDCONFIG) $(KBUILD_DEFCONFIG_PATH) $(CONF_FILE)
$(Q)$(CONFIG_SHELL) $(ZEPHYR_BASE)/scripts/kconfig/merge_config.sh \
-q -m -O $(O) $(KBUILD_DEFCONFIG_PATH) $(KERNEL_CONFIG) $(CONF_FILE)
$(Q)$(MAKE) $(S) -C $(ZEPHYR_BASE) O=$(O) PROJECT=$(PROJECT_BASE) oldnoconfig