Exclude main.py from py -> mpy conversion

This commit is contained in:
Kai Vogelgesang 2025-07-10 01:25:05 +02:00
parent a4675354bf
commit e568baad96
Signed by: kai
GPG Key ID: 3FC8578CC818A9EB

View File

@ -1,7 +1,8 @@
SRC_DIR := src
BUILD_DIR := build
SRC_FILES := $(wildcard $(SRC_DIR)/*.py) $(wildcard $(SRC_DIR)/**/*.py)
MAIN_PY := src/main.py
SRC_FILES := $(filter-out $(MAIN_PY), $(wildcard $(SRC_DIR)/*.py) $(wildcard $(SRC_DIR)/**/*.py))
BUILD_FILES := $(patsubst $(SRC_DIR)/%.py,$(BUILD_DIR)/%.mpy, $(SRC_FILES))
$(BUILD_DIR)/%.mpy: $(SRC_DIR)/%.py
@ -17,6 +18,7 @@ clean:
.PHONY: deploy
deploy: $(BUILD_FILES)
mpremote fs cp $(MAIN_PY) :
mpremote fs cp -r $(BUILD_DIR)/* :
.PHONY: purge