summaryrefslogtreecommitdiffstatshomepage
path: root/zephyr
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-30 00:08:27 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-30 00:08:27 +0300
commit29dd92c82a6ea07f8d4f71c5c6d18c45ccefde39 (patch)
tree4edc1589a6d7a8c0dc5237396792947eae32cff3 /zephyr
parente9d7c3ea0ef7b726b093b1abf9cece0c9146d635 (diff)
downloadmicropython-29dd92c82a6ea07f8d4f71c5c6d18c45ccefde39.tar.gz
micropython-29dd92c82a6ea07f8d4f71c5c6d18c45ccefde39.zip
zephyr/Makefile: Rework to use modern, official build integration.
Build happens in 3 stages: 1. Zephyr config header and make vars are generated from prj.conf. 2. libmicropython is built using them. 3. Zephyr is built and final link happens.
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/zephyr/Makefile b/zephyr/Makefile
index 7a0d052989..c6d6eb3253 100644
--- a/zephyr/Makefile
+++ b/zephyr/Makefile
@@ -18,7 +18,6 @@ MICROPY_HEAP_SIZE = 16384
FROZEN_DIR = scripts
# Zephyr (generated) config files - must be defined before include below
-Z_SYSGEN_H = outdir/$(OUTDIR_PREFIX)/misc/generated/sysgen/sysgen.h
Z_EXPORTS = outdir/$(OUTDIR_PREFIX)/Makefile.export
include $(Z_EXPORTS)
@@ -71,15 +70,13 @@ $(GENERIC_TARGETS): $(LIBMICROPYTHON)
$(CLEAN_TARGETS): clean
$(GENERIC_TARGETS) $(KCONFIG_TARGETS) $(CLEAN_TARGETS):
- $(RM) -f outdir/$(OUTDIR_PREFIX)/zephyr.lnk
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) CONF_FILE=$(CONF_FILE) $@
-$(LIBMICROPYTHON): $(Z_SYSGEN_H)
-build/genhdr/qstr.i.last: $(Z_SYSGEN_H)
+$(LIBMICROPYTHON): | $(Z_EXPORTS)
+build/genhdr/qstr.i.last: | $(Z_EXPORTS)
-$(Z_SYSGEN_H):
- rm -f $(LIBMICROPYTHON)
- -$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) CONF_FILE=$(CONF_FILE)
+# If we recreate libmicropython, also cause zephyr.bin relink
+LIBMICROPYTHON_EXTRA_CMD = -$(RM) -f outdir/$(OUTDIR_PREFIX)/zephyr.lnk
# Clean Zephyr things too
clean: z_clean