diff options
| author | Damien George | 2016-11-08 14:28:30 +1100 |
|---|---|---|
| committer | Damien George | 2016-11-08 14:28:30 +1100 |
| commit | bdf33bc1367fa6fc888c791ce00b326bbd279bdf (patch) | |
| tree | bb3f5ab0c7912305fb8f61c03fa478ecc815880c /py/py.mk | |
| parent | 5630778f0f3a114f5b7d7f71f3df0bd1c3b378f6 (diff) | |
py: Move frozen bytecode Makefile rules from ports to common mk files.
Now, to use frozen bytecode all a port needs to do is define
FROZEN_MPY_DIR to the directory containing the .py files to freeze, and
define MICROPY_MODULE_FROZEN_MPY and MICROPY_QSTR_EXTRA_POOL.
Diffstat (limited to 'py/py.mk')
| -rw-r--r-- | py/py.mk | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -237,10 +237,16 @@ PY_O_BASENAME = \ # prepend the build destination prefix to the py object files PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME)) +# object file for frozen files ifneq ($(FROZEN_DIR),) PY_O += $(BUILD)/$(BUILD)/frozen.o endif +# object file for frozen bytecode (frozen .mpy files) +ifneq ($(FROZEN_MPY_DIR),) +PY_O += $(BUILD)/$(BUILD)/frozen_mpy.o +endif + # Sources that may contain qstrings SRC_QSTR_IGNORE = nlr% emitnx% emitnthumb% emitnarm% SRC_QSTR = $(SRC_MOD) $(addprefix py/,$(filter-out $(SRC_QSTR_IGNORE),$(PY_O_BASENAME:.o=.c)) emitnative.c) |
