unix: Convert to use FROZEN_MANIFEST to specify frozen code.
Removes symlinks in modules directory, all frozen code is now specified by manifest.py.
This commit is contained in:
parent
e81f538e25
commit
b1c0355b93
@ -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
|
||||
|
2
ports/unix/manifest.py
Normal file
2
ports/unix/manifest.py
Normal file
@ -0,0 +1,2 @@
|
||||
freeze_as_mpy('$(MPY)/tools', 'upip.py')
|
||||
freeze_as_mpy('$(MPY)/tools', 'upip_utarfile.py', opt=3)
|
2
ports/unix/manifest_coverage.py
Normal file
2
ports/unix/manifest_coverage.py
Normal file
@ -0,0 +1,2 @@
|
||||
freeze_as_str('coverage-frzstr')
|
||||
freeze_as_mpy('coverage-frzmpy')
|
@ -1 +0,0 @@
|
||||
../../../tools/upip.py
|
@ -1 +0,0 @@
|
||||
../../../tools/upip_utarfile.py
|
Loading…
Reference in New Issue
Block a user