|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
-include mpconfigport.mk
|
|
|
|
|
include ../../py/mkenv.mk
|
|
|
|
|
|
|
|
|
|
FROZEN_DIR = scripts
|
|
|
|
|
FROZEN_MPY_DIR = modules
|
|
|
|
|
# use FROZEN_MANIFEST for new projects, others are legacy
|
|
|
|
|
FROZEN_MANIFEST ?= manifest.py
|
|
|
|
|
FROZEN_DIR =
|
|
|
|
|
FROZEN_MPY_DIR =
|
|
|
|
|
|
|
|
|
|
# define main target
|
|
|
|
|
PROG = micropython
|
|
|
|
@ -177,9 +179,9 @@ SRC_QSTR += $(SRC_C) $(LIB_SRC_C)
|
|
|
|
|
# SRC_QSTR
|
|
|
|
|
SRC_QSTR_AUTO_DEPS +=
|
|
|
|
|
|
|
|
|
|
ifneq ($(FROZEN_MPY_DIR),)
|
|
|
|
|
# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
|
|
|
|
|
# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch).
|
|
|
|
|
ifneq ($(FROZEN_MANIFEST)$(FROZEN_MPY_DIR),)
|
|
|
|
|
# To use frozen code create a manifest.py file with a description of files to
|
|
|
|
|
# freeze, then invoke make with FROZEN_MANIFEST=manifest.py (be sure to build from scratch).
|
|
|
|
|
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
|
|
|
|
|
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
|
|
|
|
|
CFLAGS += -DMPZ_DIG_SIZE=16 # force 16 bits to work on both 32 and 64 bit archs
|
|
|
|
@ -215,7 +217,7 @@ fast:
|
|
|
|
|
# build a minimal interpreter
|
|
|
|
|
minimal:
|
|
|
|
|
$(MAKE) COPT="-Os -DNDEBUG" CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_minimal.h>"' \
|
|
|
|
|
BUILD=build-minimal PROG=micropython_minimal FROZEN_DIR= FROZEN_MPY_DIR= \
|
|
|
|
|
BUILD=build-minimal PROG=micropython_minimal FROZEN_MANIFEST= \
|
|
|
|
|
MICROPY_PY_BTREE=0 MICROPY_PY_FFI=0 MICROPY_PY_SOCKET=0 MICROPY_PY_THREAD=0 \
|
|
|
|
|
MICROPY_PY_TERMIOS=0 MICROPY_PY_USSL=0 \
|
|
|
|
|
MICROPY_USE_READLINE=0
|
|
|
|
@ -252,7 +254,7 @@ coverage:
|
|
|
|
|
-Wold-style-definition -Wpointer-arith -Wshadow -Wuninitialized -Wunused-parameter \
|
|
|
|
|
-DMICROPY_UNIX_COVERAGE' \
|
|
|
|
|
LDFLAGS_EXTRA='-fprofile-arcs -ftest-coverage' \
|
|
|
|
|
FROZEN_DIR=coverage-frzstr FROZEN_MPY_DIR=coverage-frzmpy \
|
|
|
|
|
FROZEN_MANIFEST=manifest_coverage.py \
|
|
|
|
|
BUILD=build-coverage PROG=micropython_coverage
|
|
|
|
|
|
|
|
|
|
coverage_test: coverage
|
|
|
|
|