diff --git a/esp8266/Makefile b/esp8266/Makefile
index 4e75ee667c592418ab5da20614cd547bd2f878de..d234ce0227703efd64eed81714507e9675c43dcf 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -8,8 +8,8 @@ MICROPY_SSL_AXTLS = 1
 MICROPY_FATFS = 1
 MICROPY_PY_BTREE = 1
 
-FROZEN_DIR = scripts
-FROZEN_MPY_DIR = modules
+FROZEN_DIR ?= scripts
+FROZEN_MPY_DIR ?= modules
 
 # include py core make definitions
 include ../py/py.mk