@ -8,7 +8,7 @@
# To build a "minimal" configuration, use "make-minimal" wrapper.
BOARD ?= qemu_x86
CONF_FILE = prj.conf
CONF_FILE = prj_$( BOARD) _merged .conf
OUTDIR_PREFIX = $( BOARD)
# Default heap size is 16KB, which is on conservative side, to let
@ -19,7 +19,9 @@ FROZEN_DIR = scripts
# Zephyr (generated) config files - must be defined before include below
Z_EXPORTS = outdir/$( OUTDIR_PREFIX) /Makefile.export
i f n e q ( $( MAKECMDGOALS ) , c l e a n )
i n c l u d e $( Z_EXPORTS )
e n d i f
i n c l u d e . . / p y / m k e n v . m k
i n c l u d e . . / p y / p y . m k
@ -56,12 +58,12 @@ CFLAGS = $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(ZEPHYRINCLUDE) \
i n c l u d e . . / p y / m k r u l e s . m k
# We use single target here ($(Z_EXPORTS)) for simplicity, but actually
# number of things get generated here: 'initconfig' generates C header for
# Kconfig configuration, 'outputexports' generates make environment with CC,
# etc., and 'lib' generates other headers which may be included by zephyr.h,
# e.g. DTS-related.
$(Z_EXPORTS) : $( CONF_FILE )
# We use single target here ($(Z_EXPORTS)) for simplicity, but actually
# number of things get generated here: 'initconfig' generates C header for
# Kconfig configuration, 'outputexports' generates make environment with CC,
# etc., and 'lib' generates other headers which may be included by zephyr.h,
# e.g. DTS-related.
$( MAKE) -f Makefile.zephyr BOARD = $( BOARD) CONF_FILE = $( CONF_FILE) initconfig outputexports lib
GENERIC_TARGETS = all zephyr run qemu qemugdb flash debug debugserver
@ -84,14 +86,14 @@ build/genhdr/qstr.i.last: | $(Z_EXPORTS)
# 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
# MicroPython's global clean cleans everything, fast
CLEAN_EXTRA = outdir
# Clean Zephyr things in Zephyr way
z_clean :
$( MAKE) -f Makefile.zephyr BOARD = $( BOARD) clean
.PHONY : prj .conf
prj.conf : prj_base .conf
$(CONF_FILE) : prj_base .conf prj_ $( BOARD ) .conf
$( PYTHON) makeprj.py prj_base.conf prj_$( BOARD) .conf $@
test :